Reputation: 31
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.
Upvotes: 3
Views: 6962
Reputation: 1
In kernel source, when CONFIG_DEBUG_INFO_BTF is enabled in .config file then copy the vmlinux from /sys/kernel/btf/vmlinux to /usr/lib/modules/uname -r
/build/
cp /sys/kernel/btf/vmlinux /usr/lib/modules/uname -r
/build/
or
sudo /sys/kernel/btf/vmlinux /usr/lib/modules/uname -r
/build/
Upvotes: 0
Reputation: 673
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:
I hope this would also help you.
Upvotes: 3