Frithjof Hammer
2010-Jun-18 13:55 UTC
Crosscompile error tinc => 1.0.11 on openwrt whiterussian 0.9
Hello! I try to maintain a couple off old Openwrt based routers. The routers run openwrt whiterussian, so it quite outdated. But it is a little dangerous to update a remote machine from whiterussian to kamikaze or backfire, this may be usefull for others. I used the openwrt whiterussian 0.9 sdk and the attached Makefile to compile all tinc versions till 1.0.11. Since 1.0.11 the compile process fails in net.c at line 470: mipsel-linux-uclibc-gcc -DHAVE_CONFIG_H -I.. -I../lib -I/home/frithjof/wrt/whiterussian/OpenWrt-SDK-Linux-x86_64-1/staging_dir_mipsel/usr/include -I/home/frithjof/wrt/whiterussian/OpenWrt-SDK-Linux-x86_64-1/staging_dir_mipsel/usr//include -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -DCONFDIR=\"/etc\" -DLOCALSTATEDIR=\"/var\" -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -MT net.o -MD -MP -MF .deps/net.Tpo -c -o net.o net.c net.c: In function `main_loop': net.c:470: error: conflicting types for 'node' net.c:438: error: previous declaration of 'node' was here net.c:470: error: 'for' loop initial declaration used outside C99 mode net.c:481: warning: assignment from incompatible pointer type net.c:497: warning: assignment from incompatible pointer type net.c:504: warning: assignment from incompatible pointer type net.c:504: warning: assignment from incompatible pointer type net.c:505: warning: assignment from incompatible pointer type make[7]: *** [net.o] Error 1 Any Ideas? I attached the full outputs of the compile processes for 1.0.10 (working) and 1.0.13 (failing). Greetings Frithjof -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Makefile URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20100618/e82c021a/attachment-0002.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: output_1.0.10.txt URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20100618/e82c021a/attachment-0003.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: output_1.0.13.txt URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20100618/e82c021a/attachment-0004.txt>
Guus Sliepen
2010-Jun-18 14:08 UTC
Crosscompile error tinc => 1.0.11 on openwrt whiterussian 0.9
On Fri, Jun 18, 2010 at 03:55:33PM +0200, Frithjof Hammer wrote:> I used the openwrt whiterussian 0.9 sdk and the attached Makefile to > compile all tinc versions till 1.0.11. Since 1.0.11 the compile process > fails in net.c at line 470:[...]> net.c:470: error: 'for' loop initial declaration used outside C99 modeHm it seems the build scripts override the C99 setting. Tinc's configure script detects it:> checking for mipsel-linux-gcc... mipsel-linux-uclibc-gcc[...]> checking for mipsel-linux-uclibc-gcc option to accept ISO C99... -std=gnu99This will set CC to mipsel-linux-uclibc-gcc -std=gnu99 in the Makefiles. However, later on when make is called, CC and CFLAGS are being overridden:> make -C /home/frithjof/wrt/whiterussian/OpenWrt-SDK-Linux-x86_64-1/build_mipsel/tinc-1.0.13 \ > CC=mipsel-linux-uclibc-gcc \ > CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" \ > DESTDIR="/home/frithjof/wrt/whiterussian/OpenWrt-SDK-Linux-x86_64-1/build_mipsel/tinc-1.0.13/ipkg-install" \ > all installSo change the scripts you have for building tinc for OpenWRT, and make sure it does not override CC, or find some way to add -std=gnu99 to it. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20100618/cf042c4a/attachment.pgp>