# iptables fails to build.

## matttah

I'm having issues emerge iptables, here is the logs below, can't seem to figure out what is wrong:

```

# emerge iptables

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-firewall/iptables-1.4.13

>>> Downloading 'http://mirror.lug.udel.edu/pub/gentoo/distfiles/iptables-1.4.13.tar.bz2'

--2012-07-25 17:44:08--  http://mirror.lug.udel.edu/pub/gentoo/distfiles/iptables-1.4.13.tar.bz2

Resolving mirror.lug.udel.edu... 128.175.60.118

Connecting to mirror.lug.udel.edu|128.175.60.118|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 502942 (491K) [application/x-tar]

Saving to: `/usr/portage/distfiles/iptables-1.4.13.tar.bz2'

100%[======================================>] 502,942     2.72M/s   in 0.2s    

2012-07-25 17:44:09 (2.72 MB/s) - `/usr/portage/distfiles/iptables-1.4.13.tar.bz2' saved [502942/502942]

 * iptables-1.4.13.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                     [ ok ]

>>> cfg-update-1.8.2-r1: Creating checksum index...

>>> Unpacking source...

>>> Unpacking iptables-1.4.13.tar.bz2 to /var/tmp/portage/net-firewall/iptables-1.4.13/work

>>> Source unpacked in /var/tmp/portage/net-firewall/iptables-1.4.13/work

>>> Preparing source in /var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13 ...

 * Running elibtoolize in: iptables-1.4.13/build-aux/

 *   Applying portage/1.2.0 patch ...

 *   Applying sed/1.5.6 patch ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13 ...

 * econf: updating iptables-1.4.13/build-aux/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating iptables-1.4.13/build-aux/config.sub with /usr/share/gnuconfig/config.sub

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --sbindir=/sbin --libexecdir=/lib64 --enable-devel --enable-libipq --enable-shared --disable-static --enable-ipv6

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables... 

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes

checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of x86_64-pc-linux-gnu-gcc... none

checking whether x86_64-pc-linux-gnu-gcc and cc understand -c and -o together... yes

checking build system type... x86_64-pc-linux-gnu

checking host system type... x86_64-pc-linux-gnu

checking how to print strings... printf

checking for a sed that does not truncate output... /bin/sed

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for fgrep... /bin/grep -F

checking for ld used by x86_64-pc-linux-gnu-gcc... /usr/x86_64-pc-linux-gnu/bin/ld

checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop

checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop

checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r

checking for x86_64-pc-linux-gnu-objdump... x86_64-pc-linux-gnu-objdump

checking how to recognize dependent libraries... pass_all

checking for x86_64-pc-linux-gnu-dlltool... no

checking for dlltool... no

checking how to associate runtime and link libraries... printf %s\n

checking for x86_64-pc-linux-gnu-ar... x86_64-pc-linux-gnu-ar

checking for archiver @FILE support... @

checking for x86_64-pc-linux-gnu-strip... x86_64-pc-linux-gnu-strip

checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib

checking command to parse /usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object... ok

checking for sysroot... no

checking for x86_64-pc-linux-gnu-mt... no

checking for mt... no

checking if : is a manifest tool... no

checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for dlfcn.h... yes

checking for objdir... .libs

checking if x86_64-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no

checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC

checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes

checking if x86_64-pc-linux-gnu-gcc static flag -static works... yes

checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... yes

checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... (cached) yes

checking whether the x86_64-pc-linux-gnu-gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no

checking whether the linker accepts -Wl,--no-as-needed... yes

checking whether /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 knows -Wl,--no-undefined... yes

checking linux/dccp.h usability... yes

checking linux/dccp.h presence... yes

checking for linux/dccp.h... yes

checking linux/ip_vs.h usability... yes

checking linux/ip_vs.h presence... yes

checking for linux/ip_vs.h... yes

checking linux/magic.h usability... yes

checking linux/magic.h presence... yes

checking for linux/magic.h... yes

checking linux/proc_fs.h usability... no

checking linux/proc_fs.h presence... no

checking for linux/proc_fs.h... no

checking size of struct ip6_hdr... 40

checking for x86_64-pc-linux-gnu-pkg-config... no

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for libnfnetlink... no

configure: creating ./config.status

config.status: creating Makefile

config.status: creating extensions/GNUmakefile

config.status: creating include/Makefile

config.status: creating iptables/Makefile

config.status: creating iptables/xtables.pc

config.status: creating libipq/Makefile

config.status: creating libipq/libipq.pc

config.status: creating libiptc/Makefile

config.status: creating libiptc/libiptc.pc

config.status: creating libiptc/libip4tc.pc

config.status: creating libiptc/libip6tc.pc

config.status: creating libxtables/Makefile

config.status: creating utils/Makefile

config.status: creating include/xtables.h

config.status: creating include/iptables/internal.h

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

>>> Source configured.

>>> Compiling source in /var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13 ...

make -j5 V=1 

make  all-recursive

make[1]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13'

Making all in libiptc

make[2]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libiptc'

/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT         -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include   -Wall -Waggregate-return -Wmissing-declarations     -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -c -o libip4tc.lo libip4tc.c

/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT         -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include   -Wall -Waggregate-return -Wmissing-declarations     -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -c -o libip6tc.lo libip6tc.c

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -O2 -pipe -c libip4tc.c  -fPIC -DPIC -o .libs/libip4tc.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -O2 -pipe -c libip6tc.c  -fPIC -DPIC -o .libs/libip6tc.o

In file included from libiptc.c:37,

                 from libip4tc.c:113:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/libiptc/libiptc.h:5,

                 from libip4tc.c:29:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

In file included from libiptc.c:37,

                 from libip6tc.c:111:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/libiptc/libip6tc.h:5,

                 from libip6tc.c:30:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

In file included from libip6tc.c:111:

libiptc.c: In function 'cache_add_entry':

libiptc.c:1006: warning: implicit declaration of function '__ALIGN_KERNEL'

In file included from libip4tc.c:113:

libiptc.c: In function 'cache_add_entry':

libiptc.c:1006: warning: implicit declaration of function '__ALIGN_KERNEL'

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -version-info 1:0:1 -Wl,--no-as-needed -Wl,-O1 -Wl,--as-needed -o libip6tc.la -rpath /usr/lib64 libip6tc.lo  

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -version-info 1:0:1 -Wl,-O1 -Wl,--as-needed -o libip4tc.la -rpath /usr/lib64 libip4tc.lo  

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libip6tc.o    -O2 -Wl,--no-as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libip6tc.so.0 -o .libs/libip6tc.so.0.1.0

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libip4tc.o    -O2 -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libip4tc.so.0 -o .libs/libip4tc.so.0.1.0

libtool: link: (cd ".libs" && rm -f "libip6tc.so.0" && ln -s "libip6tc.so.0.1.0" "libip6tc.so.0")

libtool: link: (cd ".libs" && rm -f "libip4tc.so.0" && ln -s "libip4tc.so.0.1.0" "libip4tc.so.0")

libtool: link: (cd ".libs" && rm -f "libip6tc.so" && ln -s "libip6tc.so.0.1.0" "libip6tc.so")

libtool: link: (cd ".libs" && rm -f "libip4tc.so" && ln -s "libip4tc.so.0.1.0" "libip4tc.so")

libtool: link: ( cd ".libs" && rm -f "libip6tc.la" && ln -s "../libip6tc.la" "libip6tc.la" )

libtool: link: ( cd ".libs" && rm -f "libip4tc.la" && ln -s "../libip4tc.la" "libip4tc.la" )

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -version-info 0:0:0 -Wl,--no-as-needed -Wl,-O1 -Wl,--as-needed -o libiptc.la -rpath /usr/lib64  libip4tc.la libip6tc.la 

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC   -Wl,-rpath -Wl,/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libiptc/.libs ./.libs/libip4tc.so ./.libs/libip6tc.so  -O2 -Wl,--no-as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libiptc.so.0 -o .libs/libiptc.so.0.0.0

libtool: link: (cd ".libs" && rm -f "libiptc.so.0" && ln -s "libiptc.so.0.0.0" "libiptc.so.0")

libtool: link: (cd ".libs" && rm -f "libiptc.so" && ln -s "libiptc.so.0.0.0" "libiptc.so")

libtool: link: ( cd ".libs" && rm -f "libiptc.la" && ln -s "../libiptc.la" "libiptc.la" )

make[2]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libiptc'

Making all in libxtables

make[2]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libxtables'

/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -I../iptables   -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -c -o libxtables_la-xtables.lo `test -f 'xtables.c' || echo './'`xtables.c

/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -I../iptables   -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -c -o libxtables_la-xtoptions.lo `test -f 'xtoptions.c' || echo './'`xtoptions.c

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -I../iptables -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -O2 -pipe -c xtables.c  -fPIC -DPIC -o .libs/libxtables_la-xtables.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -I../iptables -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -O2 -pipe -c xtoptions.c  -fPIC -DPIC -o .libs/libxtables_la-xtoptions.o

In file included from xtoptions.c:23:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from xtoptions.c:23:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

In file included from xtables.c:45:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from xtables.c:45:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

xtables.c: In function 'xtables_fully_register_pending_match':

xtables.c:897: warning: implicit declaration of function '__ALIGN_KERNEL'

xtables.c: In function 'xtables_save_string':

xtables.c:1757: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -version-info 7:0:0 -Wl,-O1 -Wl,--as-needed -o libxtables.la -rpath /usr/lib64 libxtables_la-xtables.lo libxtables_la-xtoptions.lo  -ldl 

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libxtables_la-xtables.o .libs/libxtables_la-xtoptions.o   -ldl  -O2 -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libxtables.so.7 -o .libs/libxtables.so.7.0.0

libtool: link: (cd ".libs" && rm -f "libxtables.so.7" && ln -s "libxtables.so.7.0.0" "libxtables.so.7")

libtool: link: (cd ".libs" && rm -f "libxtables.so" && ln -s "libxtables.so.7.0.0" "libxtables.so")

libtool: link: ( cd ".libs" && rm -f "libxtables.la" && ln -s "../libxtables.la" "libxtables.la" )

make[2]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libxtables'

Making all in include

make[2]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/include'

make[2]: Nothing to be done for `all'.

make[2]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/include'

Making all in libipq

make[2]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libipq'

/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT         -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include  -Wall -Waggregate-return -Wmissing-declarations      -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe -c -o libipq.lo libipq.c

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I../include -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -O2 -pipe -c libipq.c  -fPIC -DPIC -o .libs/libipq.o

/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -O2 -pipe  -Wl,-O1 -Wl,--as-needed -o libipq.la -rpath /usr/lib64 libipq.lo  

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libipq.o    -O2 -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libipq.so.0 -o .libs/libipq.so.0.0.0

libtool: link: (cd ".libs" && rm -f "libipq.so.0" && ln -s "libipq.so.0.0.0" "libipq.so.0")

libtool: link: (cd ".libs" && rm -f "libipq.so" && ln -s "libipq.so.0.0.0" "libipq.so")

libtool: link: ( cd ".libs" && rm -f "libipq.la" && ln -s "../libipq.la" "libipq.la" )

make[2]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/libipq'

Making all in extensions

make[2]: Entering directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/extensions'

x86_64-pc-linux-gnu-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.. -I../include  -Wp,-MMD,./.libxt_AUDIT.oo.d,-MT,libxt_AUDIT.oo -Wall -Waggregate-return -Wmissing-declarations         -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -D_INIT=libxt_AUDIT_init -DPIC -fPIC -O2 -pipe -o libxt_AUDIT.oo -c libxt_AUDIT.c;

x86_64-pc-linux-gnu-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.. -I../include  -Wp,-MMD,./.libxt_CHECKSUM.oo.d,-MT,libxt_CHECKSUM.oo -Wall -Waggregate-return -Wmissing-declarations   -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -D_INIT=libxt_CHECKSUM_init -DPIC -fPIC -O2 -pipe -o libxt_CHECKSUM.oo -c libxt_CHECKSUM.c;

x86_64-pc-linux-gnu-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.. -I../include  -Wp,-MMD,./.libxt_CLASSIFY.oo.d,-MT,libxt_CLASSIFY.oo -Wall -Waggregate-return -Wmissing-declarations   -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -D_INIT=libxt_CLASSIFY_init -DPIC -fPIC -O2 -pipe -o libxt_CLASSIFY.oo -c libxt_CLASSIFY.c;

x86_64-pc-linux-gnu-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.. -I../include  -Wp,-MMD,./.libxt_CONNMARK.oo.d,-MT,libxt_CONNMARK.oo -Wall -Waggregate-return -Wmissing-declarations   -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -D_INIT=libxt_CONNMARK_init -DPIC -fPIC -O2 -pipe -o libxt_CONNMARK.oo -c libxt_CONNMARK.c;

x86_64-pc-linux-gnu-gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT        -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.. -I../include  -Wp,-MMD,./.libxt_CONNSECMARK.oo.d,-MT,libxt_CONNSECMARK.oo -Wall -Waggregate-return -Wmissing-declarations     -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Winline -pipe -D_INIT=libxt_CONNSECMARK_init -DPIC -fPIC -O2 -pipe -o libxt_CONNSECMARK.oo -c libxt_CONNSECMARK.c;

In file included from libxt_CONNSECMARK.c:9:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from libxt_CONNSECMARK.c:9:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

libxt_CONNSECMARK.c:99: warning: implicit declaration of function '__ALIGN_KERNEL'

libxt_CONNSECMARK.c:99: error: initializer element is not constant

libxt_CONNSECMARK.c:99: error: (near initialization for 'connsecmark_target.size')

libxt_CONNSECMARK.c:100: error: initializer element is not constant

libxt_CONNSECMARK.c:100: error: (near initialization for 'connsecmark_target.userspacesize')

In file included from libxt_CHECKSUM.c:12:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from libxt_CHECKSUM.c:12:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

In file included from libxt_AUDIT.c:10:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from libxt_AUDIT.c:10:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

libxt_CHECKSUM.c:65: warning: implicit declaration of function '__ALIGN_KERNEL'

libxt_CHECKSUM.c:65: error: initializer element is not constant

libxt_CHECKSUM.c:65: error: (near initialization for 'checksum_tg_reg.size')

libxt_CHECKSUM.c:66: error: initializer element is not constant

libxt_CHECKSUM.c:66: error: (near initialization for 'checksum_tg_reg.userspacesize')

libxt_AUDIT.c:89: warning: implicit declaration of function '__ALIGN_KERNEL'

libxt_AUDIT.c:89: error: initializer element is not constant

libxt_AUDIT.c:89: error: (near initialization for 'audit_tg_reg.size')

libxt_AUDIT.c:90: error: initializer element is not constant

libxt_AUDIT.c:90: error: (near initialization for 'audit_tg_reg.userspacesize')

make[2]: *** [libxt_CHECKSUM.oo] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [libxt_CONNSECMARK.oo] Error 1

In file included from libxt_CLASSIFY.c:2:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from libxt_CLASSIFY.c:2:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

make[2]: *** [libxt_AUDIT.oo] Error 1

libxt_CLASSIFY.c:76: warning: implicit declaration of function '__ALIGN_KERNEL'

libxt_CLASSIFY.c:76: error: initializer element is not constant

libxt_CLASSIFY.c:76: error: (near initialization for 'classify_target.size')

libxt_CLASSIFY.c:77: error: initializer element is not constant

libxt_CLASSIFY.c:77: error: (near initialization for 'classify_target.userspacesize')

make[2]: *** [libxt_CLASSIFY.oo] Error 1

In file included from libxt_CONNMARK.c:25:

../include/xtables.h:433:1: warning: "aligned_u64" redefined

In file included from ../include/xtables.h:17,

                 from libxt_CONNMARK.c:25:

/usr/include/linux/types.h:13:1: warning: this is the location of the previous definition

libxt_CONNMARK.c:356: warning: implicit declaration of function '__ALIGN_KERNEL'

libxt_CONNMARK.c:356: error: initializer element is not constant

libxt_CONNMARK.c:356: error: (near initialization for 'connmark_tg_reg[0].size')

libxt_CONNMARK.c:357: error: initializer element is not constant

libxt_CONNMARK.c:357: error: (near initialization for 'connmark_tg_reg[0].userspacesize')

libxt_CONNMARK.c:371: error: initializer element is not constant

libxt_CONNMARK.c:371: error: (near initialization for 'connmark_tg_reg[1].size')

libxt_CONNMARK.c:372: error: initializer element is not constant

libxt_CONNMARK.c:372: error: (near initialization for 'connmark_tg_reg[1].userspacesize')

make[2]: *** [libxt_CONNMARK.oo] Error 1

make[2]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13/extensions'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13'

make: *** [all] Error 2

 * ERROR: net-firewall/iptables-1.4.13 failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of 'emerge --info =net-firewall/iptables-1.4.13',

 * the complete build log and the output of 'emerge -pqv =net-firewall/iptables-1.4.13'.

 * The complete build log is located at '/var/tmp/portage/net-firewall/iptables-1.4.13/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-firewall/iptables-1.4.13/temp/environment'.

 * S: '/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13'

>>> Failed to emerge net-firewall/iptables-1.4.13, Log file:

>>>  '/var/tmp/portage/net-firewall/iptables-1.4.13/temp/build.log'

 * Messages for package net-firewall/iptables-1.4.13:

 * ERROR: net-firewall/iptables-1.4.13 failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of 'emerge --info =net-firewall/iptables-1.4.13',

 * the complete build log and the output of 'emerge -pqv =net-firewall/iptables-1.4.13'.

 * The complete build log is located at '/var/tmp/portage/net-firewall/iptables-1.4.13/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-firewall/iptables-1.4.13/temp/environment'.

 * S: '/var/tmp/portage/net-firewall/iptables-1.4.13/work/iptables-1.4.13'

```

And the emerge --info on it:

```

Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.34-xen-r3 x86_64)

=================================================================

                        System Settings

=================================================================

System uname: Linux-2.6.34-xen-r3-x86_64-Intel-R-_Xeon-R-_CPU_E5645_@_2.40GHz-with-gentoo-1.12.14

Timestamp of tree: Wed, 25 Jul 2012 20:45:01 +0000

distcc 3.1 x86_64-pc-linux-gnu [disabled]

app-shells/bash:          4.1_p7

dev-java/java-config:     2.1.11-r1

dev-lang/python:          2.6.6-r1, 3.1.2-r4

dev-util/cmake:           2.8.1-r2

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      1.12.14-r1

sys-apps/sandbox:         2.4

sys-devel/autoconf:       2.68

sys-devel/automake:       1.10.3, 1.11.1

sys-devel/binutils:       2.20.1-r1

sys-devel/gcc:            4.3.4, 4.4.4-r2

sys-devel/gcc-config:     1.4.1

sys-devel/libtool:        2.2.10

sys-devel/make:           3.81-r2

sys-kernel/linux-headers: 2.6.30-r1 (virtual/os-headers)

sys-libs/glibc:           2.11.2-r3

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://mirrors.rit.edu/gentoo/ http://gentoo.osuosl.org/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd readline session sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

```

Any ideas how to fix it?

----------

## slugggerzzz

We need ...

```
/var/tmp/portage/net-firewall/iptables-1.4.13/temp/build.log
```

----------

## Thistled

A totally bonkers thing to ask, but is iptables configured in the Kernel?

----------

## wcg

linux-headers version? (Looks like a classic "#include something.h" header error

at first glance, where the "something.h" is missing, wrong version, etc.)

Try this:

```

(emerge -Dp iptables) 2>&1 | tee iptables.list

```

Then look at the list and see if it wants to install

anything besides iptables itself.

----------

## chiefbag

I'm having a similar issue while trying to update iptables.

What course of action should I take?

```
These are the packages that would be merged, in order:

Calculating dependencies  ..... done!

[ebuild  N     ] virtual/os-headers-0

[ebuild     U  ] net-firewall/iptables-1.4.16.3 [1.4.3.2] USE="ipv6%* -netlink% -static-libs%"

 * IMPORTANT: 12 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

```

EDIT

Assuming I just 

```
emerge virtual/os-headers
```

And it should not effect anything else?

----------

## chiefbag

```
emerge virtual/os-headers
```

Did not resolve the issue.

Here is the emerge info from iptables.

```
emerge --info iptables

Portage 2.1.11.9 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686)

=================================================================

                        System Settings

=================================================================

System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Xeon-R-_CPU_E5440_@_2.83GHz-with-gentoo-2.1

Timestamp of tree: Thu, 29 Nov 2012 02:00:01 +0000

app-shells/bash:          4.0_p28

dev-lang/python:          2.4.4-r13, 2.5.4-r2, 2.6.2-r1, 2.7.3-r2

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.27.1

sys-apps/baselayout:      2.1-r1

sys-apps/openrc:          0.9.8.4

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.68

sys-devel/automake:       1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11.1

sys-devel/binutils:       2.20.1-r1

sys-devel/gcc:            4.1.2, 4.3.4

sys-devel/gcc-config:     1.4.1

sys-devel/libtool:        2.2.10

sys-devel/make:           3.81

sys-kernel/linux-headers: 2.6.27-r2 (virtual/os-headers)

sys-libs/glibc:           2.9_p20081201-r2

Repositories: gentoo

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -march=i686 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -march=i686 -pipe"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en_GB en"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre pppd readline session ssl tcpd unicode x86 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="mod_python mod_cgi mod_ftpd proxy proxy_html proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================

                        Package Settings

=================================================================

net-firewall/iptables-1.4.3.2 was built with the following:

USE=""

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

LDFLAGS="-Wl,-O1"

```

----------

## chiefbag

Re-visited issue, as it turned out on the particular box I was using it was a virtulized machine therefore it had no kernel installed or config locally.

Compiled a kernel with required settings and rebooted unsing a pv kernel from the hypervisor.

Still had issues but emerging Linux headers solved the iptables complie problem as mentioned by wcg.

```
emerge -va sys-kernel/linux-headers
```

----------

