Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error emerging iptables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Cqwense
n00b
n00b


Joined: 28 Nov 2003
Posts: 52

PostPosted: Mon Feb 09, 2004 9:09 am    Post subject: Error emerging iptables Reply with quote

Well first i'd like to point out that I have seen lots of posts around these boards with similer if not exact to my problem.

Every Time i attempt to emerge iptables i get the same error:

Code:

make: *** [iptables.o] Error 1

!!!Function src_compile, Line 53, Exitcode 2


I have attempted the install using kernel versions 2.4.20-gentoo-r3, 2.6.1, and 2.6.2-gentoo ( although due to a wireless card support problem, the only viable option is 2.6.2-gentoo )

I have also tried using iptables versions 1.2.9 and 1.2.8.

Just to avoid non-applicable solutions to this problem ( ie ones people have posted as fixing the problem, but i have all ready tried)

ACCEPT_KEYWORDS="~x86" emerge iptables

updating to a 2.6 kernel version

deleting appropriate files in /var/tmp/portage and /usr/portage/distfiles



My make.conf highlights:

Code:


>--snip--<
USE="X gtk -kde apache2 berkdb qt samba xml xm12 -gnome -alsa"
>--snip--<
CFLAGS="-march=pentium2"


At this point I am at a loss of ideas, any and all help will give good karma

Thx
Back to top
View user's profile Send private message
miunk
Apprentice
Apprentice


Joined: 24 Sep 2002
Posts: 199

PostPosted: Tue Feb 10, 2004 12:14 am    Post subject: Reply with quote

We need more than that.. What is above the error? Have you compile iptables support into the kernel?
Back to top
View user's profile Send private message
kaffeen
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2004
Posts: 139
Location: The Frozen North

PostPosted: Tue Feb 10, 2004 4:28 am    Post subject: Reply with quote

I had the same error with three different kernels. In order to resolve it, I had to remove the /usr/src/linux symlink and create a new symlink pointing to my current kernel source.
Back to top
View user's profile Send private message
Gold Fish
n00b
n00b


Joined: 10 Feb 2004
Posts: 40

PostPosted: Tue Feb 10, 2004 7:42 pm    Post subject: Reply with quote

kaffeen wrote:
I had the same error with three different kernels. In order to resolve it, I had to remove the /usr/src/linux symlink and create a new symlink pointing to my current kernel source.


I am a noob, how do you do that?

~Gold Fish
Back to top
View user's profile Send private message
Gold Fish
n00b
n00b


Joined: 10 Feb 2004
Posts: 40

PostPosted: Tue Feb 10, 2004 9:25 pm    Post subject: Reply with quote

okay, I figured out how to get past my problem. Instead of doing a "emerge world" I do a "emerge -uD world" which follows all dependence also.
Back to top
View user's profile Send private message
Cqwense
n00b
n00b


Joined: 28 Nov 2003
Posts: 52

PostPosted: Fri Feb 13, 2004 5:48 pm    Post subject: Reply with quote

Sorry for taking so long to reply, this is my first successful ( well almost ) linux box, and i tend to screw things up that take a day or three to repair :)

The full error msg:

Code:


 from /usr/src/linux/include/linux/bitops.h:4,
                 from /usr/src/linux/include/linux/netfilter_ipv4/ip_conntrack.h:9,
                 from /usr/src/linux/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
                 from extensions/libipt_SNAT.c:9:
/usr/src/linux/include/linux/compiler-gcc3.h:17:1: warning: "__attribute_used__" redefined
In file included from /usr/include/features.h:295,
                 from /usr/include/stdio.h:28,
                 from extensions/libipt_SNAT.c:2:
/usr/include/sys/cdefs.h:192:1: warning: this is the location of the previous definition
In file included from /usr/src/linux/include/linux/compiler.h:16,
                 from /usr/src/linux/include/asm/bitops.h:9,
                 from /usr/src/linux/include/linux/bitops.h:4,
                 from /usr/src/linux/include/linux/netfilter_ipv4/ip_conntrack.h:9,
                 from /usr/src/linux/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
                 from extensions/libipt_SNAT.c:9:
/usr/src/linux/include/linux/compiler-gcc3.h:22:1: warning: "__attribute_pure__" redefined
In file included from /usr/include/features.h:295,
                 from /usr/include/stdio.h:28,
                 from extensions/libipt_SNAT.c:2:
/usr/include/sys/cdefs.h:183:1: warning: this is the location of the previous definition
ld -shared -o extensions/libipt_SNAT.so extensions/libipt_SNAT_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_TARPIT_sh.o -c extensions/libipt_TARPIT.c
ld -shared -o extensions/libipt_TARPIT.so extensions/libipt_TARPIT_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_TCPMSS_sh.o -c extensions/libipt_TCPMSS.c
ld -shared -o extensions/libipt_TCPMSS.so extensions/libipt_TCPMSS_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_TOS_sh.o -c extensions/libipt_TOS.c
ld -shared -o extensions/libipt_TOS.so extensions/libipt_TOS_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_TRACE_sh.o -c extensions/libipt_TRACE.c
ld -shared -o extensions/libipt_TRACE.so extensions/libipt_TRACE_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_TTL_sh.o -c extensions/libipt_TTL.c
ld -shared -o extensions/libipt_TTL.so extensions/libipt_TTL_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_ULOG_sh.o -c extensions/libipt_ULOG.c
ld -shared -o extensions/libipt_ULOG.so extensions/libipt_ULOG_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libipt_recent_sh.o -c extensions/libipt_recent.c
ld -shared -o extensions/libipt_recent.so extensions/libipt_recent_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_eui64_sh.o -c extensions/libip6t_eui64.c
ld -shared -o extensions/libip6t_eui64.so extensions/libip6t_eui64_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_hl_sh.o -c extensions/libip6t_hl.c
ld -shared -o extensions/libip6t_hl.so extensions/libip6t_hl_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_icmpv6_sh.o -c extensions/libip6t_icmpv6.c
ld -shared -o extensions/libip6t_icmpv6.so extensions/libip6t_icmpv6_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_length_sh.o -c extensions/libip6t_length.c
ld -shared -o extensions/libip6t_length.so extensions/libip6t_length_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_limit_sh.o -c extensions/libip6t_limit.c
ld -shared -o extensions/libip6t_limit.so extensions/libip6t_limit_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_mac_sh.o -c extensions/libip6t_mac.c
ld -shared -o extensions/libip6t_mac.so extensions/libip6t_mac_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_mark_sh.o -c extensions/libip6t_mark.c
ld -shared -o extensions/libip6t_mark.so extensions/libip6t_mark_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_multiport_sh.o -c extensions/libip6t_multiport.c
ld -shared -o extensions/libip6t_multiport.so extensions/libip6t_multiport_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_owner_sh.o -c extensions/libip6t_owner.c
ld -shared -o extensions/libip6t_owner.so extensions/libip6t_owner_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_standard_sh.o -c extensions/libip6t_standard.c
ld -shared -o extensions/libip6t_standard.so extensions/libip6t_standard_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_tcp_sh.o -c extensions/libip6t_tcp.c
ld -shared -o extensions/libip6t_tcp.so extensions/libip6t_tcp_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_udp_sh.o -c extensions/libip6t_udp.c
ld -shared -o extensions/libip6t_udp.so extensions/libip6t_udp_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_HL_sh.o -c extensions/libip6t_HL.c
ld -shared -o extensions/libip6t_HL.so extensions/libip6t_HL_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_LOG_sh.o -c extensions/libip6t_LOG.c
ld -shared -o extensions/libip6t_LOG.so extensions/libip6t_LOG_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_MARK_sh.o -c extensions/libip6t_MARK.c
ld -shared -o extensions/libip6t_MARK.so extensions/libip6t_MARK_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_TRACE_sh.o -c extensions/libip6t_TRACE.c
ld -shared -o extensions/libip6t_TRACE.so extensions/libip6t_TRACE_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_ah_sh.o -c extensions/libip6t_ah.c
ld -shared -o extensions/libip6t_ah.so extensions/libip6t_ah_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_esp_sh.o -c extensions/libip6t_esp.c
ld -shared -o extensions/libip6t_esp.so extensions/libip6t_esp_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_frag_sh.o -c extensions/libip6t_frag.c
ld -shared -o extensions/libip6t_frag.so extensions/libip6t_frag_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_ipv6header_sh.o -c extensions/libip6t_ipv6header.c
ld -shared -o extensions/libip6t_ipv6header.so extensions/libip6t_ipv6header_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_hbh_sh.o -c extensions/libip6t_hbh.c
ld -shared -o extensions/libip6t_hbh.so extensions/libip6t_hbh_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_dst_sh.o -c extensions/libip6t_dst.c
ld -shared -o extensions/libip6t_dst.so extensions/libip6t_dst_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -fPIC -o extensions/libip6t_rt_sh.o -c extensions/libip6t_rt.c
ld -shared -o extensions/libip6t_rt.so extensions/libip6t_rt_sh.o
gcc -march=pentium2 -Iinclude -Wall -Wunused -I/usr/src/linux/include  -DIPTABLES_VERSION=\"1.2.9\"  -DIPT_LIB_DIR=\"/lib/iptables\" -c -o iptables.o iptables.c
iptables.c:153: error: redefinition of `ipt_get_target'
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:294: error: `ipt_get_target' previously defined here
make: *** [iptables.o] Error 1

!!! ERROR: net-firewall/iptables-1.2.9 failed.
!!! Function src_compile, Line 53, Exitcode 2
!!! (no error message)





Since my last post, i have run an emerge -uD world, in the hopes that it might then allow me to emerge iptables, but with no help.

/usr/src/linux is currently pointing to /usr/src/linux-2.6.2-gentoo ( my current kernel source dir)

Iptables support IS enables in my kernel, i have tried both built into the kernel, and as a module, same error.

would be happy to answer more questions, i know theres probably a thousand things i could offer up for information, but i dont know as yet what they are.

Thanks for the replys
Back to top
View user's profile Send private message
Telamon
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2003
Posts: 129

PostPosted: Sun Feb 15, 2004 10:11 am    Post subject: Reply with quote

Update the /usr/src/linux link to point to your 2.6.<whatever> sources and it should work fine.

Ie:
Code:
rm /usr/src/linux
ln -s /usr/src/linux-2.6.2/ /usr/src/linux
Back to top
View user's profile Send private message
Cqwense
n00b
n00b


Joined: 28 Nov 2003
Posts: 52

PostPosted: Sun Feb 15, 2004 3:59 pm    Post subject: Reply with quote

thanks, but /usr/src/linux has been directed at the correct sources for some time now.
Back to top
View user's profile Send private message
Cqwense
n00b
n00b


Joined: 28 Nov 2003
Posts: 52

PostPosted: Mon Feb 16, 2004 10:18 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Tue Feb 17, 2004 9:13 am    Post subject: Reply with quote

Maybe this could be a compiler issue? For me kernel 2.6.x and iptables 1.2.9 has always been working fine. What version of gcc you have? Enlighten us with emerge info.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Cqwense
n00b
n00b


Joined: 28 Nov 2003
Posts: 52

PostPosted: Tue Feb 17, 2004 4:56 pm    Post subject: Reply with quote

Actually I got this one solved ( at least on my end )

I had read many posts saying any version of iptables previous to 1.2.9 would not work in a 2.6 kernel environment. But having run out of my own ideas, i decided to try and emerge 1.2.7a-r3. To my suprise, it emerged without error, to my even greater suprise, it then succesfully loaded, and my gateway worked.

In the interest of giving back to the board community though, I would like to investigate this problem further, so heres my emerge info results:

Code:

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.2-gentoo)
=================================================================
System uname: 2.6.2-gentoo i686 Pentium II (Deschutes)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium2"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://www.gtlib.cc.gatech.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.seren.com/gentoo http://mirror.clarkson.edu/pub/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apache2 apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk gtk2 imlib jpeg libg++ libwww mad mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcpd truetype x86 xml xml2 xmms xv zlib"


In any case im just happy to finally have the rest of my network online. Next comes installing gentoo on my main box, cant wait. Thanks to everyone who offered up help.
Back to top
View user's profile Send private message
mno
Guru
Guru


Joined: 29 Dec 2003
Posts: 454
Location: Toronto, Canada

PostPosted: Sun Jun 13, 2004 2:22 am    Post subject: solution for emerge iptables issues for 2.6 and amd64 Reply with quote

For all those using 2.6 and amd64

As per the last post, I tried the same idea. Except, I couldn't get the previous version to work, so I downloaded iptables-1.2.9-r1 instead. Worked like a charm. Of course, you have to add ACCEPT_KEYWORDS="~amd64" in front of the emerge command, because, at time of writing, 1.2.9-r1 was still flagged with a ~...

Good luck.
_________________
"Hello and goodbye. As always." | You can't use &nbsp; here?? | Unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum