LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't find source files in Mandriva 2007 i586 (https://www.linuxquestions.org/questions/linux-software-2/cant-find-source-files-in-mandriva-2007-i586-510747/)

mschrank99 12-15-2006 11:34 AM

Can't find source files in Mandriva 2007 i586
 
I'm trying to run the following command to compile a driver (taken from here http://acx100.erley.org/howto.txt):

make -C /lib/modules/`uname -r`/build M=`pwd`

Which gives:

make: *** /lib/modules/2.6.17-5mdv/build: No such file or directory. Stop.

Now, as far as I know, this is where the kernel source is usually stored in most distros. However, in Mandriva 2007 (i586), there simply is no /lib/modules/2.6.17-5mdv/build directory at all.

However, the package manager says the source is installed.

What should I do? Try reinstalling the kernel source RPM? Please help.

tredegar 12-15-2006 11:49 AM

What directories do you have in /lib/modules/ ?
One of them should match the output of uname -r (which is the kernel you are running).
Maybe you have the wrong source for your installed kernel?

mschrank99 12-15-2006 01:23 PM

/lib/modules:

drwxr-xr-x 3 root root 1024 Oct 22 15:16 2.6.17-5mdv/
drwxr-xr-x 3 root root 1024 Oct 22 15:16 fglrx/


/lib/modules/2.6.17-5mdv/

drwxr-xr-x 11 root root 1024 Oct 22 11:22 kernel/
-rw-r--r-- 1 root root 310891 Oct 22 15:16 modules.alias
-rw-r--r-- 1 root root 69 Oct 22 15:16 modules.ccwmap
-rw-r--r-- 1 root root 333059 Oct 22 15:16 modules.dep
-rw-r--r-- 1 root root 62937 Sep 13 14:14 modules.description
-rw-r--r-- 1 root root 887 Oct 22 15:16 modules.ieee1394map
-rw-r--r-- 1 root root 730 Oct 22 15:16 modules.inputmap
-rw-r--r-- 1 root root 21762 Oct 22 15:16 modules.isapnpmap
-rw-r--r-- 1 root root 74 Oct 22 15:16 modules.ofmap
-rw-r--r-- 1 root root 245162 Oct 22 15:16 modules.pcimap
-rw-r--r-- 1 root root 1051 Oct 22 15:16 modules.seriomap
-rw-r--r-- 1 root root 133743 Oct 22 15:16 modules.symbols
-rw-r--r-- 1 root root 361465 Oct 22 15:16 modules.usbmap

What is this reference to 'build' asking for- what is build? Is it a program that needs to be installed?

tredegar 12-16-2006 03:36 AM

On my machine /lib/modules/2.4.21-0.13MWAmdk/build is a link to /usr/src/linux-2.4.21-0.13MWAmdk
So maybe you should make a similar link to your kernel source.

mschrank99 12-16-2006 03:49 PM

My machine doesn't have that dir.

Come on, someone must know what the heck this 'build' thing is wanting, what is the significance of this

make -C /lib/modules/`uname -r`/build M=`pwd`

what is it making and what is the 'build' directory?

lebabyg 12-16-2006 08:07 PM

Do you have your source files installed?? Do rpm -qa | grep kernel. (as root)
For me this brings up

kernel-source-2.6.17.6mdv-1-1mdv2007.0
kernel-2.6.17.6mdv-1-1mdv2007.0

Amongst kernels. If you do not have the corresponding source file (kernel-source) that matches your running kernel then this is the problem. I apologise in advance if you do have the sources installed and the problem is more complex its just that i had a similar problem that eluded me for a while and it was because i had the kernel-source-stripped installed. Cheers
Graham


All times are GMT -5. The time now is 04:43 PM.