Skip to contentSkip to conversation

tools/objtool: check.c:11:10: fatal error: arch/elf.h: No such file or directory

DISCUSSION Vitaly Chikunov 2 participants 3 messages Aug 1, 2022 – Aug 3, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

git bisect shows that commit b51277eb9775 ("objtool: Ditch subcommands") included in v5.19 introduces build failure on aarch64 for tools/objtool:

  builder@aarch64:~/linux/tools$ make clean
  builder@aarch64:~/linux/tools$ make objtool
    DESCEND objtool
  make -C /usr/src/linux/tools/build CFLAGS= LDFLAGS= fixdep
    HOSTCC  fixdep.o
    HOSTLD  fixdep-in.o
    LINK    fixdep
  make -C /usr/src/linux/tools/lib/subcmd/ OUTPUT=/usr/src/linux/tools/objtool/
  make -C /usr/src/linux/tools/build CFLAGS= LDFLAGS= /usr/src/linux/tools/objtool/fixdep
    HOSTCC  /usr/src/linux/tools/objtool/fixdep.o
    HOSTLD  /usr/src/linux/tools/objtool/fixdep-in.o
    LINK    /usr/src/linux/tools/objtool/fixdep
    CC      /usr/src/linux/tools/objtool/exec-cmd.o
    CC      /usr/src/linux/tools/objtool/help.o
    CC      /usr/src/linux/tools/objtool/pager.o
    CC      /usr/src/linux/tools/objtool/parse-options.o
    CC      /usr/src/linux/tools/objtool/run-command.o
    CC      /usr/src/linux/tools/objtool/sigchain.o
    CC      /usr/src/linux/tools/objtool/subcmd-config.o
    LD      /usr/src/linux/tools/objtool/libsubcmd-in.o
    AR      /usr/src/linux/tools/objtool/libsubcmd.a
    LD      arch/arm64/objtool-in.o
    CC      weak.o
    CC      check.o
  check.c:11:10: fatal error: arch/elf.h: No such file or directory
     11 | #include <arch/elf.h>
	|          ^~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [/usr/src/linux/tools/build/Makefile.build:97: check.o] Error 1
  make[1]: *** [Makefile:54: objtool-in.o] Error 2
  make: *** [Makefile:73: objtool] Error 2

This is on ALT Linux using gcc-12.

Thanks,

#1 lore raw
Quoted 4 lines · Vitaly Chikunov

Hello,

git bisect shows that commit b51277eb9775 ("objtool: Ditch subcommands") included in v5.19 introduces build failure on aarch64 for tools/objtool:

Objtool doesn't yet support arm64, what are you trying to achieve?

Signature · 1 line
Josh
#2 lore raw

Josh,

Quoted 7 lines · Josh Poimboeuf
Quoted 4 lines · Vitaly Chikunov

Hello,

git bisect shows that commit b51277eb9775 ("objtool: Ditch subcommands") included in v5.19 introduces build failure on aarch64 for tools/objtool:

Objtool doesn't yet support arm64, what are you trying to achieve?

IC. It was building successfully for our linux-tools package before (as it seems it builds for Debian[1]) just as one of the tools. If it should not be there, thanks for the elucidation, we will stop trying to build it.

Thanks,

[1] https://debian.pkgs.org/sid/debian-main-arm64/linux-kbuild-5.18_5.18.14-1_arm64.deb.html

Quoted 3 lines
Signature · 2 lines
-- 
Josh