macbook12-spi-driver icon indicating copy to clipboard operation
macbook12-spi-driver copied to clipboard

workaround for: No rule to make target 'tools/objtool/objtool', needed by '/usr/src/applespi-0.1/applespi.o'.

Open wheelcomplex opened this issue 6 years ago • 1 comments

root@davidws:/usr/src/applespi-0.1# make
make -C /lib/modules/4.17.0-qemu-4.17-1+/build M=/usr/src/applespi-0.1 modules
make[1]: Entering directory '/usr/src/linux-headers-4.17.0-qemu-4.17-1+'
make[2]: *** No rule to make target 'tools/objtool/objtool', needed by '/usr/src/applespi-0.1/applespi.o'.  Stop.
Makefile:1571: recipe for target '_module_/usr/src/applespi-0.1' failed
make[1]: *** [_module_/usr/src/applespi-0.1] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.17.0-qemu-4.17-1+'
Makefile:11: recipe for target 'all' failed
make: *** [all] Error 2

workaround from https://lists.debian.org/debian-knoppix/2017/01/msg00002.html

root@davidws:/usr/src/applespi-0.1# make CONFIG_STACK_VALIDATION=
make -C /lib/modules/4.17.0-qemu-4.17-1+/build M=/usr/src/applespi-0.1 modules
make[1]: Entering directory '/usr/src/linux-headers-4.17.0-qemu-4.17-1+'
  CC [M]  /usr/src/applespi-0.1/applespi.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/applespi-0.1/applespi.mod.o
  LD [M]  /usr/src/applespi-0.1/applespi.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.17.0-qemu-4.17-1+'

wheelcomplex avatar Jul 03 '18 02:07 wheelcomplex

I had the same issue, it was due to a missing libelf-dev package. While watching the compilation process, make command printed the following message:

...
  DEPMOD  4.17.0-ubuntu-4.17
Makefile:972: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  SIGN [M] ./debian/tmp/lib/modules/4.17.0-ubuntu-4.17/kernel/arch/x86/crypto/aesni-intel.ko
  SIGN [M] ./debian/tmp/lib/modules/4.17.0-ubuntu-4.17/kernel/arch/x86/crypto/aes-x86_64.ko
...

Having the libelf-dev installed, solved this issue. No workaround was needed.

arno01 avatar Sep 18 '18 11:09 arno01