FAILED: load BTF from vmlinux: No such file or directory
make: *** [Makefile:1164: vmlinux] Error 255
make: *** Deleting file 'vmlinux'
root@akb:/home/akb/SRC/net/net-next#
I have to enable BTF for my BPF xdp program to work.
Environment :on Ubuntu 22.04 VM, net-next(5.19) latest version is compiled and installed on VM. Recompiling is giving error. Any pointers...? Thanks in advance.
I got the same issue resolved.
First you need to make sure
CONFIG_DEBUG_INFO_BTF=y
is set and pahole is installed from https://github.com/acmel/dwarves.
And I enabled
CONFIG_DEBUG_INFO_SWARF4=y
And you have to make the pahole libs linked(This stopped me for long.): export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
My previous failures are:
CONFIG_DEBUG_INFO_NONE. This config is for disable all the debug config info.I hope this would also help you.
In my case the issue was not having enough memory on the VM I worked on. For me it seems to be a memory "exhaustion" of the pahole program during kernel build time.
I was working with a Lima (Linux on Mac) Ubuntu 22.04 VM trying to build Linux kernel 5.15.168 with local configuration (nothing special that was not already present in the running kernel config). Initially the VM had 4GB RAM. When this was the case, I saw a similar error to the one in the question, and when greping for pahole in dmesg I saw the following (abbriviated): Out of memory: Killed process 306763 (pahole) total-vm:4053388kB. I stopped the VM and increased the size of the memory from 4GB to 8GB (also added 4 cpus to have a total of 8) - and then it worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With