LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-02-2004, 08:26 PM   #1
lmc
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Rep: Reputation: 0
kernel module mismatch


i am trying to learn module programmimg

The Linux Kernel Module Programming Guide
Peter Jay Salzman
Ori Pomerantz is the online book iam using..


well .. the prob is that i cant load the first programmin eg ..

i am getting the error message " kernel module version mismatch "

here is the make file

TARGET := hello-1
WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
INCLUDE := -isystem /lib/modules/`uname -r`/build/include
CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
CC := gcc-3.0

${TARGET}.o: ${TARGET}.c

.PHONY: clean

clean:
rm -rf {TARGET}.o

what should i do ?

Last edited by lmc; 07-03-2004 at 01:01 AM.
 
Old 07-02-2004, 09:57 PM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
try to set your "uname -r" to the exact name of that directory.

sl mritch.
 
Old 07-03-2004, 12:46 AM   #3
lmc
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Original Poster
Rep: Reputation: 0
no.. thats not working
 
Old 07-03-2004, 01:01 AM   #4
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
This goes outside my narrow area of expertise, but it sounds to me that you are using a popular online book to learn module programming. In this kind of cases it is usual that also many others have had similar problem than you, so a google search (perhaps with the received error message) should quickly produce useful results.
 
Old 07-03-2004, 01:05 AM   #5
lmc
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Original Poster
Rep: Reputation: 0
thanx parrot.. but i reached here.. through.. google while searching
 
Old 07-03-2004, 01:34 AM   #6
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
No offence meant. You do know that there's a special forum here at LinuxQuestions.org dedicated to programming problems, don't you?
 
Old 07-03-2004, 03:02 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.

And please use more descriptive thread titles - "h" tells us nothing at all about the problem you are having.
 
Old 07-03-2004, 03:55 AM   #8
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
A link to the new thread would have been nice..
Edit: .. ah, it is already in programming now..


Well, to the subject.

That
INCLUDE := -isystem /lib/modules/`uname -r`/build/include
line looks suspective. I think there is an -I missing in front of the /lib/modules/... path.

Last edited by ToniT; 07-03-2004 at 03:58 AM.
 
  


Reply



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



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:47 AM.

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
Open Source Consulting | Domain Registration