Skip to contentSkip to conversation

libelf is not included in the required software for building the kernel

DISCUSSION Husain Alshehhi 1 participant 1 message Dec 28, 2021 Documentation

lore
Share & tools
lore
#0 lore raw

The minimum requirement doc[1] does not list libelf. When building without libelf, I got the following error:

<stdin>:1:10: fatal error: libelf.h: No such file or directory compilation terminated.

HOSTCC  /home/husain/src/linux/tools/objtool/fixdep.o
HOSTLD  /home/husain/src/linux/tools/objtool/fixdep-in.o
LINK    /home/husain/src/linux/tools/objtool/fixdep
CC      /home/husain/src/linux/tools/objtool/exec-cmd.o
CC      /home/husain/src/linux/tools/objtool/help.o
CC      /home/husain/src/linux/tools/objtool/pager.o
CC      /home/husain/src/linux/tools/objtool/parse-options.o
CC      /home/husain/src/linux/tools/objtool/run-command.o
CC      /home/husain/src/linux/tools/objtool/sigchain.o
CC      /home/husain/src/linux/tools/objtool/subcmd-config.o
LD      /home/husain/src/linux/tools/objtool/libsubcmd-in.o
AR      /home/husain/src/linux/tools/objtool/libsubcmd.a
CC      /home/husain/src/linux/tools/objtool/arch/x86/special.o
In file included from /home/husain/src/linux/tools/objtool/include/objtool/objtool.h:13,
                from /home/husain/src/linux/tools/objtool/include/objtool/arch.h:11,
                from /home/husain/src/linux/tools/objtool/include/objtool/check.h:11,
                from /home/husain/src/linux/tools/objtool/include/objtool/special.h:10,
                from arch/x86/special.c:4:

/home/husain/src/linux/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory 10 | #include <gelf.h>
^~~~~~~~

Should libelf not be part of the list?

[1] <https://www.kernel.org/doc/html/latest/process/changes.html>