While trying to build kernel (4.15) with support Ftrace and debug info, I am getting the following error:

       FAILED: load BTF from vmlinux: No such file or directory
       Makefile:1160: recipe for target 'vmlinux' failed

This is what I am trying:

       $ ./scripts/config -e CONFIG_FTRACE
       $ ./scripts/config -e CONFIG_DEBUG_INFO
       $ ./scripts/config -e CONFIG_DEBUG_INFO_DWARF5
       $ ./scripts/config -e CONFIG_BPF_SYSCALL
       $ ./scripts/config -e CONFIG_DEBUG_INFO_BTF
       $ ./scripts/config -d CONFIG_DEBUG_INFO_REDUCED
       $ yes "" | make oldconfig
       $ make -j$(nproc) Image dtbs modules

This issue seems to be different from this one:

"FAILED: load BTF from vmlinux: Unknown error -2make: *** [Makefile:1162: vmlinux] Error 255", while compiling kernel-5.9.1

2 Answers 2


I don't know why you are trying to install kernel 4.15 in 2022, but besides the point you should not run yes "" | make oldconfig. This will select yes for new questions. What you probably want it is to make olddefconfig which will select the default for new questions (which isn't necessarily yes). This could be part of your problem.

You should also make sure dwarves is installed.

  • This doesn't help. I got same problem while trying to bisect between 6.0 and 6.1rc1, the former fails with the same error. Didn't run oldconfig, and for a dozen of new (or probably older since apparently they are not present at 6.1.rc1) options pressed enter which has been always defaulting to N. That didn't stop me from getting the same problem though.
    – Hi-Angel
    Commented Feb 16, 2023 at 3:25

It seems that the actual reason for the error may be a dozen lines above the error about load BTF from vmlinux: No such file or directory.

In my case that was a warning (yes, it's a warning because it does not interrupt build):

           BTF     .btf.vmlinux.bin.o
         btf_encoder__encode: btf__dedup failed!
         Failed to encode BTF

…and this problem was a regression on an early development stage, which I worked around by disabling CONFIG_X86_KERNEL_IBT.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .