LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-07-2006, 12:53 PM   #1
dudulz
Member
 
Registered: Feb 2005
Location: Australia
Distribution: [Redhat] [Slackware] [SuSe] [FreeBSD]
Posts: 81

Rep: Reputation: 15
Question Modules insmod error


I have compile source code as module. my command in Makefile is

gcc -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS -DCONFIG_IP_VS_DEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -c -o ip_ftp.o ip_ftp.c

when i insmod -f ip_ftp.o some error is :
ip_ftp.o: unresolved symbol nr_free_pages
ip_ftp.o: unresolved symbol page_cache_size
ip_ftp.o: unresolved symbol ip_mc_join_group

To solve this problem i have add that line in ksyms.c. Then i compile ksyms.c with
gcc -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS -DCONFIG_IP_VS_DEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h -c -o ip_ksyms.o ksyms.c

Why when i try compile ip_ftp again, there is still unresolve symbol.
Thanks about the help
 
Old 03-08-2006, 08:41 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
It seems like there is another module that this particular module is dependant on. Have you tried using 'modprobe' instead of 'insmod' to load the module? 'modprobe' will make an attempt at finding dependancies for the module you are loading, whereas 'insmod' will not.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to re-insmod allready loaded modules? polemon Linux - Newbie 3 02-25-2006 12:22 PM
How to insmod modules successfully with Fedora Core 3 elvisda Linux - Software 0 11-10-2005 03:12 AM
modprobe and insmod same modules, diff kernel ? qwijibow Linux - Software 1 11-06-2003 09:22 AM
bootup tries to insmod i810 modules: i don't want it to do so (it fails anyway) TheOneAndOnlySM Slackware 4 10-13-2003 06:57 PM
A question about modules and insmod... Defboy2k Linux - Newbie 3 11-05-2002 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:10 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
Open Source Consulting | Domain Registration