Support #3831
closedeBPF build error
Description
OS: Ubuntu 18.04.4
GCC: 9.3.0
Build command:
./autogen.sh
CC=clang ./configure --enable-nfqueue --prefix=/usr/ --sysconfdir=/etc/ --localstatedir=/var/ --enable-gccmarch-native --enable-gccprofile --enable-gccprotect --enable-ebpf --enable-ebpf-build --enable-luajit --disable-suricata-update --enable-geoip
make clean && make -j 22 && make install-full && ldconfig
Problem:
CC util-ebpf.o
util-ebpf.c:359:13: error: implicit declaration of function 'bpf_program__set_ifindex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bpf_program__set_ifindex(bpfprog, ifindex);
^
util-ebpf.c:362:13: error: implicit declaration of function 'bpf_map__set_ifindex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bpf_map__set_ifindex(map, ifindex);
^
util-ebpf.c:362:13: note: did you mean 'bpf_map__set_priv'?
/usr/local/include/bpf/libbpf.h:244:5: note: 'bpf_map__set_priv' declared here
int bpf_map__set_priv(struct bpf_map *map, void *priv,
^
2 errors generated.
This problem began to appear several months ago. I did not attach any explicit significance and thought that they would fix it.
Not fixed.
Updated by Anonymous almost 4 years ago
I fixed this by removing the system libbpf_common.h libbpf.h
Updated by Victor Julien over 3 years ago
- Tracker changed from Bug to Support
- Subject changed from Eror build (5.0.X github) to eBPF build error
- Status changed from New to Closed