Bug 269 - iptables fails to compile
Summary: iptables fails to compile
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-12 16:52 UTC by Floris Bos
Modified: 2009-08-07 20:19 UTC (History)
1 user (show)

See Also:
Host: Linux 2.6.28-ARCH #1 SMP PREEMPT Sun Feb 8 10:13:45 UTC 2009 i686 Intel(R) Xeon(R) CPU X3350 @ 2.66GHz GenuineIntel GNU/Linux
Target: x86_64
Build: Buildroot snapshot 20090412


Attachments
Config file (16.77 KB, application/octet-stream)
2009-04-27 12:42 UTC, Floris Bos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Floris Bos 2009-04-12 16:52:51 UTC
Building a x86_64 target with iptables and ipv6 fails.

==

/home/max/buildroot/build_x86_64/staging_dir/usr/bin/x86_64-linux-uclibc-gcc -Os -pipe -Os -I/home/max/buildroot/build_x86_64/staging_dir/usr/include -I/home/max/buildroot/build_x86_64/staging_dir/include --sysroot=/home/max/buildroot/build_x86_64/staging_dir/ -isysroot /home/max/buildroot/build_x86_64/staging_dir -mtune=generic -fPIC -DPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DXTABLES_LIBDIR=\"/usr/lib/xtables\" -DXTABLES_INTERNAL -I./include -I./include -I /home/max/buildroot/toolchain_build_x86_64/linux/include -I /home/max/buildroot/toolchain_build_x86_64/linux/include -DENABLE_IPV6=1 -Os -pipe -Os -I/home/max/buildroot/build_x86_64/staging_dir/usr/include -I/home/max/buildroot/build_x86_64/staging_dir/include --sysroot=/home/max/buildroot/build_x86_64/staging_dir/ -isysroot /home/max/buildroot/build_x86_64/staging_dir -mtune=generic -fPIC -DPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -rdynamic --sysroot=/home/max/buildroot/build_x86_64/staging_dir/ -o iptables iptables-standalone.o iptables.o  -L/home/max/buildroot/build_x86_64/staging_dir/lib -L/home/max/buildroot/build_x86_64/staging_dir/usr/lib -ldl -lm libiptc/libiptc.a extensions/libext4.a ./.libs/libxtables.so   -Wl,--rpath -Wl,/home/max/buildroot/build_x86_64/iptables-1.4.2/.libs
extensions/libext4.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make[3]: *** [iptables] Error 1
make[3]: Leaving directory `/home/max/buildroot/build_x86_64/iptables-1.4.2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/max/buildroot/build_x86_64/iptables-1.4.2'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/max/buildroot/build_x86_64/iptables-1.4.2'
make: *** [/home/max/buildroot/build_x86_64/iptables-1.4.2/.stamp_built] Error 2

==
Comment 1 Peter Korsgaard 2009-04-27 07:41:46 UTC
Sorry, I cannot reproduce it here. It builds fine for x86-64 with ipv6 support her (Debian x86-64). Please post your .config and info about your host setup if you still have this problem.
Comment 2 Floris Bos 2009-04-27 12:42:56 UTC
Created attachment 271 [details]
Config file
Comment 3 Floris Bos 2009-04-27 12:45:08 UTC
Problem only seems to occur when cross compiling on a 32-bit host for a 64-bit target.

Does work in the x86_64 edition of Archlinux
Comment 4 Peter Korsgaard 2009-04-27 14:10:19 UTC
hmm, I'm afraid my machines all run 64bit, so you'll have to debug that yourself. try comparing libext4.a from the 32bit and 64bit builds.
Comment 5 Thomas Petazzoni 2009-08-07 20:19:27 UTC
I have a 32 bits Ubuntu, I took your .config and compiled it with the latest Buildroot Git. And it worked nicely. iptables was generated, including IPv6 support. I haven't tested the resulting binaries, though, but at least, the build completed.

So I'm marking this bug as WORKSFORME. If you are still having the issue, don't hesitate to re-open it. Thanks for your contribution!