LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   ERROR in make file (http://www.linuxquestions.org/questions/linux-kernel-70/error-in-make-file-440238/)

sajjadc 04-30-2006 06:19 AM

ERROR in make file
 
dear friends

im a newbie in module programming , there is an error in my make file

can u help me



###########################################################

hello.c

##############################################

#include<linux/module.h>

#include<linux/kernel.h>

int init_module(void)

{

printk(KERN_ALERT "hello world");

return 0;

}

void cleanup_module(void)

{

printk(KERN_ALERT "good bye");

}

#########################################

Makefile

########################################

obj-m += hello.o

PWD = $(shell pwd)

all:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:

make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

###################################

after compiling , i get the error message

make: Nothing to be done for `all'.

sajjadc 04-30-2006 07:22 AM

strace make
_------------------------------------------------------------------
execve("/usr/bin/make", ["make"], [/* 34 vars */]) = 0
uname({sys="Linux", node="localhost.localdomain", ...}) = 0
brk(0) = 0x9c3c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=85733, ...}) = 0
old_mmap(NULL, 85733, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf6feb000
close(3) = 0
open("/lib/tls/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 _t\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1454835, ...}) = 0
old_mmap(0x731000, 1215644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x731000
old_mmap(0x854000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x123000) = 0x854000
old_mmap(0x858000, 7324, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x858000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6fea000
mprotect(0x854000, 4096, PROT_READ) = 0
mprotect(0x72d000, 4096, PROT_READ) = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xf6feaaa0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xf6feb000, 85733) = 0
brk(0) = 0x9c3c000
brk(0x9c5d000) = 0x9c5d000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=39552048, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf6dea000
close(3) = 0
rt_sigaction(SIGHUP, {0x804b26a, [HUP], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x804b26a, [QUIT], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x804b26a, [INT], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x804b26a, [TERM], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGXCPU, {0x804b26a, [XCPU], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGXFSZ, {0x804b26a, [XFSZ], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
getcwd("/root/kp", 4096) = 9
stat64("/usr/include", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat64("/usr/gnu/include", 0xfef4e7b0) = -1 ENOENT (No such file or directory)
stat64("/usr/local/include", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/include", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
rt_sigaction(SIGCHLD, {0x8051bca, [CHLD], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x8053be5, [USR1], SA_RESTORER|SA_RESTART, 0x758a48}, {SIG_DFL}, 8) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 8 entries */, 4096) = 248
getdents64(3, /* 0 entries */, 4096) = 0
close(3) = 0
open("makefile", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6de9000
read(3, "obj-m += hello.o\nPWD = $(shell p"..., 4096) = 175
pipe([4, 5]) = 0
vfork() = 3259
close(5) = 0
read(4, "2.6.9-5.ELhugemem\n", 200) = 18
read(4, "", 182) = 0
close(4) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3259
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
pipe([4, 5]) = 0
vfork() = 3260
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
close(5) = 0
read(4, "2.6.9-5.ELhugemem\n", 200) = 18
read(4, "", 182) = 0
close(4) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3260
read(3, "", 4096) = 0
close(3) = 0
munmap(0xf6de9000, 4096) = 0
stat64("RCS", 0xfef4e760) = -1 ENOENT (No such file or directory)
stat64("SCCS", 0xfef4e760) = -1 ENOENT (No such file or directory)
stat64("makefile", {st_mode=S_IFREG|0644, st_size=175, ...}) = 0
gettimeofday({1146398809, 629124}, NULL) = 0
stat64("all", 0xfef4e620) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6de9000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096) = 0
close(3) = 0
munmap(0xf6de9000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6de9000
write(1, "make: Nothing to be done for `al"..., 36make: Nothing to be done for `all'.
) = 36
chdir("/root/kp") = 0
munmap(0xf6de9000, 4096) = 0
exit_group(0) = ?
-------------------------------------------------------------------------can any one help me


All times are GMT -5. The time now is 05:06 PM.