skip to Main Content
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.

2

Answers


  1. 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:

    1. I did not disable CONFIG_DEBUG_INFO_NONE. This config is for disable all the debug config info.
    2. some modules failure, like SSSE3 and chacha20 module. I just disabled them tool. These are crypto modules not sure why they fail.

    I hope this would also help you.

    Login or Signup to reply.
  2. 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/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search