-
Notifications
You must be signed in to change notification settings - Fork 177
Description
here is compiling error on Ubuntu 18.04
root@vincent-desktop:/usr/src/xdp-tools# ./configure
libbpf support: submodule
ELF support: yes
zlib support: yes
root@vincent-desktop:/usr/src/xdp-tools# make
lib
util
CC params.o
CC logging.o
CC util.o
CC stats.o
xdp-filter
CLANG xdpfilt_blk_udp.o
In file included from xdpfilt_blk_udp.c:10:
In file included from ./xdpfilt_prog.h:10:
In file included from ../lib/../headers/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
../lib/common.mk:77: recipe for target 'xdpfilt_blk_udp.o' failed
make[1]: *** [xdpfilt_blk_udp.o] Error 1
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2
this error is similar to issue addressed in https://code.forksand.com/oisf/suricata/commit/7906c521cdde5b1d0eb3ce379b8e343c3055653f
I added diff below to fix the error, maybe similar patch needed for xdp-tools ?
diff --git a/lib/common.mk b/lib/common.mk index dd71535..6127450 100644 --- a/lib/common.mk +++ b/lib/common.mk @@ -75,6 +75,7 @@ $(USER_TARGETS): %: %.c $(OBJECT_LIBBPF) $(LIBMK) $(LIB_OBJS) $(KERN_USER_H) $( $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) $(BPF_HEADERS) $(LIBMK) $(QUIET_CLANG)$(CLANG) -S \ + -I/usr/include/x86_64-linux-gnu/ \ -target bpf \ -D __BPF_TRACING__ \ $(BPF_CFLAGS) \