git does not build on arch - 6.4.1-arch2-1 implicit declaration of function ‘register_sysctl_paths’; did you mean ‘register_sysctl_table’? [-Werror=implicit-function-declaration]
jayray-git opened this issue · 9 comments
./configure
Module version: 2.6-16-gb049e91
Kernel version: 6.4.1-arch2-1 (uname)
Kernel sources: /lib/modules/6.4.1-arch2-1/build (found)
Checking for presence of include/linux/netfilter.h... Yes
netfilter.h uses CONFIG_NF_NAT_NEEDED... No
Checking for presence of include/linux/llist.h... Yes
Checking for presence of include/linux/grsecurity.h... No
Iptables binary version: 1.8.9 (legacy) (detected from /usr/bin/iptables)
pkg-config for version 1.8.9 (legacy) exists: No (reported: 1.8.9)
Check for working gcc: Yes (gcc)
Checking for presence of xtables.h... Yes
Searching for iptables-1.8.9 (legacy) sources..
! Can not find iptables source directory, you may try setting it with --ipt-src=
! This is not fatal error, yet. Will be just using default include dir.
Iptables include flags: none (default)
Iptables module path: /usr/lib/xtables (from libxtables.so, from binary)
Searching for net-snmp-config... Yes /usr/bin/net-snmp-config
Searching for net-snmp agent... Yes.
Checking for DKMS... Yes.
Creating Makefile.. done.
If you need some options enabled run ./configure --help
Now run: make all install
make all install
./gen_compat_def > compat_def.h-
Test function xt_family linux/netfilter_ipv4/ip_tables.h declared
Test struct timeval linux/ktime.h undeclared
egrep: warning: egrep is obsolescent; using grep -E
Test struct proc_ops linux/proc_fs.h declared
Test function synchronize_sched linux/rcupdate.h undeclared
egrep: warning: egrep is obsolescent; using grep -E
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
Test member nf_ct_event_notifier.ct_event net/netfilter/nf_conntrack_ecache.h declared
mv compat_def.h- compat_def.h
Compiling 2.6-16-gb049e91 for kernel 6.4.1-arch2-1
make -C /lib/modules/6.4.1-arch2-1/build M=/root/ipt-netflow modules
CC [M] /root/ipt-netflow/ipt_NETFLOW.o
/root/ipt-netflow/ipt_NETFLOW.c: In function ‘ipt_netflow_init’:
/root/ipt-netflow/ipt_NETFLOW.c:5669:33: error: implicit declaration of function ‘register_sysctl_paths’; did you mean ‘register_sysctl_table’? [-Werror=implicit-function-declaration]
5669 | netflow_sysctl_header = register_sysctl_paths(netflow_sysctl_path, netflow_sysctl_table);
| ^~~~~~~~~~~~~~~~~~~~~
| register_sysctl_table
/root/ipt-netflow/ipt_NETFLOW.c:5669:31: warning: assignment to ‘struct ctl_table_header *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
5669 | netflow_sysctl_header = register_sysctl_paths(netflow_sysctl_path, netflow_sysctl_table);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:252: /root/ipt-netflow/ipt_NETFLOW.o] Error 1
make[1]: *** [Makefile:2026: /root/ipt-netflow] Error 2
make: *** [Makefile:27: ipt_NETFLOW.ko] Error 2
Hi,
"Update ipt_NETFLOW.c" is a very bad style for commit messages. 😞 Please put the relevant part like "update for >= 6.4.0" into the first line of the commit message.
The relevant commit for this issue seems to be kalamlacki@2a1d250
Thanks for the patch anyways, even if we had to check all commits to find the relevant one. 😃
I have one remark, you should take my last 2 commits not only one, the path for sysctl should be net/netflow and not net.netflow
I have one remark, you should take my last 2 commits not only one, the path for sysctl should be net/netflow and not net.netflow
Thanks, will have look at that, too. (Currently trying to fix this compilation issue for ipt_NETFLOW in Debian Unstable.)
When you use net/netflow then command
sysctl net.netflow
looks like on older kernel without this issue
Relevant commit in Linux seems to be torvalds/linux@0199849.
I have one remark, you should take my last 2 commits not only one, the path for sysctl should be net/netflow and not net.netflow
Indeed, it compiles fine without, but when actually running kernel 6.4 without it, sysctl -a
, will throw errors like these:
sysctl: cannot stat /proc/sys/net/netflow.active_timeout: No such file or directory
sysctl: cannot stat /proc/sys/net/netflow.debug: No such file or directory
sysctl: cannot stat /proc/sys/net/netflow.destination: No such file or directory
[…]
You were testing the commit with net.netflow right? When I test the version with net/netflow I get correct result with sysctl.
I checked the path to version 6.4.0 and everywhere when was register_sysctl_paths() was renamed on to register_sysctl()
You were testing the commit with net.netflow right?
Yes, I wanted to understand why a slash instead of the expected dot was necessary.