Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Manual kernel compilation fails. (Read 835 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Manual kernel compilation fails.

Good afternoon,

I've got a problem with compiling a Linux kernel using the PKGBUILD file provided from the Artix Linux gitea.

Compilation ends with:
Code: [Select]
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.btf
scripts/link-vmlinux.sh: line 50: 23201 Killed                  ${ld} ${ldflags} -o ${output} ${wl}--whole-archive ${objs} ${wl}--no-whole-archive ${wl}--start-group ${libs} ${wl}--end-group $@ ${ldlibs}
  BTF     .btf.vmlinux.bin.o
pahole: .tmp_vmlinux.btf: Invalid argument
  LD      .tmp_vmlinux.kallsyms1
.btf.vmlinux.bin.o: file not recognized: file format not recognized
make[2]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
make[1]: *** [/source/src/linux-6.5.7/Makefile:1250: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

What package do am I missing for pahole?

Re: Manual kernel compilation fails.

Reply #1
I'd be concerned about
Code: [Select]
scripts/link-vmlinux.sh: line 50: 23201 Killed                  ${ld} ${ldflags} -o ${output} ${wl}--whole-archive ${objs} ${wl}--no-whole-archive ${wl}--start-group ${libs} ${wl}--end-group $@ ${ldlibs}
If that is not completing successfully then maybe .btf.vmlinux.bin.o (and/or .tmp_vmlinux.btf) is missing / empty / corrupt ?

Re: Manual kernel compilation fails.

Reply #2
I realized, the error occurs due to insufficient amount of RAM (6GB isn't enough). Closing topic, sorry for the trouble.