LinuxQuestions.org
Help answer threads with 0 replies.
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 12-27-2004, 02:30 AM   #1
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Rep: Reputation: 15
Talking what's wrong with my program


i written a module by myself,then i complied it with gcc and successed . but when i run the command of insmod the wrong messages showed like that: your kernel dismatch,your kernel is 2.4.20-8 while the module complied with gcc is 2.4.20.
please tell me how to fixed this problem, thinkyou so much.
(the distribution of my linux is redhat 9.0)
 
Old 12-27-2004, 11:53 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I would think, if you program kernel modules you have to compile the kernel source to set your
environment proprely.

Or at least try to upgrade your gcc package
 
Old 12-27-2004, 08:43 PM   #3
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
thankyou very much, but i am a newer, could you tell me how to upgrade my gcc package or compile the kernel source on my redhat.
thanks again.
 
Old 12-28-2004, 12:08 AM   #4
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by kira
thankyou very much, but i am a newer, could you tell me how to upgrade my gcc package or compile the kernel source on my redhat.
thanks again.
Your problem was not due to gcc package. Its cause your module was compiled with kernel header other than your current running kernel (2.4.20-8). Append (-I/usr/src/linux/inlcude) to gcc (if your current running kernel source code was there).

Hope this help,
Giang Hu.
 
Old 12-28-2004, 10:25 PM   #5
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
thanks, I will try it.
 
Old 12-28-2004, 11:23 PM   #6
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
I successed in compilation. but when I try to loading moudle with insmod then the wrong messages showed again like that: you are trying load a module without a GPL compatible license and it has unresloved symbols, the module may be trying to access GPLONLY symbols but the problem is more likely to be a coding or user error. contract the module supplier for assistance, only they can help you.

could you tell me what can I do to solve this problem,thanks again.
 
Old 12-29-2004, 09:42 PM   #7
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
There seems to be nobody reply me. Please show me what cause my program failed and tell me how to fixed it,thanks.
 
Old 12-29-2004, 09:54 PM   #8
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by kira
There seems to be nobody reply me. Please show me what cause my program failed and tell me how to fixed it,thanks.
Could you try to install a skeleton module? And then insert one by one function to figure out what's cause problem, I think.

Have a nice day,
Giang Hu
 
Old 12-30-2004, 06:31 AM   #9
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
Thanks,freegianghu. I am going to try it. Have anice day too.
 
Old 12-30-2004, 11:29 PM   #10
kira
Member
 
Registered: Dec 2004
Distribution: redhat linux
Posts: 88

Original Poster
Rep: Reputation: 15
When insmod my module, the error occured again and messaged that: unsolved symbols sys_call_table.
What's that? and how to fixed,thanks.
 
Old 01-01-2005, 05:30 AM   #11
Genjix
Member
 
Registered: Oct 2003
Location: Pico
Distribution: SUSE 9.1
Posts: 83

Rep: Reputation: 15
umm... it might be that the interrupts have no interface with the kernel... but i dont know how to fix it :P
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
why output is wrong ( C Program ) minil Programming 7 02-23-2005 06:05 AM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 12:46 AM
Program starts on wrong desktop johnmart Linux - Newbie 2 12-07-2004 10:44 AM
What is wrong with the program? Xiangbuilder Programming 11 09-15-2003 12:49 AM
what is wrong with my program? nakkaya Programming 1 03-13-2003 02:58 AM

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

All times are GMT -5. The time now is 06:25 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