Crosscompile error tinc => 1.0.11 on openwrt whiterussian 0.9

Guus Sliepen guus at tinc-vpn.org
Fri Jun 18 16:08:37 CEST 2010


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 mode

Hm 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=gnu99

This 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 install

So 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>


More information about the tinc-devel mailing list