Project

General

Profile

Actions

Support #8012

open

centos 7: suricata make error

Added by bobo suri about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Affected Versions:
Label:

Description

suricata 8.0.0 and 8.0.1 make error:
tm-threads.c: In function ‘TmThreadsSetThreadTimestamp’:
tm-threads.c:2303:5: error: incompatible type for argument 1 of ‘__sync_bool_compare_and_swap’
SC_ATOMIC_SET(t->pktts, ts);
^
tm-threads.c: In function ‘TmThreadsInitThreadsTimestamp’:
tm-threads.c:2355:9: error: incompatible type for argument 1 of ‘__sync_bool_compare_and_swap’
SC_ATOMIC_SET(t->pktts, ts);

OS:centos 7(X86_64)
gcc:gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

Actions #1

Updated by Victor Julien about 2 months ago

  • Subject changed from suricata make error to centos 7: suricata make error

Suricata 8 needs a more recent compiler than gcc 4.8.

Actions #2

Updated by Victor Julien about 2 months ago

  • Tracker changed from Bug to Support
  • Target version deleted (TBD)
Actions #3

Updated by bobo suri about 2 months ago

Victor Julien wrote in #note-1:

Suricata 8 needs a more recent compiler than gcc 4.8.

Another error occurs when I attempt to use the following versions:
scl enable devtoolset-8 (gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)

scl enable devtoolset-9 (gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC))

./configure --with-libpcap-includes=/usr/local/libpcap-1.10.4/include --with-libpcap-libraries=/usr/local/libpcap-1.10.4/lib
error:
checking for pcap.h... no
configure: error: pcap.h not found ...

configure:21396: checking for pcap.h
configure:21396: gcc -c -g -O2 -fPIC -DOS_LINUX -std=c11 -march=native -I/usr/local/libpcap-1.10.4/include conftest.c >&5
In file included from /usr/local/libpcap-1.10.4/include/pcap/pcap.h:133,
from /usr/local/libpcap-1.10.4/include/pcap.h:43,
from conftest.c:158:
/usr/local/libpcap-1.10.4/include/pcap/bpf.h:97:9: error: unknown type name 'u_int'
97 | typedef u_int bpf_u_int32; | ^~~
/usr/local/libpcap-1.10.4/include/pcap/bpf.h:117:2: error: unknown type name 'u_int'
117 | u_int bf_len; | ^~~
/usr/local/libpcap-1.10.4/include/pcap/bpf.h:245:2: error: unknown type name 'u_short'
245 | u_short code; | ^~~~~
/usr/local/libpcap-1.10.4/include/pcap/bpf.h:246:2: error: unknown type name 'u_char'
246 | u_char jt; | ^~~~
/usr/local/libpcap-1.10.4/include/pcap/bpf.h:247:2: error: unknown type name 'u_char'
247 | u_char jf;

I've tried several pcap versions, all of which throw the above error.(libpcap-1.8.1、1.10.4、1.10.5..)
Can we not use scl to update the gcc environment for compilation?

Actions #4

Updated by Jason Ish about 2 months ago

Also note that CentOS 7 has been end-of-life for over a year now, which means we no longer test on it.

Actions

Also available in: Atom PDF