Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32778 - iptables-1.2.9 cannot be built with current gentoo-sources 2.4.20-r8
Summary: iptables-1.2.9 cannot be built with current gentoo-sources 2.4.20-r8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
: 33099 33935 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-05 01:18 UTC by Andreas Kobara
Modified: 2004-02-27 14:35 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
updated route patch to include in patches-2.4.20-gentoo-r5 -> r9 (727_iptables-ROUTE,13.00 KB, patch)
2003-11-08 02:30 UTC, Andreas Kobara
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kobara 2003-11-05 01:18:11 UTC
To ebuild iptables-1.2.9 you need to have a kernel with netfilter/patch-o-matic/extra/ROUTE.patch version 1.7 installed.

Current gentoo-sources-2.4.20-r8 have the version 1.5 ROUTE.patch and
lack the "flags" member in the ipt_route_target_info structure.


/var/tmp/portage/iptables-1.2.9/work/iptables-1.2.9/extensions/libipt_ROUTE.c
...
init(struct ipt_entry_target *t, unsigned int *nfcache)
{
        struct ipt_route_target_info *route_info =
                (struct ipt_route_target_info*)t->data;
 
        route_info->oif[0] = '\0';
        route_info->iif[0] = '\0';
        route_info->gw = 0;
        route_info->flags = 0;
}


BUILD error:
extensions/libipt_ROUTE.c: In function `init':
extensions/libipt_ROUTE.c:51: error: structure has no member named `flags'
extensions/libipt_ROUTE.c: In function `parse':
extensions/libipt_ROUTE.c:138: error: structure has no member named `flags'
extensions/libipt_ROUTE.c:138: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)
extensions/libipt_ROUTE.c:138: error: (Each undeclared identifier is reported only once
extensions/libipt_ROUTE.c:138: error: for each function it appears in.)
extensions/libipt_ROUTE.c: In function `print':
extensions/libipt_ROUTE.c:186: error: structure has no member named `flags'
extensions/libipt_ROUTE.c:186: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)
extensions/libipt_ROUTE.c: In function `save':
extensions/libipt_ROUTE.c:209: error: structure has no member named `flags'
extensions/libipt_ROUTE.c:209: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)
make: *** [extensions/libipt_ROUTE_sh.o] Error 1

SOLUTION: Update to gentoo-sources-2.4.20-r9 ?

Regards,
Andy.
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-11-05 08:07:45 UTC
*** Bug 32734 has been marked as a duplicate of this bug. ***
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2003-11-07 13:54:15 UTC
Can we have a confirmation of whether the route patch [version 1.7 / version
1.8] would work if you just replace the one in the Gentoo patches tarball,
that it patches correctly, compiles correctly, and that iptables would as
a result compile correctly?
Comment 3 Andreas Kobara 2003-11-08 02:30:41 UTC
Created attachment 20414 [details, diff]
updated route patch to include in patches-2.4.20-gentoo-r5 -> r9

confirmed. It works.

We need to add the newer 727_iptables-ROUTE patch to the current
patches-2.4.20-gentoo-r5 archive and call it patches-2.4.20-gentoo-r9
and we have to make sure, that the kernel sources for 2.4.20-gentoo-r9
are installed and (compiled ?) otherwise iptables ROUTE target will
not work, but it will compile at least.
(An einfo reminder should be enough.)

If the kernel is not configure to build iptables_ROUTE, iptables-1.2.9
will compile cleanly without it. Just to mention for the confused. ;-)

Another approach would be to modifiy the target list for iptables
and remove the ROUTE target if a kernel < 2.4.22 is found ?

Regards,
Andy.
Comment 4 Michael 2003-11-08 18:41:12 UTC
What exactly do I do with this attachment? I'm kinda a newbie to Linux, and
very newbie to Gentoo, but I feel kinda proud that I got it running on the
first try! Now I think Andy gave the directions to get it working, but it
sounds alittle crypic to me, sorry, but could someone simplify it alittle
for me?

Thank you very much, I hope to one day help smash bugs as well!

*Gangsigns*
Michael
Comment 5 SpanKY gentoo-dev 2003-11-09 13:29:57 UTC
*** Bug 33099 has been marked as a duplicate of this bug. ***
Comment 6 Marcus J. van Dijk, Jr. 2003-11-14 01:48:00 UTC
I would also like to know what happens now?
Comment 7 Michael Hill 2003-11-14 09:49:35 UTC
I'm pretty much still a Gentoo n00b, having done two installations so far (SPARC SMP, i686)...  I can see two main possibilities for a fix:

1.  Release gentoo-sources 2.4.20-r9 with the correct patch, such that emerge sync will pick it up and emerge -u system will build it;

2.  At least mask it properly, so that if you have gentoo-sources 2.4.20-r8, emerge -u system will not try to build iptables-1.2.9 .

Could we please get an ETA for either one of these (or another satisfactory option that will let the system appear up-to-date when emerge -u is run)?

Thank you.
Comment 8 Andrei Ivanov 2003-11-17 01:19:46 UTC
Is it just me, or bugs in gentoo seem to take longer and longer to get fixed ??
Comment 9 Marcus J. van Dijk, Jr. 2003-11-17 02:45:47 UTC
There are more Gentoo users every day and not that many developers. Maybe there will be a freeze soon?
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2003-11-17 08:35:54 UTC
In CVS as -r8, so just update your portage trees and merge a fresh copy of gentoo-sources. Thanks.
Comment 11 Michael Hill 2003-11-18 11:07:04 UTC
"net-firewall/iptables-1.2.9 merged."

Thank you, thank you, thank you!  :^)
Comment 12 SpanKY gentoo-dev 2003-11-20 08:31:49 UTC
*** Bug 33935 has been marked as a duplicate of this bug. ***
Comment 13 Philipp Kern 2003-11-21 06:43:27 UTC
Build doesn't work with -gentoo-r8.
Same problem as stated.
Comment 14 Marcus J. van Dijk, Jr. 2003-11-21 08:48:00 UTC
Confirmed by me -- reopen plz.
Comment 15 Tim Yamin (RETIRED) gentoo-dev 2003-11-21 08:58:32 UTC
Can I have the 'md5sum' of ipt_ROUTE.h and the 'md5sum' of ipt_ROUTE.c please in your kernel tree?
Comment 16 Philipp Kern 2003-11-21 09:01:22 UTC
Sun Nov 16 19:56:59 2003 gentoo-sources-2.4.20-r8 has been merged.
Should be with the patch.

phil@thrall netfilter_ipv4 $ grep "ipt_route_target_info" *
ipt_ROUTE.h:struct ipt_route_target_info {

phil@thrall netfilter_ipv4 $ md5sum ipt_ROUTE.h 
c4fbef0e8e779ff6def416221ee7d52b  ipt_ROUTE.h

As far as I can see the patch is applied, but the problem still persists.

Bye,
phil
Comment 17 Marcus J. van Dijk, Jr. 2003-11-21 09:01:53 UTC
c4fbef0e8e779ff6def416221ee7d52b  ipt_ROUTE.h
a19d2c095696e96b57462cb346171472  ipt_ROUTE.c
Comment 18 Tim Yamin (RETIRED) gentoo-dev 2003-11-21 09:31:35 UTC
"ipt_route_target_info" was and will be there. I just checked the patch out just incase somebody modified it and "emerge sync"'ed, and the md5sums you should get after merging gentoo-sources are:-

91d6508b7b89595655b95f4184e66b86 [ ipt_ROUTE.h ]
859d50482f249f58d6f42680947eb368 [ ipt_ROUTE.c ]

Thus, * please run emerge sync and then remerge gentoo-sources *. If you experience the same problem, please tell us which mirror you are using and switch rsync mirrors please.
Comment 19 Philipp Kern 2003-11-21 10:28:58 UTC
Ok got the new file.
I guess it would work now, thank you.
Comment 20 Blu3 2003-11-29 21:49:21 UTC
Doesn't seem to work as advertised. Sync'd and the files exist and md5sums match comment #18.

-r8 is the latest available on mirrors as of 11/30.

powerix src # find linux-2.4.20-gentoo-r8 -name 'ipt_ROUTE.*' -exec md5sum {} \;
859d50482f249f58d6f42680947eb368  linux-2.4.20-gentoo-r8/net/ipv4/netfilter/ipt_ROUTE.c
91d6508b7b89595655b95f4184e66b86  linux-2.4.20-gentoo-r8/include/linux/netfilter_ipv4/ipt_ROUTE.h

iptables still fails to compile:

gcc -march=pentium3 -O3 -pipe -Iinclude -Wall -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: error: structure has no member named `flags'
extensions/libipt_ROUTE.c: In function `parse':
extensions/libipt_ROUTE.c:138: error: structure has no member named `flags'
extensions/libipt_ROUTE.c:138: error: `IPT_ROUTE_CONTINUE' undeclared (first use in this function)
extensions/libipt_ROUTE.c:138: error: (Each undeclared identifier is reported only once
extensions/libipt_ROUTE.c:138: error: for each function it appears in.)

[...]
and so on
Comment 21 Tim Yamin (RETIRED) gentoo-dev 2003-11-30 05:24:59 UTC
Strange. Can you check include/linux/netfilter_ipv4/ipt_ROUTE.h and see whether "u_int8_t flags;" is there?
Comment 22 Andrew Gaffney (RETIRED) gentoo-dev 2004-02-27 14:07:36 UTC
I am currently getting this compile error with 1.2.9 against gs-sources-2.4.25_pre6.
Comment 23 Andrew Gaffney (RETIRED) gentoo-dev 2004-02-27 14:35:21 UTC
Nevermind. I had forgotten to update my /usr/src/linux symlink.