Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159371 - net-firewall/ebtables doesn't compile against linux-headers-2.6.19 because of missing linux/config.h
Summary: net-firewall/ebtables doesn't compile against linux-headers-2.6.19 because of...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords:
: 186240 188774 (view as bug list)
Depends on:
Blocks: sane-linux-headers
  Show dependency tree
 
Reported: 2006-12-29 06:05 UTC by David Pufer
Modified: 2007-08-17 16:20 UTC (History)
2 users (show)

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


Attachments
include linux/config.h only when __KERNEL__ defined (ebtables-fix-linux-config-h-error.patch,1.04 KB, patch)
2007-01-14 18:29 UTC, Richard Benjamin Voigt
Details | Diff
fixed ebuild, place in portage overlay (ebtables-2.0.6-r1.ebuild,1.17 KB, text/plain)
2007-01-14 18:33 UTC, Richard Benjamin Voigt
Details
makefile patch (ebtables-v2.0.8-1-Makefile.patch,608 bytes, text/plain)
2007-07-26 19:34 UTC, Jochen Schlick
Details
more or less experimental 2.0.8.1 ebuild (ebtables-2.0.8.1.ebuild,1.31 KB, text/plain)
2007-07-28 17:22 UTC, Jochen Schlick
Details
2.0.8-1 makefile patch (ebtables-v2.0.8-1-Makefile.patch,608 bytes, patch)
2007-07-28 17:23 UTC, Jochen Schlick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Pufer 2006-12-29 06:05:24 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; cs; rv:1.8.1.1) Gecko/20061221 BonEcho/2.0.0.1
Build Identifier: 

The linux/config.h has been removed from Linux Kernel >=2.6.19 by kernel
developers, some packages unfortunately rely on it including ebtables.
The emerge attempt therefore looks like this

>>> Compiling source in
/var/tmp/portage/net-firewall/ebtables-2.0.6-r1/work/ebtables-v2.0.6 ...
i686-pc-linux-gnu-gcc -Wall -Wunused -DPROGVERSION=\"2.0.6\"
-DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\"
-D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o getethertype.o getethertype.c
-Iinclude/
i686-pc-linux-gnu-gcc -Wall -Wunused -DPROGVERSION=\"2.0.6\"
-DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\"
-D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o ebtables.o ebtables.c -Iinclude/
In file included from include/linux/netfilter_bridge/ebtables.h:17,
                 from include/ebtables_u.h:27,
                 from ebtables.c:30:
include/linux/netfilter_bridge.h:7:26: error: linux/config.h: No such file or
directory
ebtables.c: In function 'list_em':
ebtables.c:583: warning: pointer targets in passing argument 1 of
'print_mac_and_mask' differ in signedness
ebtables.c:583: warning: pointer targets in passing argument 2 of
'print_mac_and_mask' differ in signedness
ebtables.c:590: warning: pointer targets in passing argument 1 of
'print_mac_and_mask' differ in signedness
ebtables.c:590: warning: pointer targets in passing argument 2 of
'print_mac_and_mask' differ in signedness
ebtables.c: In function 'main':
ebtables.c:2192: warning: pointer targets in passing argument 2 of
'get_mac_and_mask' differ in signedness
ebtables.c:2192: warning: pointer targets in passing argument 3 of
'get_mac_and_mask' differ in signedness
ebtables.c:2207: warning: pointer targets in passing argument 2 of
'get_mac_and_mask' differ in signedness
ebtables.c:2207: warning: pointer targets in passing argument 3 of
'get_mac_and_mask' differ in signedness
make: *** [ebtables.o] Error 1

!!! ERROR: net-firewall/ebtables-2.0.6-r1 failed.
Call stack:
  ebuild.sh, line 1580:   Called dyn_compile
  ebuild.sh, line 945:   Called src_compile
  ebtables-2.0.6-r1.ebuild, line 22:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.


Reproducible: Always

Steps to Reproduce:
Comment 1 Richard Benjamin Voigt 2007-01-14 18:29:37 UTC
Created attachment 106979 [details, diff]
include linux/config.h only when __KERNEL__ defined

ebtables doesn't need linux/config.h anyway, move the #include inside the existing conditional for kernel builds
Comment 2 Richard Benjamin Voigt 2007-01-14 18:33:36 UTC
Created attachment 106980 [details]
fixed ebuild, place in portage overlay

Proposed updated ebuild
Comment 3 Richard Benjamin Voigt 2007-01-14 18:34:38 UTC
Please verify this patch and forward it upstream.  Thanks.
Comment 4 Richard Benjamin Voigt 2007-01-14 18:40:19 UTC
(In reply to comment #3)
> Please verify this patch and forward it upstream.  Thanks.
> 

On second thought, maybe there's no need.  I checked that file in the 2.6.19 kernel and it no longer includes linux/config.h.... so I guess upstream will have this fixed when they update to the latest kernel headers.
Comment 5 David Pufer 2007-01-15 22:58:45 UTC
Thanks for the patch. Compilation is now OK. It seems upstream is going to release new verison of ebtables-2.0.8 independent of linux/config.h soon.
Comment 6 solar (RETIRED) gentoo-dev 2007-01-16 00:12:15 UTC
Please file a new bug when ebtables-2.0.8 is released
Comment 7 Richard Benjamin Voigt 2007-01-20 06:22:02 UTC
Could the patch be included in portage, since ebtables 2.0.6-r1 is marked stable but isn't useable on uclibc?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-07-22 15:55:10 UTC
*** Bug 186240 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-07-22 15:56:17 UTC
Reopen, this breaks stable tree.
Comment 10 Jochen Schlick 2007-07-26 18:55:48 UTC
The latest stable userspace release is version 2.0.8-1, released on May 29, 2007  but it doesn't build :-( with gcc on AMD64 (gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4))

....
ld -shared -soname libebtc.so -o libebtc.so -lc getethertype.o communication.o libebtc.o useful_functions.o ebtables.o
ld: ebtables.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
ebtables.o: could not read symbols: Bad value
make: *** [libebtc] Error 1
Comment 11 Jochen Schlick 2007-07-26 19:34:55 UTC
Created attachment 126094 [details]
makefile patch

this fixes at least the gcc4.2 linker issue
Comment 12 Jochen Schlick 2007-07-28 17:22:34 UTC
Created attachment 126245 [details]
more or less experimental 2.0.8.1 ebuild
Comment 13 Jochen Schlick 2007-07-28 17:23:57 UTC
Created attachment 126246 [details, diff]
2.0.8-1 makefile patch
Comment 14 Peter Volkov (RETIRED) gentoo-dev 2007-08-12 10:45:22 UTC
ebtables-2.8.0.1, now in portage and seems to compile with sys-kernel/linux-headers-2.6.21. I suppose it works with 2.6.19 too. Reopen, please, if I missed anything here. Thank you all for your work!
Comment 15 Peter Volkov (RETIRED) gentoo-dev 2007-08-14 03:36:32 UTC
*** Bug 188774 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Novak 2007-08-14 05:48:06 UTC
I'm sorry for duplicate, I decided to fill the bug two days after I found it (delayed because packages.gentoo.org was unreachable), at that time, inet-firewall/ebtables-2.0.6-r1 was most recent version and for some reason (maybe bad query), I didn't find any related bug for this package. Thanks for the resolution !
Fix works for me
Comment 17 Jochen Schlick 2007-08-17 16:20:48 UTC
works for me too