Kernel build fails on debian/build/tools-perarch/tools/bpf/bpftool/vmlinux

Bug #2047683 reported by Bryan Apperson
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've been attempting to build both the hwe-edge and lowlatency-hwe-next kernels from source. Both fail on bpftool not being present, though `debian/build/tools-perarch/tools/bpf/bpftool/vmlinux.h` is there.

```
make[1]: Leaving directory '/home/ubuntu/build-linux/linux-hwe-6.5-6.5.0/debian/build/tools-perarch/tools/perf'
mv /home/ubuntu/build-linux/linux-hwe-6.5-6.5.0/debian/build/tools-perarch/tools/bpf/bpftool/vmlinux /home/ubuntu/build-linux/linux-hwe-6.5-6.5.0/debian/build/tools-perarch/vmlinux
mv: cannot stat '/home/ubuntu/build-linux/linux-hwe-6.5-6.5.0/debian/build/tools-perarch/tools/bpf/bpftool/vmlinux': No such file or directory
make: *** [debian/rules.d/2-binary-arch.mk:713: /home/ubuntu/build-linux/linux-hwe-6.5-6.5.0/debian/stamps/stamp-build-perarch] Error 1
```

I've installed the related version of libbpf1 and libbpf-devel, but still seeing this.

summary: - Kernel build fails on ebian/build/tools-
+ Kernel build fails on debian/build/tools-
perarch/tools/bpf/bpftool/vmlinux
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Johannes Unger (ju93) wrote :

Building 6.8.0-7 was possible. Building 6.8.0-9 fails - but I changed a few things:
added LLVM=1 and removed it later on (then debain/rules clean 'ed),
installed lib*-dev based on "Auto-detecting system features" output,
KBUILD_BUILD_TIMESTAMP='2024-02-13'
CC='ccache cc'

Revision history for this message
Sergey Galtsev (sam-j811) wrote :

is there a workaround?

Revision history for this message
Jonas Juffinger (jonasjuffinger) wrote :

I tried building 6.1.81 on Ubuntu 22.04 and got the same error message.

Revision history for this message
Jason Youzwak (veganjay) wrote :

I experienced a similar issue building 6.5.0-25 on Ubuntu 22.04.

I followed the steps in the "Build Your Own Kernel" post: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

Specifically, the error occurs after I ran the build step with the parameters:

fakeroot debian/rules binary-headers binary-generic binary-perarch

I tried the LLVM and CC tricks mentioned in the previous post, but it did not help.

Revision history for this message
Jason Youzwak (veganjay) wrote :

Follow-up from my previous comment. The build appears to fail if I try to run it twice without running "clean" in between.

In other words, to successfully build, I ran:

fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic binary-perarch

The drawback is it rebuilds everything (which is about 45 minutes on my machine).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.