# iptables

## InAt!QuE

Hi,

I did emerge -k iptables and i got an error during compiling:

```
make: *** [extensions/libipt_ROUTE_sh.o] Error 1

!!! ERROR: net-firewall/iptables-1.2.9 failed.

!!! Function src_compile, Line 53, Exitcode 2

!!! (no error message)
```

how come and how to solve?? Anybody knows?

----------

## nevynxxx

did you try without the -k? maybe it can't find the binary packages it needs to, what does 

```
emerge -pv iptables
```

 give you?

----------

## InAt!QuE

```
emerge -pv iptables

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] net-firewall/iptables-1.2.9  -ipv6
```

did emerge iptables, without the "-k" and got also the same error

BTW: What's the exact difference between emerge ebuild / emerge -k ebuild ??

----------

## dreamer

 *InAt!QuE wrote:*   

> 
> 
> <snip>
> 
> BTW: What's the exact difference between emerge ebuild / emerge -k ebuild ??

 

```
 --usepkg (-k)

              Tells  emerge  to use binary packages (from $PKGDIR) if they are

              available, thus possibly avoiding some time-consuming  compiles.

              This   option   is  useful  for  CD  installs;  you  can  export

              PKGDIR=/mnt/cdrom/packages and then  use  this  option  to  have

              emerge  "pull"  binary  packages from the CD in order to satisfy

              dependencies.

```

iptables 1.2.8 worked fine for you?

----------

## InAt!QuE

 *dreamer wrote:*   

> 
> 
> iptables 1.2.8 worked fine for you?

 

I didn't have 1.2.8 .. first time iptables install   :Wink: 

----------

## kaffeen

I am receiving the same error when trying to 'emerge iptables'. I have attempted to do so with both the gentoo-sources-2.4.20-r6 and gentoo-dev-sources-2.6.1 kernels. My only success was in copying the tbz2 packaged from the LiveCD and doing a binary emerge 'emerge -k iptables-1.2.8-r1.tbz2'. 

I was able to emerge iptables-1.2.9 on my other pc a week or so ago without any problems but shortly after that,  have not been able to successfully build it on my other pc.

----------

## InAt!QuE

could this be a kernel issue ??

----------

## go2sleep

Iptables care about kernel config when iptable is compiling.

So if you are not sure about your kernel configuration you can check by reading this page : http://www.shorewall.net/kernel.htm. On it there are nice screenshot of kernel configuration.

I used that way for setting up my kernel configuration.

And it work fine.

Just one thing, if you are using lilo as boot loader, after compyling your kernel and espacialy after copying you bzImage file to the /boot directory, don't forget to run the /sbin/lilo command for refreshing the lilo loader. If you don't do that your new kernel configuration will not be loaded when you will reboot your computer.

----------

## kaffeen

I am getting the same error with two different kernels (see above post). 

I am using grub rather than lilo and am not aware of any changes (beyond editing the grub.conf file) that I would have to make once I've built a new kernel and copied the bzImage to /boot. 

Having been a little more than frustrated by this and iptables v1.2.8 not working at all, I didn't notice this before. When iptables 1.2.9 is compiling, it is always failing when configuring Conntrack. I don't recall at this momen the exact line before I get the same error message posted in the original post of this thread. When I get home, I will try building a kernel without conntrack support and see if it can then compile iptables-1.2.9.

----------

## TheCoop

whats in the 6 or so lines above the error msg you posted? ideally post everything below the last line starting with 'gcc'

----------

## InAt!QuE

 *TheCoop wrote:*   

> whats in the 6 or so lines above the error msg you posted? ideally post everything below the last line starting with 'gcc'

 

This is more:

```
gcc -O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe -Iinclude -W all -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_NETLINK_sh.o -c extensions/libipt_NETLINK.c

ld -shared -o extensions/libipt_NETLINK.so extensions/libipt_NETLINK_sh.o

gcc -O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe -Iinclude -W all -Wunused -I/usr/src/linux/include  - DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_ROUTE_sh.o -c extensions/libipt_ROUTE.c

extensions/libipt_ROUTE.c: In function `init':

extensions/libipt_ROUTE.c:51: structure has no member named `flags'

extensions/libipt_ROUTE.c: In function `parse':

extensions/libipt_ROUTE.c:138: structure has no member named `flags'

extensions/libipt_ROUTE.c:138: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)

extensions/libipt_ROUTE.c:138: (Each undeclared identifier is reported only once

extensions/libipt_ROUTE.c:138: for each function it appears in.)

extensions/libipt_ROUTE.c: In function `print':

extensions/libipt_ROUTE.c:186: structure has no member named `flags'

extensions/libipt_ROUTE.c:186: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)

extensions/libipt_ROUTE.c: In function `save':

extensions/libipt_ROUTE.c:209: structure has no member named `flags'

extensions/libipt_ROUTE.c:209: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)

make: *** [extensions/libipt_ROUTE_sh.o] Error 1

!!! ERROR: net-firewall/iptables-1.2.9 failed.

!!! Function src_compile, Line 53, Exitcode 2

!!! (no error message)
```

Running 2.6.1 kernel ... gentoo-dev-sources

----------

## InAt!QuE

 *go2sleep wrote:*   

> Iptables care about kernel config when iptable is compiling.
> 
> So if you are not sure about your kernel configuration you can check by reading this page : http://www.shorewall.net/kernel.htm. On it there are nice screenshot of kernel configuration.
> 
> I used that way for setting up my kernel configuration.
> ...

 

Ok I'll guess the problem is in my kernel...  because I don't have all the settings like the screenie you showed... I'll recompile it and try it again.

----------

## friction

Having the same problem while trying to upgrade from 1.2.8-r1 on two different machines, but both using conntrack.

----------

## kaffeen

I was getting the same error when trying to emerge iptables 1.2.9. However, my /usr/src/linux symlink was pointing to my original kernel source, not my current. I delete the symlink and created a new one pointing to the new kernel source

```
ln -sf /usr/src/linux-2.6.1-gentoo /usr/src/linux
```

and it was able to build iptables 1.2.9 successfully after that.

----------

