Wednesday, March 10, 2010

Solution for : No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'

Error:
make -C /lib/modules/2.6.28-11-generic/build M= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'\
.  Stop.
make[1]: *** [prepare0] Error 2

Solution for this is :
siva@ubuntu:/usr/src$ sudo apt-get --reinstall install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 304 not upgraded.
Need to get 0B/668kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y


Then my module was succesfully compiled as follows:
siva@ubuntu:~/ldd/ydevice$ make
make -C /lib/modules/2.6.28-11-generic/build M=/home/siva/ldd/ydevice modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
  CC [M]  /home/siva/ldd/ydevice/ydevice.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/siva/ldd/ydevice/ydevice.mod.o
  LD [M]  /home/siva/ldd/ydevice/ydevice.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'

Thanks to : http://ubuntuforums.org/showthread.php?t=1047374

2 comments: