LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-26-2007, 03:11 AM   #1
pathak_ashish
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Unhappy Unable to compile loadable module for FC5


Hi,

I am facing problem while compiling loadable module for FC5 kernel 2.6.15.1_2054FC5. I am not able to get files named "hello.o" & "hello.ko" after compiling module "hello.c".
This is how my Makefile looks like:

obj -m += hello.o

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

This is the error which I am getting when do make:

make -C /lib/modules/2.6.15-1.2054_FC5/build M=/root modules
make[1]: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686'

WARNING: Symbol version dump /usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686/Module.symvers
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.

MODPOST

make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686'

How I will be able to get file Module.symers?
 
Old 11-27-2007, 12:11 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Module.symers is installed by the kernel-devel package in
Code:
/usr/src/kernels/$(uname -r)-i686/
 
Old 12-01-2007, 03:26 AM   #3
pathak_ashish
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
now what should I do compile module

Thanks for replying colucix...

So what can I do get that file(Module.symers)to proceed further with lodable module compilation.
 
Old 12-01-2007, 09:17 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Well... it looks like there is a problem with the path of the kernel headers. Please can you post the output of the following commands?
Code:
uname -a
rpm -q kernel kernel-devel
rpm -ql kernel-devel | grep Module.symvers
ls -ld /lib/modules/$(uname -r)/build
The latter should be a link to the directory containing the kernel headers, the ones provided by the kernel-devel packages. I suspect there is something wrong here.
 
Old 12-03-2007, 05:13 AM   #5
pathak_ashish
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Question how to install kernel-dlevel package ?

Hi colucix,

Thanks for replying. As you told I executed following commands:

1. uname -a

Linux localhost.localdomain 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686 i386 GNU/Linux

2. rpm -q kernel kernel-dlevel

kernel-2.6.15-1.2054_FC5
package kernel-dlevel is not installed

3. rpm -ql kernel-dlevel | grep Module.symvers
gave no output

4. ls -ld /lib/modules/$(uname -r)/build

lrwxrwxrwx 1 root root 53 Nov 21 19:32 /lib/modules/2.6.15-1.2054_FC5/build -> /usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686

You were spoton with the answer. Now how should I install Kernel-dlevel package?
 
Old 12-03-2007, 05:41 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
It is kernel-devel (you made a typo). You can re-try the correct one
Code:
rpm -ql kernel-devel | grep Module.symvers
if you find that the kernel-devel package is actually not installed, first of all you have to install it by your usual package manager, being sure to match exactly the version of the current kernel
Code:
kernel-devel-2.6.15-1.2054_FC5
Then, please retry commands 3 and 4 from my previous post.

Last edited by colucix; 12-03-2007 at 05:42 AM.
 
Old 10-03-2009, 03:16 AM   #7
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,672
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
I m too facing the problem stated by 'pathak_ashish'.

As per 'colucix's advice i tried to install kernel-devel through yast on suse 10.3. Yast is unable to find the stated package !!

kindly help !
 
  


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
Unable to load the kernel module 'nvidia.ko' in FC5! saquib Fedora 2 02-18-2007 08:12 PM
unable to compile module abk4523 Linux - Kernel 2 02-02-2007 10:45 AM
Cisco VPN Client unable to load kernel module in FC5 cuco76 Linux - Software 3 10-19-2006 11:11 AM
switch GTK font problem + Unable to locate loadable module in module_path asmar Linux - Software 0 10-05-2005 02:52 PM
unable to compile scsi_mod as module in 2.6.9 nbd Linux - General 5 11-28-2004 11:56 AM


All times are GMT -5. The time now is 02:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration