ipset tries to compile a kernel module, which also doesn't seem to be compatible with the currently running kernel sources. Also ipset is compiled into the kernel so this shouldn't be happening. A flag to prevent building of the unwanted kernel module should be added so that the wanted applications build without error. Reproducible: Always Expected Results: The old behavior is to not compile a kernel module, just the application. * Building kernel modules * Preparing ip_set module make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IP_NF_SET_MAX=256 IP_NF_SET_HASHSIZE=1024 all make -C /usr/src/linux M=`pwd` V=0 KBUILD_OUTPUT= modules make[1]: Entering directory `/usr/src/linux-2.6.24.3' CC [M] /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.o CC [M] /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_set.o In file included from <command-line>:0: ./include/linux/autoconf.h:55:1: warning: "CONFIG_IP_NF_SET_MAX" redefined <command-line>: warning: this is the location of the previous definition ./include/linux/autoconf.h:264:1: warning: "CONFIG_IP_NF_SET_HASHSIZE" redefined <command-line>: warning: this is the location of the previous definition In file included from <command-line>:0: ./include/linux/autoconf.h:55:1: warning: "CONFIG_IP_NF_SET_MAX" redefined <command-line>: warning: this is the location of the previous definition ./include/linux/autoconf.h:264:1: warning: "CONFIG_IP_NF_SET_HASHSIZE" redefined <command-line>: warning: this is the location of the previous definition CC [M] /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_SET.o CC [M] /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.o CC [M] /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.o In file included from <command-line>:0: ./include/linux/autoconf.h:55:1: warning: "CONFIG_IP_NF_SET_MAX" redefined <command-line>: warning: this is the location of the previous definition ./include/linux/autoconf.h:264:1: warning: "CONFIG_IP_NF_SET_HASHSIZE" redefined <command-line>: warning: this is the location of the previous definition In file included from <command-line>:0: ./include/linux/autoconf.h:55:1: warning: "CONFIG_IP_NF_SET_MAX" redefined <command-line>: warning: this is the location of the previous definition ./include/linux/autoconf.h:264:1: warning: "CONFIG_IP_NF_SET_HASHSIZE" redefined <command-line>: warning: this is the location of the previous definition In file included from <command-line>:0: ./include/linux/autoconf.h:55:1: warning: "CONFIG_IP_NF_SET_MAX" redefined <command-line>: warning: this is the location of the previous definition ./include/linux/autoconf.h:264:1: warning: "CONFIG_IP_NF_SET_HASHSIZE" redefined <command-line>: warning: this is the location of the previous definition /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:242: error: conflicting types for 'ip_set_addip_kernel' include/linux/netfilter_ipv4/ip_set.h:486: error: previous declaration of 'ip_set_addip_kernel' was here /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:276: error: conflicting types for 'ip_set_delip_kernel' include/linux/netfilter_ipv4/ip_set.h:489: error: previous declaration of 'ip_set_delip_kernel' was here /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_set.c: In function 'destroy': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_set.c:200: error: implicit declaration of function 'ip_set_put_byindex' make[2]: *** [/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_set.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c: In function 'ip_set_create': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:900: warning: format not a string literal and no format arguments /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c: In function 'ip_set_list_set': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:1186: warning: passing argument 3 of '__set_hash_bindings_size_list' from incompatible pointer type /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c: In function 'ip_set_sockfn_get': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:1839: warning: passing argument 3 of '__set_hash_bindings_size_list' from incompatible pointer type /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:1847: warning: passing argument 3 of '__set_hash_bindings_size_save' from incompatible pointer type /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c: At top level: /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:2061: error: conflicting types for 'ip_set_addip_kernel' include/linux/netfilter_ipv4/ip_set.h:486: error: previous declaration of 'ip_set_addip_kernel' was here /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.c:2062: error: conflicting types for 'ip_set_delip_kernel' include/linux/netfilter_ipv4/ip_set.h:489: error: previous declaration of 'ip_set_delip_kernel' was here make[2]: *** [/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set.o] Error 1 /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:45: warning: return type defaults to 'int' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:45: warning: function declaration isn't a prototype /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c: In function 'UADT': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:45: error: expected declaration specifiers before 'KADT' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:63: error: expected declaration specifiers before 'UADT' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:82: error: expected declaration specifiers before 'UADT' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:121: error: expected declaration specifiers before 'BITMAP_CREATE' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:132: error: expected declaration specifiers before 'BITMAP_LIST_HEADER' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:139: error: storage class specified for parameter '__mod_author139' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:139: error: parameter '__mod_author139' is initialized /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:139: warning: '__used__' attribute ignored /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:139: error: section attribute not allowed for '__mod_author139' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:140: error: storage class specified for parameter '__mod_description140' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:140: error: parameter '__mod_description140' is initialized /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:140: warning: '__used__' attribute ignored /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:140: error: section attribute not allowed for '__mod_description140' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:142: error: expected declaration specifiers before 'REGISTER_MODULE' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:140: error: declaration for parameter '__mod_description140' but no such parameter /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.c:139: error: declaration for parameter '__mod_author139' but no such parameter make[2]: *** [/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_ipmap.o] Error 1 /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_SET.c: In function 'destroy': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_SET.c:202: error: implicit declaration of function 'ip_set_put_byindex' make[2]: *** [/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ipt_SET.o] Error 1 /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c: In function 'macipmap_utest': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:38: error: 'const struct ip_set_macip' has no member named 'match' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c: In function 'macipmap_ktest': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:58: error: implicit declaration of function 'ipaddr' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:66: error: 'const struct ip_set_macip' has no member named 'match' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c: In function 'macipmap_add': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:89: error: 'struct ip_set_macip' has no member named 'match' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:95: error: 'struct ip_set_macip' has no member named 'match' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c: At top level: /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:104: error: expected ')' before '->' token /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:128: warning: return type defaults to 'int' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:128: warning: function declaration isn't a prototype /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c: In function 'UADT': /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:128: error: expected declaration specifiers before 'KADT' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:143: error: expected declaration specifiers before 'BITMAP_CREATE' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:154: error: expected declaration specifiers before 'BITMAP_LIST_HEADER' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:161: error: storage class specified for parameter '__mod_author161' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:161: error: parameter '__mod_author161' is initialized /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:161: warning: '__used__' attribute ignored /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:161: error: section attribute not allowed for '__mod_author161' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:162: error: storage class specified for parameter '__mod_description162' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:162: error: parameter '__mod_description162' is initialized /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:162: warning: '__used__' attribute ignored /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:162: error: section attribute not allowed for '__mod_description162' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:164: error: expected declaration specifiers before 'REGISTER_MODULE' /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:162: error: declaration for parameter '__mod_description162' but no such parameter /var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.c:161: error: declaration for parameter '__mod_author161' but no such parameter make[2]: *** [/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel/ip_set_macipmap.o] Error 1 make[1]: *** [_module_/var/tmp/portage/net-firewall/ipset-3.0/work/ipset-3.0/kernel] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.24.3' make: *** [all] Error 2 * * ERROR: net-firewall/ipset-3.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3362: Called linux-mod_src_compile * environment, line 2592: Called die * The specific snippet of code: * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"; * The die message: * Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IP_NF_SET_MAX=256 IP_NF_SET_HASHSIZE=1024 all * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/net-firewall:ipset-3.0:20090618-044102.log'. * The ebuild environment file is located at '/var/tmp/portage/net-firewall/ipset-3.0/temp/environment'. * >>> Failed to emerge net-firewall/ipset-3.0, Log file: >>> '/var/log/portage/net-firewall:ipset-3.0:20090618-044102.log' * Messages for package net-firewall/ipset-3.0: * * ERROR: net-firewall/ipset-3.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3362: Called linux-mod_src_compile * environment, line 2592: Called die * The specific snippet of code: * eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" CROSS_COMPILE=${CHOST}- LDFLAGS=\"$(get_abi_LDFLAGS)\" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"; * The die message: * Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IP_NF_SET_MAX=256 IP_NF_SET_HASHSIZE=1024 all * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/net-firewall:ipset-3.0:20090618-044102.log'. * The ebuild environment file is located at '/var/tmp/portage/net-firewall/ipset-3.0/temp/environment'. *
This is really two bugs, the first is ipset failing to compile against your kernel, but you haven't said which kernel (so please post the output of "emerge --info"). The second bug is the fact that ipset always builds the kernel modules but is seemingly now included in the tree. Since bug two will solve future issues with bug one, I've reset the summary according to that one (although I've left it as normal rather than an enhancement request). The ipset-devs will tell you whether you should file the kernel compilation bug separately or not...
(In reply to comment #1) > This is really two bugs, the first is ipset failing to compile against your > kernel, but you haven't said which kernel (so please post the output of "emerge > --info"). The second bug is the fact that ipset always builds the kernel > modules but is seemingly now included in the tree. This is incorrect. ipset (the tool) never gets compiled, as compilation fails during the build of erroneous and unnecessary (because they're built in) kernel modules. The proper behavior would be to 'if linux_chkconfig_builtin "IP_NF_SET"; then modules=0;fi' prior to linux-mod_pkg_setup to bypass module compilation/installation. > Since bug two will solve future issues with bug one, I've reset the summary > according to that one (although I've left it as normal rather than an > enhancement request). The ipset-devs will tell you whether you should file the > kernel compilation bug separately or not... > There is no bug 2.
Brendan, check added in ipset-4.1. Thank you for report. Although it's possible to built in IP_NF_SET but have other options as modules I don't think we need to overcomplicate ebuild and take this into account. So suggested check was added into ebuild.