Closed AlejandraOliver closed 1 year ago
Hi, what is your architecture?
This issue seems to occur when compiling libbpf, not bpftool itself, so I'd suggest trying to compile the lib on its own to see if that works. If not, you might want to report on the BPF mailing list.
I use a virtual machine with ubuntu 22.04 on VirtualBox . When I try to compile libbpf I receive errors too. What is the command that I need to use to compile it?
When I try to compile libbpf I receive errors too. What is the command that I need to use to compile it?
Just make
from the src
directory, as on the README
Ok, thanks!!
Hi, I'm trying to compile bpftool in linux kernel 6.3 on ubuntu 22.04. When I do
make
I receive the following errors:~mptcp_net-next/tools/bpf/bpftool$ make
Auto-detecting system features: ... clang-bpf-co-re: [ on ] ... llvm: [ on ] ... libcap: [ OFF ] ... libbfd: [ OFF ]
MKDIR /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/ make[1]: enter from the directory '/home/test2/mptcp_net-next/tools/lib/bpf' GEN /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/bpf_helper_defs.h MKDIR /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/staticobjs/ CC /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/staticobjs/libbpf.o
In file included from /usr/include/asm-generic/int-ll64.h:12, from /usr/include/asm-generic/types.h:7, from /usr/include/x86_64-linux-gnu/asm/types.h:1, from /home/test2/mptcp_net-next/tools/include/linux/types.h:13, from /home/test2/mptcp_net-next/tools/include/linux/compiler.h:105, from /home/test2/mptcp_net-next/tools/include/linux/err.h:5, from libbpf.c:29:
/home/test2/mptcp_net-next/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h 14 | #error Inconsistent word size. Check asm/bitsperlong.h | ^~~~~ make[2]: [/home/test2/mptcp_net-next/tools/build/Makefile.build:98: /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/staticobjs/libbpf.o] Error 1 make[1]: [Makefile:157: /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/staticobjs/libbpf-in.o] Error 2 make[1]: exits from the directory '/home/test2/mptcp_net-next/tools/lib/bpf' make: *** [Makefile:46: /home/test2/mptcp_net-next/tools/bpf/bpftool/libbpf/libbpf.a] Error 2
Any advice?