Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on CentOS 7 3.10.0-1160.59.1.el7.x86_64 #195

Closed
nielsk opened this issue Mar 14, 2022 · 2 comments
Closed

Cannot compile on CentOS 7 3.10.0-1160.59.1.el7.x86_64 #195

nielsk opened this issue Mar 14, 2022 · 2 comments

Comments

@nielsk
Copy link

nielsk commented Mar 14, 2022

I cloned the git-repository (and I tried the same with version 2.4).
./configure works, but on the make all-step, I get the following error:

# ./configure
Module version: 2.6-7-g6a55739
Kernel version: 3.10.0-1160.59.1.el7.x86_64 (uname)
Kernel sources: /lib/modules/3.10.0-1160.59.1.el7.x86_64/build (found)
Checking for presence of include/linux/netfilter.h... Yes
netfilter.h uses CONFIG_NF_NAT_NEEDED... Yes
Checking for presence of include/linux/llist.h... Yes
Checking for presence of include/linux/grsecurity.h... No
Iptables binary version: 1.4.21 (detected from /usr/sbin/iptables)
pkg-config for version 1.4.21 exists: Yes
Check for working gcc: Yes (gcc)
Checking for presence of xtables.h... Yes (using pkg-config)
Iptables include flags:   (pkg-config)
Iptables module path: /usr/lib64/xtables (pkg-config)
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
./gen_compat_def > compat_def.h-
Test function xt_family linux/netfilter_ipv4/ip_tables.h  declared
Test struct timeval linux/ktime.h  declared
Test struct proc_ops linux/proc_fs.h  undeclared
Test function synchronize_sched linux/rcupdate.h  declared
Test function nf_bridge_info_get linux/netfilter_bridge.h  undeclared
Test struct vlan_dev_priv linux/if_vlan.h  declared
Test function put_unaligned_be24 asm/unaligned.h  undeclared
Test function totalram_pages linux/mm.h  undeclared
Test symbol totalram_pages linux/mm.h  declared
Test member nf_ct_event_notifier.ct_event net/netfilter/nf_conntrack_ecache.h  undeclared
mv compat_def.h- compat_def.h
Compiling 2.6-7-g6a55739 for kernel 3.10.0-1160.59.1.el7.x86_64
make -C /lib/modules/3.10.0-1160.59.1.el7.x86_64/build M=/root/ipt-netflow modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-1160.59.1.el7.x86_64'
  CC [M]  /root/ipt-netflow/ipt_NETFLOW.o
In file included from /root/ipt-netflow/ipt_NETFLOW.c:77:0:
/root/ipt-netflow/compat.h:777:6: warning: "__has_attribute" is not defined [-Wundef]
 # if __has_attribute(__fallthrough__)
      ^
/root/ipt-netflow/compat.h:777:21: error: missing binary operator before token "("
 # if __has_attribute(__fallthrough__)
                     ^
make[2]: *** [/root/ipt-netflow/ipt_NETFLOW.o] Error 1
make[1]: *** [_module_/root/ipt-netflow] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1160.59.1.el7.x86_64'
make: *** [ipt_NETFLOW.ko] Error 2

Any idea what is going wrong?

@nielsk
Copy link
Author

nielsk commented Mar 14, 2022

After changing the fallthrough-lines in compat.h around line 777 to:

 * keyword for switch/case use") */
#ifndef fallthrough
#  define fallthrough                   do {} while (0)  /* fallthrough */
#endif

I could succesfully compile the module

@aabc aabc closed this as completed in 40fefb2 May 9, 2022
@aabc
Copy link
Owner

aabc commented May 9, 2022

Thanks for the report, should be fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants