Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 162886 - net-firewall/arptables doesn't compile against linux-headers-2.6.19 because of missing linux/config.h
Summary: net-firewall/arptables doesn't compile against linux-headers-2.6.19 because o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 189939
Blocks: sane-linux-headers
  Show dependency tree
 
Reported: 2007-01-20 06:34 UTC by Richard Benjamin Voigt
Modified: 2007-08-29 11:25 UTC (History)
3 users (show)

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


Attachments
include linux/config.h only when __KERNEL__ defined (arptables-fix-linux-config-h-error.patch,312 bytes, patch)
2007-01-20 06:38 UTC, Richard Benjamin Voigt
Details | Diff
fixed ebuild, place in portage overlay (arptables-0.0.3.ebuild,787 bytes, text/plain)
2007-01-20 06:38 UTC, Richard Benjamin Voigt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Benjamin Voigt 2007-01-20 06:34:52 UTC
Just like bug #159371, but for arptables.

Patch coming as soon as I'm assigned a bug number.
Comment 1 Richard Benjamin Voigt 2007-01-20 06:38:19 UTC
Created attachment 107503 [details, diff]
include linux/config.h only when __KERNEL__ defined

arptables doesn't need linux/config.h anyway, make #include conditional on __KERNEL__ as with ebtables
Comment 2 Richard Benjamin Voigt 2007-01-20 06:38:55 UTC
Created attachment 107504 [details]
fixed ebuild, place in portage overlay

Proposed updated ebuild
Comment 3 Richard Benjamin Voigt 2007-01-20 06:40:21 UTC
Patch tested and fixes merge on both uclibc and glibc.

Actually, removing the reference to linux/config.h instead of using conditional might be better, I just didn't know whether arptables would create a patch for 2.4 kernels.  It doesn't look like it.
Comment 4 Richard Benjamin Voigt 2007-01-20 06:41:59 UTC
Looks like linux/config.h is totally gone from netfilter_arp.h in kernel 2.6.19, so probably next release of arptables won't suffer this problem.
Comment 5 SpanKY gentoo-dev 2007-01-20 06:53:17 UTC
really, the build system shouldnt be using those included headers

i'd just as soon do:
rm -rf include/linux
Comment 6 Richard Benjamin Voigt 2007-01-20 22:07:15 UTC
That's a nice idea, but the files provided by linux-headers don't work...

cc -O2 -Wall -Wunused -Iinclude/linux/include/ -Iinclude/ -DARPTABLES_VERSION=\"0.0.3\"  -DIPT_LIB_DIR=\"\" -c -o libarptc/libarptc.o libarptc/libarptc.c
cc -O2 -Wall -Wunused -Iinclude/linux/include/ -Iinclude/ -DARPTABLES_VERSION=\"0.0.3\"    -c -o extensions/arpt_standard.o extensions/arpt_standard.c
In file included from libarptc/libarptc.c:29:
include/libarptc/libarptc.h:55: warning: 'struct arpt_counters' declared inside parameter list
include/libarptc/libarptc.h:55: warning: its scope is only this definition or declaration, which is probably not what you want
include/libarptc/libarptc.h:122: warning: 'struct arpt_counters' declared inside parameter list
In file included from libarptc/libarptc.c:105:
libarptc/libarptc_incl.c: In function 'entry2index':
libarptc/libarptc_incl.c:125: warning: format '%i' expects type 'int', but argument 3 has type 'long int'
libarptc/libarptc_incl.c: In function 'arptc_init':
libarptc/libarptc_incl.c:288: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness
libarptc/libarptc_incl.c: At top level:
In file included from include/arptables.h:5,
                 from arptables-standalone.c:38:
include/libarptc/libarptc.h:55: warning: 'struct arpt_counters' declared inside parameter list
include/libarptc/libarptc.h:55: warning: its scope is only this definition or declaration, which is probably not what you want
include/libarptc/libarptc.h:122: warning: 'struct arpt_counters' declared inside parameter list
In file included from arptables-standalone.c:38:
include/arptables.h:118: error: expected identifier or '(' before numeric constant
In file included from include/arptables.h:5,
                 from extensions/arpt_standard.c:8:
include/libarptc/libarptc.h:55: warning: 'struct arpt_counters' declared inside parameter listlibarptc/libarptc_incl.c:650: error: conflicting types for 'arptc_get_policy'
include/libarptc/libarptc.h:55: error: previous declaration of 'arptc_get_policy' was here
libarptc/libarptc_incl.c: In function 'arptc_get_policy':
libarptc/libarptc_incl.c:662: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c: In function 'arptc_read_counter':
libarptc/libarptc_incl.c:1242: warning: return from incompatible pointer type
libarptc/libarptc_incl.c: In function 'arptc_set_counter':
libarptc/libarptc_incl.c:1314: error: invalid application of 'sizeof' to incomplete type 'struct arpt_counters'
libarptc/libarptc_incl.c: At top level:

include/libarptc/libarptc.h:55: warning: its scope is only this definition or declaration, which is probably not what you want
include/libarptc/libarptc.h:122: warning: 'struct arpt_counters' declared inside parameter list
In file included from extensions/arpt_standard.c:8:
include/arptables.h:118: error: expected identifier or '(' before numeric constant
libarptc/libarptc_incl.c:1511: error: conflicting types for 'arptc_set_policy'
include/libarptc/libarptc.h:122: error: previous declaration of 'arptc_set_policy' was here
libarptc/libarptc_incl.c: In function 'arptc_set_policy':
libarptc/libarptc_incl.c:1549: error: invalid application of 'sizeof' to incomplete type 'struct arpt_counters'
libarptc/libarptc_incl.c: In function 'subtract_counters':
libarptc/libarptc_incl.c:1575: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c:1575: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c:1575: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c:1576: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c:1576: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c:1576: error: dereferencing pointer to incomplete type
libarptc/libarptc_incl.c: In function 'arptc_commit':
libarptc/libarptc_incl.c:1588: error: invalid application of 'sizeof' to incomplete type 'struct arpt_counters'
libarptc/libarptc_incl.c:1609: error: invalid application of 'sizeof' to incomplete type 'struct arpt_counters'
libarptc/libarptc_incl.c:1668: warning: excess elements in struct initializer
libarptc/libarptc_incl.c:1668: warning: (near initialization for '(anonymous)')
libarptc/libarptc_incl.c:1668: warning: excess elements in struct initializer
libarptc/libarptc_incl.c:1668: warning: (near initialization for '(anonymous)')
libarptc/libarptc_incl.c:1692: warning: passing argument 1 of 'subtract_counters' from incompatible pointer type
libarptc/libarptc_incl.c:1692: warning: passing argument 2 of 'subtract_counters' from incompatible pointer type
libarptc/libarptc_incl.c:1692: warning: passing argument 3 of 'subtract_counters' from incompatible pointer type
libarptc/libarptc_incl.c:1700: error: invalid application of 'sizeof' to incomplete type 'struct arpt_counters'
In file included from include/arptables.h:5,
                 from arptables.c:42:
include/libarptc/libarptc.h:55: warning: 'struct arpt_counters' declared inside parameter list
include/libarptc/libarptc.h:55: warning: its scope is only this definition or declaration, which is probably not what you want
include/libarptc/libarptc.h:122: warning: 'struct arpt_counters' declared inside parameter list
In file included from arptables.c:42:
include/arptables.h:118: error: expected identifier or '(' before numeric constant
libarptc/libarptc.c: In function 'dump_entry':
libarptc/libarptc.c:136: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type 'u_int64_t'
libarptc/libarptc.c:136: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u_int64_t'
arptables.c:157: error: expected identifier or '(' before numeric constant
arptables.c: In function 'parse_target':
arptables.c:878: warning: format '%i' expects type 'int', but argument 4 has type 'long unsigned int'
make: *** [libarptc/libarptc.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [extensions/arpt_standard.o] Error 1
make: *** [arptables-standalone.o] Error 1
arptables.c: In function 'register_match':
arptables.c:1066: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
arptables.c: In function 'register_target':
arptables.c:1096: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
arptables.c: In function 'print_num':
[snip scanf warnings]
arptables.c: In function 'print_header':
arptables.c:1136: error: storage size of 'counters' isn't known
arptables.c:1136: warning: unused variable 'counters'
arptables.c: In function 'print_firewall':
[snip signedness warnings]
arptables.c:1374: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
arptables.c: In function 'do_command':
arptables.c:1788: error: invalid lvalue in assignment
[snip signedness warnings]
arptables.c:2162: warning: format '%llu' expects type 'long long unsigned int *', but argument 3 has type 'u_int64_t *'
arptables.c:2167: warning: format '%llu' expects type 'long long unsigned int *', but argument 3 has type 'u_int64_t *'
make: *** [arptables.o] Error 1
Comment 7 SpanKY gentoo-dev 2007-01-24 05:19:10 UTC
then you fix that, you dont hack at local cruft that bitrots
Comment 8 Jakub Novak 2007-08-14 00:32:20 UTC
I had the same problem, also applicable to net-firewall/ebtables-2.0.6-r1 , i filed bug #188774 incl. hack-ish solution which I done successfuly for arptables too.
Comment 9 Richard Benjamin Voigt 2007-08-14 01:43:26 UTC
Jakub, I already posted a patch when I first filed this bug.  Just seems that the maintainer isn't interested in making the e-build compile if using my short patch is required.
Comment 10 Peter Volkov (RETIRED) gentoo-dev 2007-08-14 03:53:24 UTC
Richard, Jakub, sorry for delay. I'm just about to fix the issue. Current CVS version compiles fine and has solution very similar to what SpanKY suggested and this solution seem much better for me. Upstream is responsive, so I mailed them so may be they'll roll out new release, together with patches for build system I've sent them. So now I'm going to wait for their answer not longer for one week and either take CVS version or receive some information from upstream and then depends on answer. In any case this bug will resolved very soon.
Comment 11 Peter Volkov (RETIRED) gentoo-dev 2007-08-29 11:25:35 UTC
And finally arptables-0.0.3.3 is in portage and it fixes this issue.