When I did a `git clean` I noticed that `tools/bpf/bpftool/vmlinux` existed but the failure appeared to look like the file was expected under `debian/build/tools-perarch/tools/bpf/bpftool/vmlinux`. With this hacky patch I managed to get the build to complete:
I don't know if using an alternate output path somehow interacts with this method to find the vmlinux file, i.u. a file is found in one place so it is not rebuilt but that place is not the same that 2-binary-arch.mk expects. Makefiles are not my speciality though so likely I've just found a working bodge:)
When I did a `git clean` I noticed that `tools/ bpf/bpftool/ vmlinux` existed but the failure appeared to look like the file was expected under `debian/ build/tools- perarch/ tools/bpf/ bpftool/ vmlinux` . With this hacky patch I managed to get the build to complete:
``` rules.d/ 2-binary- arch.mk b/debian/ rules.d/ 2-binary- arch.mk .398e6dc3a3434 100644 rules.d/ 2-binary- arch.mk rules.d/ 2-binary- arch.mk perf),true)
$(kmake) prefix=/usr NO_LIBTRACEEVENT=1 HAVE_CPLUS_ DEMANGLE_ SUPPORT= 1 CROSS_COMPILE= $(CROSS_ COMPILE) NO_LIBPERL=1 WERROR=0 bpftool) ,true) /tools/ bpf/bpftool/ vmlinux ] && ! [ -f $(builddirpa) /tools/ bpf/bpftool/ vmlinux ] ; then \ /tools/ bpf/bpftool/ vmlinux $(builddirpa) /tools/ bpf/bpftool/ vmlinux ; \ /tools/ bpf/bpftool/ vmlinux $(builddirpa) /vmlinux $(CROSS_ COMPILE) -C $(builddirpa) /tools/ bpf/bpftool /vmlinux
diff --git a/debian/
index 986a18d7abac9.
--- a/debian/
+++ b/debian/
@@ -666,6 +666,9 @@ ifeq ($(do_tools_
endif
ifeq ($(do_tools_
+ if [ -f $(CURDIR)
+ ln $(CURDIR)
+ fi
mv $(builddirpa)
$(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=
rm -f $(builddirpa)
```
I don't know if using an alternate output path somehow interacts with this method to find the vmlinux file, i.u. a file is found in one place so it is not rebuilt but that place is not the same that 2-binary-arch.mk expects. Makefiles are not my speciality though so likely I've just found a working bodge:)
```
$(if $(KBUILD_ OUTPUT) ,$(KBUILD_ OUTPUT) /vmlinux) \
../../. ./vmlinux \
/sys/kernel/ btf/vmlinux )libbpf/ \
/boot/vmlinux- $(shell uname -r) BTF_PATHS) )))
VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux) \
VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_
```