Source: linux
Version: 5.10.70-1
Severity: serious
Tags: ftbfs patch upstream
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: nwfila...@gmail.com

Dear Maintainer,

Attempting to build kernel packages using the machinery of
https://salsa.debian.org/kernel-team/linux.git on a host where the
"clang-bpf-co-re" test performed in the tools/bpf/bpftool directory passes will
fail, as the build will attempt to bootstrap the BTF vmlinux.h header
(confusingly, from the kernel in /boot/vmlinux-$(uname -r), as it can't find
anything else); for example:

> /dozer/scratch/nwf/tmp/linux/debian-kernel-linux/debian/build/build-tools/tools/bpf/bpftool/bpftool-bootstrap
>  btf dump file /boot/vmlinux-5.10.0-0.bpo.5-powerpc64le format c > 
> /dozer/scratch/nwf/tmp/linux/debian-kernel-linux/debian/build/build-tools/tools/bpf/bpftool/vmlinux.h
> Error: failed to load BTF from /boot/vmlinux-5.10.0-0.bpo.5-powerpc64le: No 
> such file or directory

The official builders do not pass this test (see, e.g.
https://buildd.debian.org/status/fetch.php?pkg=linux&arch=ppc64el&ver=5.14.9-2&stamp=1633298169&raw=0
where the logs say "clang-bpf-co-re: [ OFF ]"), so I believe the correct answer
on Debian systems is to disable the test (making it appear as if it fails)
regardless of the host environment.  The patch below does exactly that and
allows me to build the kernel packages.

Cheers,
--nwf;

--- a/tools/bpf/bpftool/Makefile        2021-10-11 01:52:26.625003863 +0100
+++ b/tools/bpf/bpftool/Makefile        2021-10-11 03:38:54.006277839 +0100
@@ -62,8 +62,7 @@
 LLVM_STRIP ?= llvm-strip
 
 FEATURE_USER = .bpftool
-FEATURE_TESTS = libbfd disassembler-four-args reallocarray zlib libcap \
-       clang-bpf-co-re
+FEATURE_TESTS = libbfd disassembler-four-args reallocarray zlib libcap
 FEATURE_DISPLAY = libbfd disassembler-four-args zlib libcap \
        clang-bpf-co-re
 

Reply via email to