emerging dev-util/bcc-0.22.0 yields a build failure in the compile stage: > [4/287] /usr/bin/x86_64-pc-linux-gnu-gcc -DHAVE_EXTERNAL_LIBBPF -I/usr/src/linux -I/usr/lib/llvm/12/include/../tools/clang/include -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src -Isrc -Isrc/cc -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc -Isrc/cc/frontends/b -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/frontends/b -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/frontends/clang -I/usr/lib/llvm/12/include -O2 -march=nehalem -mindirect-branch=thunk -frecord-gcc-switches -fno-omit-frame-pointer -pipe -Wall -fPIC -Wno-unused-result -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -MD -MT src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o -MF src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o.d -o src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o -c /var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/libbpf.c > [31mFAILED: [0msrc/cc/CMakeFiles/bpf-static.dir/libbpf.c.o > /usr/bin/x86_64-pc-linux-gnu-gcc -DHAVE_EXTERNAL_LIBBPF -I/usr/src/linux -I/usr/lib/llvm/12/include/../tools/clang/include -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src -Isrc -Isrc/cc -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc -Isrc/cc/frontends/b -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/frontends/b -I/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/frontends/clang -I/usr/lib/llvm/12/include -O2 -march=nehalem -mindirect-branch=thunk -frecord-gcc-switches -fno-omit-frame-pointer -pipe -Wall -fPIC -Wno-unused-result -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -MD -MT src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o -MF src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o.d -o src/cc/CMakeFiles/bpf-static.dir/libbpf.c.o -c /var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/libbpf.c > In file included from /var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/bcc_libbpf_inc.h:5, > from /var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0/src/cc/libbpf.c:57: > /usr/include/bpf/btf.h: In function 'btf_is_float': > /usr/include/bpf/btf.h:328:24: error: 'BTF_KIND_FLOAT' undeclared (first use in this function); did you mean 'BTF_KIND_INT'? > 328 | return btf_kind(t) == BTF_KIND_FLOAT; > | ^~~~~~~~~~~~~~ > | BTF_KIND_INT > /usr/include/bpf/btf.h:328:24: note: each undeclared identifier is reported only once for each function it appears in ... > * ERROR: dev-util/bcc-0.22.0::gentoo failed (compile phase): > * ninja -v -j12 -l16 failed > * > * Call stack: > * ebuild.sh, line 127: Called src_compile > * environment, line 4635: Called cmake_src_compile > * environment, line 1735: Called cmake_build > * environment, line 1704: Called eninja > * environment, line 2448: Called die > * The specific snippet of code: > * "$@" || die "${nonfatal_args[@]}" "${*} failed" > * > * If you need support, post the output of `emerge --info '=dev-util/bcc-0.22.0::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-util/bcc-0.22.0::gentoo'`. > * The complete build log is located at '/var/tmp/portage/dev-util/bcc-0.22.0/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-util/bcc-0.22.0/temp/environment'. > * Working directory: '/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0_build' > * S: '/var/tmp/portage/dev-util/bcc-0.22.0/work/bcc-0.22.0' USE flags: > $ emerge -pqv '=dev-util/bcc-0.22.0::gentoo' > [ebuild r U ] dev-libs/libbpf-0.5.0 [0.3] USE="static-libs" > [ebuild U ] dev-util/bcc-0.22.0 [0.20.0-r1] USE="lua -test" LUA_SINGLE_TARGET="luajit" PYTHON_TARGETS="python3_8 (-python3_10) -python3_9" > [ebuild rR ] sys-apps/iproute2-5.13.0-r1 USE="bpf caps elf ipv6 -atm -berkdb -iptables -libbsd -minimal (-selinux)" > [ebuild rR ] dev-util/bpftrace-0.12.1-r1 USE="-fuzzing -test" > > The following packages are causing rebuilds: > > (dev-libs/libbpf-0.5.0:0/0.5.0::gentoo, ebuild scheduled for merge) causes rebuilds for: > (sys-apps/iproute2-5.13.0-r1:0/0::gentoo, ebuild scheduled for merge) > (dev-util/bpftrace-0.12.1-r1:0/0::gentoo, ebuild scheduled for merge) Reproducible: Always Steps to Reproduce: 1. emerge -a dev-util/bcc
Created attachment 741153 [details] build.log
Created attachment 741156 [details] emerge --info
I run into this bug as well, apparently dev-util/bcc-0.22.0 requires newer kernel headers: >=sys-kernel/linux-headers-5.13 BTF_KIND_FLOAT has been introduced in some 5.13 release candidate: https://github.com/torvalds/linux/commit/8fd886911a6a99acf4a8facf619a2e7b5225be78 After upgrading kernel headers (to latest unstable) bcc compiled fine. (I'm too lazy to do a PR for this.)
> I run into this bug as well, apparently dev-util/bcc-0.22.0 requires > newer kernel headers: > > >=sys-kernel/linux-headers-5.13 Shouldn't the dependencies of bcc-0.22.0 should be updated to reflect this dependency? 73, Mario
~ $ diff -c /usr/portage/dev-util/bcc/bcc-0.22.0.ebuild /usr/local/portage/dev-util/bcc/bcc-0.22.0-r1.ebuild *** /usr/portage/dev-util/bcc/bcc-0.22.0.ebuild 2021-09-21 03:09:52.000000000 +0200 --- /usr/local/portage/dev-util/bcc/bcc-0.22.0-r1.ebuild 2021-10-05 08:54:01.661258786 +0200 *************** *** 34,39 **** --- 34,40 ---- ${PYTHON_DEPS} " DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-5.13 test? ( || ( net-misc/iputils[arping] ~ $
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=947035ae921b5ca1c79cf92bb3d20e193cc13de2 commit 947035ae921b5ca1c79cf92bb3d20e193cc13de2 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-10-21 04:16:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-10-21 04:16:15 +0000 dev-util/bcc: increase linux-headers dependency Closes: https://bugs.gentoo.org/814644 Signed-off-by: Sam James <sam@gentoo.org> dev-util/bcc/bcc-0.22.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)