How to fix : No rule to make target?
10,016
Make sure you have proper make file. this is a very common issue. or you could use below statement in makefile also.
obj-m += your_module_name.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
it should work.
Related videos on Youtube
Author by
Sagar
Updated on June 04, 2022Comments
-
Sagar almost 2 years
I am trying to build a demo kernel module, but when I do make, I get following,
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-47-generic' make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop. arch/x86/Makefile:199: recipe for target 'archheaders' failed make[1]: *** [archheaders] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-47-generic' Makefile:4: recipe for target 'all' failed
I am building module across linux kernel - 4.4.0-47 version - 64 bit OS. Can anyone please help me to understand why I am facing this Error.Thank you in advance.
-
Tsyvarev over 7 yearsHave you tried to google? Error
No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl'
is quite popular and may have several underline problems. How exactly do you compile kernel module (which makefile or which command line do you use)?
-
-
Gomtesh Hatgine over 3 yearsI am using the same code above still getting error a mentioned in question
-
Suchandan Dey over 3 years@GomteshHatgine can you please post the makefile content in case you are still facing the issue.