Closed KillianCdP closed 1 year ago
Hmm, no, that should definitely work. Could you try re-running configure (in the bpf-examples repository) as:
DEBUG_CONFIGURE=1 ./configure
and posting the output of that?
DEBUG_CONFIGURE=1 ./configure
Here is the output:
clang: 11.0.0-2~ubuntu20.04.1
libmnl support: yes
libbpf support: submodule
ELF support: yes
zlib support: yes
libxdp support: submodule
Configuring libxdp to use our libbpf submodule
Found clang binary 'clang' with version 11 (from 'Ubuntu clang version 11.0.0-2~ubuntu20.04.1')
libbpf support: custom v1.0.0
perf_buffer__consume support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
btf__load_from_kernel_by_id support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
btf__type_cnt support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
bpf_object__next_map support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
bpf_object__next_program support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
bpf_program__insn_cnt support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
bpf_map_create support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
perf_buffer__new_raw support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
bpf_xdp_attach support: no
gcc -o config.rGJjdI/libbpftest config.rGJjdI/libbpftest.c -Werror -Iconfig.rGJjdI/include -Xlinker --unresolved-symbols=ignore-in-object-files
In file included from config.rGJjdI/libbpftest.c:1:
config.rGJjdI/include/bpf/libbpf.h:70:54: error: ‘enum bpf_link_type’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
| ^~~~~~~~~~~~~
In file included from config.rGJjdI/libbpftest.c:3:
config.rGJjdI/include/bpf/btf.h:208:14: error: ‘enum btf_func_linkage’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
208 | enum btf_func_linkage linkage, int proto_type_id);
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
zlib support: yes
ELF support: yes
pcap support: yes
secure_getenv support: yes
Ah, thanks! This is a bug in the xdp-tools configure script that only surfaces when xdp-tools is embedded in this repo. Could you please try if the update in #75 fixes this (run git submodule update
after switching to that branch)?
Thanks, the included libxdp compiles fine now.
However I am having issues compiling AF_XDP-example
now but I suppose I should create another issue for it. (SO_PREFER_BUSY_POLL
not defined on my system)
Yes, please do!
Hello,
What are the dependencies for compiling the project? I am having issue compiling on a Ubuntu Server 20.04 machine with kernel 5.15.39.
Output of
configure
is the following:libbpf
is compiling fine howeverlibxdp
doesn't. Here is a snippet of the output log:For comparison, here is the output of
configure
on thexdp-tools
project which compiles fine:So it seems to be a difference on what libbpf supports between the two projects, but it should be the same as both are using libbpf as submodule on v1.0.0?
Thanks