Calling make to compile sys-kernel/hardened-sources-2.6.21-r3 kernel after net-misc/l7-filter-2.12 package has been installed: $make ... CC [M] net/netfilter/xt_mac.o CC [M] net/netfilter/xt_multiport.o CC [M] net/netfilter/xt_pkttype.o CC [M] net/netfilter/xt_state.o CC [M] net/netfilter/xt_layer7.o net/netfilter/xt_layer7.c: In function ‘match_no_append’: net/netfilter/xt_layer7.c:241: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:258: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:259: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:262: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:264: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:265: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:266: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:268: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:275: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:276: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:279: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:285: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:287: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:293: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c: In function ‘add_data’: net/netfilter/xt_layer7.c:303: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:309: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:317: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:324: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:325: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c: In function ‘match’: net/netfilter/xt_layer7.c:441: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:441: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:442: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:476: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:476: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:477: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:478: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:480: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:488: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:493: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:522: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:528: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:530: error: ‘struct nf_conn’ has no member named ‘layer7’ net/netfilter/xt_layer7.c:537: error: ‘struct nf_conn’ has no member named ‘layer7’ make[2]: *** [net/netfilter/xt_layer7.o] Error 1 make[1]: *** [net/netfilter] Error 2 make: *** [net] Error 2 Without l7-filter installed, the kernel compiles with the same configuration without problems.
Created attachment 127062 [details] emerge --info
Not sure if a version bump of l7-filter would help to 2.13 as the minimal release notes for the newer version refer to a bug fix during compilation for 64 bit systems. Could not locate the compiler error it is referring to. Release Notes for 2.13 "Fixed a compiler error in 2.6 for 64 bit systems." Your --info has x86_64, so it might be related or it might just be a long shot.
With hardened-sources-2.6.22 and net-misc/l7-filter-2.13: # cd /usr/src/linux # make menuconfig # emerge -v net-misc/l7-filter These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-misc/l7-filter-2.13 0 kB Total: 1 package (1 new), Size of downloads: 0 kB >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) net-misc/l7-filter-2.13 to / * additional_patch_for_2.6.13.diff RMD160 ;-) ... [ ok ] * additional_patch_for_2.6.13.diff SHA1 ;-) ... [ ok ] * additional_patch_for_2.6.13.diff SHA256 ;-) ... [ ok ] * additional_patch_for_2.6.13.diff size ;-) ... [ ok ] * netfilter-layer7-v2.13.tar.gz RMD160 ;-) ... [ ok ] * netfilter-layer7-v2.13.tar.gz SHA1 ;-) ... [ ok ] * netfilter-layer7-v2.13.tar.gz SHA256 ;-) ... [ ok ] * netfilter-layer7-v2.13.tar.gz size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking netfilter-layer7-v2.13.tar.gz ;-) ... [ ok ] * checking additional_patch_for_2.6.13.diff ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 2. ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 6. ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 22 ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. -hardened_2007-08-11 /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments * This may not work with all kernels. If it does not work please enter a bug at bugs.gentoo.org * This only patches the current kernel source code. (/usr/src/linux) * Its up to you to recompile the kernel with the l7 options * * You will also need to emerge iptables with the "extensions" or * "l7filter" USE flag (depend which version of iptables you emerge) >>> Unpacking source... /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments /usr/portage/eclass/linux-info.eclass: line 196: [: too many arguments !!! ERROR: net-misc/l7-filter-2.13 failed. Call stack: ebuild.sh, line 1632: Called dyn_unpack ebuild.sh, line 763: Called qa_call 'src_unpack' ebuild.sh, line 44: Called src_unpack l7-filter-2.13.ebuild, line 63: Called which_patch l7-filter-2.13.ebuild, line 51: Called die !!! No L7-filter patch for Kernel version ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 2. ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 6. ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. 22 ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. -hardened_2007-08-11 - sorry not supported !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/net-misc/l7-filter-2.13/temp/build.log'. If I then run 'make oldconfig && make prepare' as suggested, l7-filter is installed without problems, but the kernel fails to compile with the following errors: # make ... net/netfilter/xt_layer7.c: In function ‘match’: net/netfilter/xt_layer7.c:441: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:441: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:476: error: ‘struct nf_conn’ has no member named ‘counters’ net/netfilter/xt_layer7.c:476: error: ‘struct nf_conn’ has no member named ‘counters’ make[2]: *** [net/netfilter/xt_layer7.o] Error 1 make[1]: *** [net/netfilter] Error 2 make: *** [net] Error 2
a_tevelev, > ERROR: Kernel configuration is invalid. > include/linux/autoconf.h or include/config/auto.conf are missing. > Run 'make oldconfig && make prepare' on kernel src to fix it. This looks like kernel configuration problem. Could you please, remove you sources with emerge -C hardened-sources && rm -rf /usr/src/<hardened-sources-directory> install them another time, configure them and try to install l7-filter-2.17.
Yes, I have tried that already many times, the last time yesterday. Once the kernel sources are re-installed, kernel compilation works flawlessly with the same .config file as the one used in this bug. As soon as net-misc/l7-filter is applied, kernel configuration appears to become invalid.
(In reply to comment #5) > Yes, I have tried that already many times, the last time yesterday. Hm. Please try with 2.17 as it contains some compilation fixes too. > Once the kernel sources are re-installed, kernel compilation works flawlessly > with the same .config file as the one used in this bug. Could you attach .config file here so I could reproduce your problem? > As soon as net-misc/l7-filter is applied, kernel configuration appears to > become invalid. But have you run make oldconfig? I could be wrong here and I hope that somebody from kernel team corrects me then but as far as I understand the process after you change Kconfig files you have to update .config to take into account new dependencies. To achieve that you should run either make menuconfig or make oldconfig. kernel team, is above paragraph correct?
On fresh kernel-sources l7-filter needs: make oldconfig make prepare
a_tevelev, well. Please, return to us if you problem reproducible with l7-filter-2.17. If it does attach your kernel version and .config file. Thank you.