LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2006, 03:21 AM   #1
EvilSlim
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Unhappy kernel module make error


Hi all,

I am rather new to this whole world of the Linux kernel and am required to get a program running by the end of this month-end. Its a modification of the chardev.c program taken from the LKMPG 2.6. Well a similar kind of program gets me this kind of error upon executing the make, the whole error message being as follows.

(I sure fedora core 5 and the kernel is obvious from the errors. the program btw intends to print the page table. And if anyone has got similar programs which can help me look at the internal kernel data structures like process descriptors and all I shall be greatly thankful)

[EvilSlim@localhost goba]$ make
gcc -O2 -DMODULE -D__KERNEL__ -isystem /lib/modules/`uname -r`/build/include -c -o print_pagetable.o print_pagetable.c
In file included from /lib/modules/2.6.15-1.2054_FC5/build/include/linux/rwsem.h:27,
from /lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h:42,
from /lib/modules/2.6.15-1.2054_FC5/build/include/linux/sched.h:20,
from /lib/modules/2.6.15-1.2054_FC5/build/include/linux/module.h:10,
from print_pagetable.c:11:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h: In function ‘__down_read’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h:106: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h: In function ‘__down_write’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h:158: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h: In function ‘__up_read’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h:195: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h: In function ‘__up_write’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h:221: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h: In function ‘__downgrade_write’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/rwsem.h:246: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
In file included from /lib/modules/2.6.15-1.2054_FC5/build/include/linux/sched.h:20,
from /lib/modules/2.6.15-1.2054_FC5/build/include/linux/module.h:10,
from print_pagetable.c:11:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h: In function ‘down’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h:105: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h: In function ‘down_interruptible’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h:130: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h: In function ‘down_trylock’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h:155: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h: In function ‘up’:
/lib/modules/2.6.15-1.2054_FC5/build/include/asm/semaphore.h:179: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
print_pagetable.c: In function ‘device_write’:
print_pagetable.c:162: error: expected ‘;’ before ‘{’ token
print_pagetable.c:200: warning: passing argument 1 of ‘pmd_offset’ from incompatible pointer type
print_pagetable.c:205: warning: assignment makes pointer from integer without a cast
print_pagetable.c:230: error: ‘struct mm_struct’ has no member named ‘rss’
make: *** [print_pagetable.o] Error 1


I really cant make anything out of this. And yes, I did do a little bit of searching around the forum but found nothing that really helps. Most of similar topics were without any replies or closures.

Please help me out, thanks in advance..
 
Old 10-17-2006, 08:33 AM   #2
EvilSlim
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
whoaa !

duz neone even get replies in this forum already..
aah damn !!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM
Kernel module programming Error : module not found coolguy_iiit Programming 1 07-30-2006 07:23 AM
how to make my module part of kernel furahm Linux - General 1 07-10-2006 03:33 AM
What can you ACTUALLY make a module for in the kernel? djuhl30 Linux - Hardware 2 01-30-2006 02:34 AM
2.6.0 make module error RTT Slackware 3 12-19-2003 06:14 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration