Trouble compiling out of tree kernel module in 12.04
Santanu Chatterjee
thisissantanu at gmail.com
Tue Oct 23 20:26:18 UTC 2012
Hello Everybody,
I was trying to compile a simple hello world kind of kernel module. I
installed the relevant linux-headers package, linked my
/lib/modules/$(uname -r)/build to point to the linux-headers
directory. But when I try to run make, I get the following error:
-------------------
make -C /lib/modules/3.2.0-32-generic-pae/build modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-32-generic-pae'
make[2]: *** No rule to make target `arch/x86/tools/relocs.c', needed
by `arch/x86/tools/relocs'. Stop.
make[1]: *** [archscripts] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-32-generic-pae'
make: *** [all] Error 2
--------------------
I am attaching my hello.c and Makefile in case anyone wants to take a look.
Can anyone tell me what am I missing? (I have tried 'make' with sudo
and without sudo, just in case... but no luck)
Regards,
Santanu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.c
Type: text/x-csrc
Size: 274 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121024/19f179cd/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 137 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121024/19f179cd/attachment.obj>
More information about the ubuntu-users
mailing list