From 64362c7a1c54ad7f1476fac9f58036478178a577 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Thu, 19 May 2022 09:37:18 +0000 Subject: bcc: De-vendor libbpf Currently bcc builds against a vendored copy of libbpf. This causes problems for bpftrace which is built against bcc and the system libbpf. The resulting version skew between the vendored and system versions of libbpf resulting in a SEGV whenever bpftrace is used. Although --help and -l (list probe points) work OK that is because they do not actually use BPF! Anything that does use BPF will crash immediately, including bpftrace --info and simple one-liners such as: ~# bpftrace -e 't:raw_syscalls:sys_exit { printf("%s", comm); }' Attaching 1 probe... Segmentation fault Note that this issue is very closely related to similar problems compiling bpftrace against mixed headers from the two libbpf versions. Fixes: https://github.com/iovisor/bpftrace/issues/2173 Fixes: bb3e56b06f9d ("bpftrace: Fix build with new libbpf") Signed-off-by: Daniel Thompson --- dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dynamic-layers') diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb index b5e3fe3..2da1fc4 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb +++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc_0.24.0.bb @@ -11,6 +11,7 @@ DEPENDS += "bison-native \ elfutils \ ${LUAJIT} \ clang \ + libbpf \ " LUAJIT ?= "luajit" @@ -40,6 +41,7 @@ PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," EXTRA_OECMAKE = " \ + -DCMAKE_USE_LIBBPF_PACKAGE=ON \ -DENABLE_LLVM_SHARED=ON \ -DENABLE_CLANG_JIT=ON \ -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ -- cgit v1.2.3-54-g00ecf