cb22 / macbook12-spi-driver

WIP input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1)
GNU General Public License v2.0
298 stars 103 forks source link

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

Open wheelcomplex opened 6 years ago

wheelcomplex commented 6 years ago
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+'
arno01 commented 5 years ago

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.