(+CC: Josh Poimboeuf,Peter Zijlstra, objtool maintainer) On Thu, May 18, 2023 at 8:27 AM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > > This is on v6.4-rc1. I fat-fingered the make target (I intended > "pciehp.o", not "pciehp.c"), then interrupted the build when I noticed > my mistake: > > 06:04:15 ~/linux (hotplug)$ make drivers/pci/hotplug/pciehp.c > SYNC include/config/auto.conf.cmd > ^Cmake: *** [include/config/auto.conf.cmd] Deleting file 'include/generated/rustc_cfg' > make: *** [include/config/auto.conf.cmd] Deleting file 'include/generated/autoconf.h' > make[2]: *** [scripts/kconfig/Makefile:77: syncconfig] Interrupt > make[1]: *** [Makefile:692: syncconfig] Interrupt > make: *** [Makefile:793: include/config/auto.conf.cmd] Interrupt > > Subsequent builds now fail ("pciehp.o" is *also* an incorrect target, > but doesn't seem related to the error): > > 06:04:22 ~/linux (hotplug)$ make drivers/pci/hotplug/pciehp.o > SYNC include/config/auto.conf.cmd > UPD include/config/kernel.release > UPD include/generated/utsrelease.h > UPD include/generated/compile.h > CC scripts/mod/empty.o > MKELF scripts/mod/elfconfig.h > HOSTCC scripts/mod/modpost.o > CC scripts/mod/devicetable-offsets.s > HOSTCC scripts/mod/file2alias.o > HOSTCC scripts/mod/sumversion.o > HOSTLD scripts/mod/modpost > CC kernel/bounds.s > CC arch/x86/kernel/asm-offsets.s > CALL scripts/checksyscalls.sh > DESCEND objtool > HOSTCC /home/bjorn/linux/tools/objtool/fixdep.o > HOSTLD /home/bjorn/linux/tools/objtool/fixdep-in.o > LINK /home/bjorn/linux/tools/objtool/fixdep > make[4]: *** No rule to make target '/usr/include/x86_64-linux-gnu/bits/sys_errlist.h', needed by '/home/bjorn/linux/tools/objtool/libsubcmd/exec-cmd.o'. Stop. > make[3]: *** [Makefile:80: /home/bjorn/linux/tools/objtool/libsubcmd/libsubcmd-in.o] Error 2 > make[2]: *** [Makefile:78: /home/bjorn/linux/tools/objtool/libsubcmd/libsubcmd.a] Error 2 > make[1]: *** [Makefile:73: objtool] Error 2 > make: *** [Makefile:1440: tools/objtool] Error 2 > > I finally got the right target, but the build still fails: > > 06:04:39 ~/linux (hotplug)$ make drivers/pci/hotplug/ > CALL scripts/checksyscalls.sh > DESCEND objtool > make[4]: *** No rule to make target '/usr/include/x86_64-linux-gnu/bits/sys_errlist.h', needed by '/home/bjorn/linux/tools/objtool/libsubcmd/exec-cmd.o'. Stop. > make[3]: *** [Makefile:80: /home/bjorn/linux/tools/objtool/libsubcmd/libsubcmd-in.o] Error 2 > make[2]: *** [Makefile:78: /home/bjorn/linux/tools/objtool/libsubcmd/libsubcmd.a] Error 2 > make[1]: *** [Makefile:73: objtool] Error 2 > make: *** [Makefile:1440: tools/objtool] Error 2 > > After "make distclean", everything works as expected, so maybe this is > just the expected behavior after my initial user error? I dunno; it > seemed surprising. Just FYI. > > Bjorn I do not know what is happening on your build machine, but judging from the error log, something went wrong while building objtool. objtool Makefile is not a part of Kbuild. The maintainers of objtool may have some insight. BTW, I could not reproduce the issue. I could not find anything weird from the Kbuild perspective so far. The errors in the single target builds are expected. This is what I did. $ git clean -fdx $ make defconfig $ make drivers/pci/hotplug/pciehp.c -> Fail. This is expected behavior $ make drivers/pci/hotplug/pciehp.o -> Fail. This is also expected behavior because CONFIG_HOTPLUG_PCI_PCIE is unset $ make drivers/pci/hotplug/ -> success for me Is this the same command sequence as you did? -- Best Regards Masahiro Yamada