Compile error for 5.15.2 and up
rcmcronny opened this issue · 4 comments
Its gentoo sources, but the patches do not affect the netfilter stuff. This issue is since 5.15.2 and up (logfile is for 5.15.4). I leave it unformated, as the code statement makes it really harder to read.
This is from the latest commit: 9ed5788
Compiling source in /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999 ...
make -j8 ARCH=x86 CC=x86_64-pc-linux-gnu-gcc all
./gen_compat_def > compat_def.h
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -O2 -Wall -Wunused -DXTABLES -fPIC -o libipt_NETFLOW_sh.o -c libipt_NETFLOW.c
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -O2 -Wall -Wunused -DXTABLES -fPIC -o libip6t_NETFLOW_sh.o -c libipt_NETFLOW.c
x86_64-pc-linux-gnu-gcc -fPIC -shared -o snmp_NETFLOW.so snmp_NETFLOW.c -lnetsnmp
Test function xt_family linux/netfilter_ipv4/ip_tables.h x86_64-pc-linux-gnu-gcc -shared -o libip6t_NETFLOW.so libip6t_NETFLOW_sh.o
x86_64-pc-linux-gnu-gcc -shared -o libipt_NETFLOW.so libipt_NETFLOW_sh.o
declared
Test struct timeval linux/ktime.h undeclared
Test struct proc_ops linux/proc_fs.h declared
Test function synchronize_sched linux/rcupdate.h undeclared
Test function nf_bridge_info_get linux/netfilter_bridge.h declared
Test struct vlan_dev_priv linux/if_vlan.h declared
Test function put_unaligned_be24 asm/unaligned.h declared
Test function totalram_pages linux/mm.h declared
Test symbol totalram_pages linux/mm.h declared
Compiling 2.6-4-g9ed5788-dirty for kernel 5.15.4-gentoo-x86_64
make -C /usr/src/linux M=/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999 modules
make[1]: Entering directory '/usr/src/linux-5.15.4-gentoo'
CC [M] /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.o
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c: In function ‘netflow_conntrack_event’:
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:4622:31: error: ‘struct nf_ct_event_notifier’ has no member named ‘fcn’
4622 | ret = notifier->fcn(events, item);
| ^~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c: At top level:
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:4687:10: error: ‘struct nf_ct_event_notifier’ has no member named ‘fcn’
4687 | .fcn = netflow_conntrack_event
| ^~~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:4687:16: error: initialization of ‘int (*)(unsigned int, const struct nf_ct_event )’ from incompatible pointer type ‘int ()(const unsigned int, struct nf_ct_event *)’ [-Werror=incompatible-pointer-types]
4687 | .fcn = netflow_conntrack_event
| ^~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:4687:16: note: (near initialization for ‘ctnl_notifier.ct_event’)
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c: In function ‘unset_notifier_cb’:
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:5455:25: error: too many arguments to function ‘nf_conntrack_unregister_notifier’
5455 | nf_conntrack_unregister_notifier(NET_ARG &ctnl_notifier);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/net/netfilter/nf_conntrack_core.h:18,
from /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:68:
./include/net/netfilter/nf_conntrack_ecache.h:88:6: note: declared here
88 | void nf_conntrack_unregister_notifier(struct net net);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.c:79:
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/murmur3.h: In function ‘murmur3’:
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/murmur3.h:35:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
35 | case 3: k1 ^= tail[2] << 16; / FALLTHROUGH /
| ~~~^~~~~~~~~~~~~~~~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/murmur3.h:36:17: note: here
36 | case 2: k1 ^= tail[1] << 8; / FALLTHROUGH /
| ^~~~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/murmur3.h:36:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
36 | case 2: k1 ^= tail[1] << 8; / FALLTHROUGH */
| ~~~^~~~~~~~~~~~~~~
/var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/murmur3.h:37:17: note: here
37 | case 1: k1 ^= tail[0];
| ^~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999/ipt_NETFLOW.o] Error 1
make[1]: *** [Makefile:1868: /var/tmp/portage/net-firewall/ipt_netflow-9999/work/ipt_netflow-9999] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.4-gentoo'
make: *** [Makefile:27: ipt_NETFLOW.ko] Error 2
rm libipt_NETFLOW_sh.o libip6t_NETFLOW_sh.o
Can you attach your kernel config? And also show command line of your run of configure
and its output.
Hi @aabc
yes, sure, please find both attached:
Build Log full: build.log
Kernel-Config: kernel-config-5.15.4-gentoo-x86_64.txt
It may be also my fault with the kernel config, but did not find anything, that pointed to something further.
I pushed some fixes, would be grateful for testing. Thanks!