Opened 12 years ago
Closed 12 years ago
#90 closed defect (fixed)
Cannot compile swconfig
Reported by: | k.szczesny@… | Owned by: | stappers |
---|---|---|---|
Priority: | major | Milestone: | milestone: |
Component: | debian/packages | Version: | 2.0 |
Severity: | Keywords: | ||
Cc: |
Description
I'm getting this when compiling debwrt [in swconfig package:]
make[1]: Entering directory `/usr/src/swconfig/swconfig-0.1/src' mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o cli.o cli.c In file included from /usr/mips-linux-gnu/include/netlink-tiny/netlink/netlink.h:30, from cli.c:31: /usr/mips-linux-gnu/include/netlink-tiny/netlink/handlers.h:133: warning: 'struct ucred' declared inside parameter list /usr/mips-linux-gnu/include/netlink-tiny/netlink/handlers.h:133: warning: its scope is only this definition or declaration, which is probably not what you want /usr/mips-linux-gnu/include/netlink-tiny/netlink/handlers.h:207: warning: 'struct ucred' declared inside parameter list /usr/mips-linux-gnu/include/netlink-tiny/netlink/handlers.h: In function 'nl_cb_overwrite_recv': /usr/mips-linux-gnu/include/netlink-tiny/netlink/handlers.h:209: warning: assignment from incompatible pointer type In file included from cli.c:31: /usr/mips-linux-gnu/include/netlink-tiny/netlink/netlink.h: At top level: /usr/mips-linux-gnu/include/netlink-tiny/netlink/netlink.h:57: warning: 'struct ucred' declared inside parameter list In file included from /usr/mips-linux-gnu/include/netlink-tiny/netlink/genl/genl.h:16, from cli.c:32: /usr/mips-linux-gnu/include/netlink-tiny/netlink/msg.h:52: error: field 'nm_creds' has incomplete type /usr/mips-linux-gnu/include/netlink-tiny/netlink/msg.h: In function 'nlmsg_set_creds': /usr/mips-linux-gnu/include/netlink-tiny/netlink/msg.h:207: error: dereferencing pointer to incomplete type make[1]: *** [cli.o] Error 1 make[1]: Leaving directory `/usr/src/swconfig/swconfig-0.1/src' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 + find /usr/src/swconfig -maxdepth 1 -name '*.deb' + xargs -r -t -i sudo dpkg-cross -a mips -i '{}' touch debian/package/swconfig/build mkdir -p /home/krystian/debwrt/bin/ar71xx-angel-2.0-1-default/debian cp -rav /home/krystian/debwrt/build/debian-ar71xx-generic_WNDR3700-squeeze/usr/src/swconfig/*.deb /home/krystian/debwrt/bin/ar71xx-angel-2.0-1-default/debian cp: cannot stat `/home/krystian/debwrt/build/debian-ar71xx-generic_WNDR3700-squeeze/usr/src/swconfig/*.deb': No such file or directory make: *** [debian/package/swconfig/deliver] Error 1
Attachments (0)
Change History (8)
comment:1 Changed 12 years ago by anonymous
comment:2 Changed 12 years ago by k.szczesny@…
In the end my patchfile looks like this:
--- b/src/cli.c.orig 2011-02-18 13:45:59.000000000 +0000 +++ b/src/cli.c 2011-02-18 13:47:35.480243004 +0000 @@ -13,7 +13,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ - +#define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h> --- b/src/swlib.c.orig 2011-02-18 13:50:01.460243004 +0000 +++ b/src/swlib.c 2011-02-18 13:50:19.630243000 +0000 @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h> --- swconfig-0.1/src/uci.c.orig 2011-02-18 13:52:17.740243003 +0000 +++ swconfig-0.1/src/uci.c 2011-02-18 13:52:32.920243003 +0000 @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h>
But not it seems something fundamental to the whole swconfig is missing:
dh_auto_configure patch -f -p1 <debian/patches/swconfig.patch patching file src/cli.c patching file src/swlib.c patching file src/uci.c /usr/bin/make -C src make[1]: Entering directory `/usr/src/swconfig/swconfig-0.1/src' mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o cli.o cli.c mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o swlib.o swlib.c mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o uci.o uci.c uci.c:26:17: error: uci.h: No such file or directory uci.c:58: warning: 'struct uci_section' declared inside parameter list uci.c:58: warning: its scope is only this definition or declaration, which is probably not what you want uci.c: In function 'swlib_map_settings': uci.c:66: error: dereferencing pointer to incomplete type uci.c:66: error: expected ';' before '{' token uci.c: At top level: uci.c:104: warning: 'struct uci_package' declared inside parameter list uci.c: In function 'swlib_apply_from_uci': uci.c:107: error: dereferencing pointer to incomplete type uci.c:111: error: storage size of 'ptr' isn't known uci.c:118: error: dereferencing pointer to incomplete type uci.c:118: error: expected ';' before '{' token uci.c:157: warning: passing argument 4 of 'swlib_map_settings' from incompatible pointer type uci.c:160: error: dereferencing pointer to incomplete type uci.c:160: error: expected ';' before '{' token make[1]: *** [uci.o] Error 1 make[1]: Leaving directory `/usr/src/swconfig/swconfig-0.1/src' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 + xargs -r -t -i sudo dpkg-cross -a mips -idh_auto_configure patch -f -p1 <debian/patches/swconfig.patch patching file src/cli.c patching file src/swlib.c patching file src/uci.c /usr/bin/make -C src make[1]: Entering directory `/usr/src/swconfig/swconfig-0.1/src' mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o cli.o cli.c mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o swlib.o swlib.c mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o uci.o uci.c uci.c:26:17: error: uci.h: No such file or directory uci.c:58: warning: 'struct uci_section' declared inside parameter list uci.c:58: warning: its scope is only this definition or declaration, which is probably not what you want uci.c: In function 'swlib_map_settings': uci.c:66: error: dereferencing pointer to incomplete type uci.c:66: error: expected ';' before '{' token uci.c: At top level: uci.c:104: warning: 'struct uci_package' declared inside parameter list uci.c: In function 'swlib_apply_from_uci': uci.c:107: error: dereferencing pointer to incomplete type uci.c:111: error: storage size of 'ptr' isn't known uci.c:118: error: dereferencing pointer to incomplete type uci.c:118: error: expected ';' before '{' token uci.c:157: warning: passing argument 4 of 'swlib_map_settings' from incompatible pointer type uci.c:160: error: dereferencing pointer to incomplete type uci.c:160: error: expected ';' before '{' token make[1]: *** [uci.o] Error 1 make[1]: Leaving directory `/usr/src/swconfig/swconfig-0.1/src' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 + xargs -r -t -i sudo dpkg-cross -a mips -i '{}' + find /usr/src/swconfig -maxdepth 1 -name '*.deb' '{}' + find /usr/src/swconfig -maxdepth 1 -name '*.deb'
always something...
Any idea what's wrong?
Maybe it's because I am just running build.sh not to build the whole damn thing for another hour...?
comment:3 Changed 12 years ago by k.szczesny@…
Is there any chance I could download the packages compiled for ar71* ?
I really need to have swconfig in order to get the damn switch working :/
I am going through all of the build process in order to get this one thing working :/
I don't have access to .lan .wan devices.
devices connected to the switch will not see one another :/
damn
can I somehow take the swconfig which can be built as part of openwrt and install it on debwrt?
Thanks in advance
comment:4 Changed 12 years ago by stappers
- Component changed from debian to packages
- Owner changed from amain to stappers
- Status changed from new to assigned
There was an update on the swconfig from Openwrt.
--- debian/package/swconfig/patches/001_debwrt_makefile.patch (revision 163) +++ debian/package/swconfig/patches/001_debwrt_makefile.patch (working copy) @@ -4,7 +4,7 @@ ifndef CFLAGS CFLAGS = -O2 -g -I ../src endif --LIBS=-lnl +-LIBS=-lnl -lnl-genl +LIBS=-lnl-tiny all: swconfig
Further feedback welcome.
comment:5 Changed 12 years ago by k.szczesny@…
hmmm
mips-linux-gnu-gcc -O2 -g -I../src -I/usr/mips-linux-gnu/src/linux/include -I/usr/mips-linux-gnu/include/netlink-tiny -c -o swlib.o swlib.c swlib.c: In function 'swlib_call': swlib.c:104: warning: passing argument 1 of 'nl_send_auto_complete' from incompatible pointer type swlib.c:120: warning: passing argument 1 of 'nl_recvmsgs' from incompatible pointer type swlib.c:126: warning: passing argument 1 of 'nl_wait_for_ack' from incompatible pointer type swlib.c: In function 'swlib_priv_init': swlib.c:538: warning: assignment makes pointer from integer without a cast swlib.c:544: warning: passing argument 1 of 'genl_connect' from incompatible pointer type swlib.c:549: warning: passing argument 1 of 'genl_ctrl_alloc_cache' from incompatible pointer type swlib.c:549: error: too many arguments to function 'genl_ctrl_alloc_cache' swlib.c:549: warning: assignment makes integer from pointer without a cast make[1]: *** [swlib.o] Error 1 make[1]: Leaving directory `/usr/src/swconfig/swconfig-0.1/src' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 + find /usr/src/swconfig -maxdepth 1 -name '*.deb' + xargs -r -t -i sudo dpkg-cross -a mips -i '{}'
Will have to look into this.
I have to say I am getting tired with it.
comment:6 Changed 12 years ago by stappers
For me is a succesfull compile of swconfig possible,
at least it was last night.
My build system has nl stuff available as side effect of building libnl.
My guess is that libnl has to be build, before the build of swconfig starts.
comment:7 Changed 12 years ago by k.szczesny@…
Phew... finally made it
I had to make this changes to the swconfig patches though:
[as suggested by stappers before:]
--- debian/package/swconfig/patches/001_debwrt_makefile.patch.orig 2011-02-19 17:14:35.290573271 +0100 +++ debian/package/swconfig/patches/001_debwrt_makefile.patch 2011-02-19 17:38:33.820573264 +0100 @@ -4,7 +4,7 @@ ifndef CFLAGS CFLAGS = -O2 -g -I ../src endif --LIBS=-lnl -lnl-genl +-LIBS=-lnl +LIBS=-lnl-tiny all: swconfig
another one:
--- debian/package/swconfig/patches/002_debwrt_cli.c.patch.orig 2011-02-19 17:34:09.760573265 +0100 +++ debian/package/swconfig/patches/002_debwrt_cli.c.patch 2011-02-19 17:38:33.820573264 +0100 @@ -1,15 +1,3 @@ ---- swconfig-0.1/src/cli.c.orig 2011-02-18 13:45:59.000000000 +0000 -+++ swconfig-0.1/src/cli.c 2011-02-18 13:47:35.480243004 +0000 -@@ -13,7 +13,7 @@ - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ -- -+#define _GNU_SOURCE - #include <stdio.h> - #include <string.h> - #include <stdlib.h> - --- swconfig-0.1/src/cli.c.org 2010-11-06 22:49:58.553629001 +0000 +++ swconfig-0.1/src/cli.c 2010-11-06 22:34:18.603629002 +0000 @@ -23,7 +23,7 @@
and finally:
--- debian/package/swconfig/patches/003_debwrt_swlib.h.patch.orig 2011-02-19 17:35:55.530573260 +0100 +++ debian/package/swconfig/patches/003_debwrt_swlib.h.patch 2011-02-19 17:38:33.820573264 +0100 @@ -1,14 +1,3 @@ ---- b/src/swlib.c.orig 2011-02-18 13:50:01.460243004 +0000 -+++ b/src/swlib.c 2011-02-18 13:50:19.630243000 +0000 -@@ -13,6 +13,7 @@ - * GNU General Public License for more details. - */ - -+#define _GNU_SOURCE - #include <stdio.h> - #include <string.h> - #include <stdlib.h> - --- swconfig-0.1/src/swlib.h.org 2010-11-06 22:50:18.543629001 +0000 +++ swconfig-0.1/src/swlib.h 2010-11-06 22:34:44.013629001 +0000 @@ -110,7 +110,7 @@
And I was finally able to compile on Ubuntu 10.10
Unfortunately, same set of patches on OpenSUSE using the Xeno Build technique didn't work.
I guess I am missing some libs here and there :/ Not sure which though.
Thanks!
comment:8 Changed 12 years ago by amain
- Resolution set to fixed
- Status changed from assigned to closed
Thanks! Committed in changeset #170.
Seems that adding:
#define _GNU_SOURCE
on top of cli.c fixes the problem.