LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   make: *** /lib/modules//build: No such file or directory. Stop. (http://www.linuxquestions.org/questions/linux-newbie-8/make-%2A%2A%2A-lib-modules-build-no-such-file-or-directory-stop-816722/)

boidi 06-27-2010 11:49 PM

make: *** /lib/modules//build: No such file or directory. Stop.
 
Hi everyone,

I am running in fc9.while doing make i have this issue
make: *** /lib/modules//build: No such file or directory. Stop.
please help me

grail 06-27-2010 11:55 PM

ummmm ... make to compile what??

boidi 06-28-2010 12:19 AM

i am excuting this program,

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void) {
printk("<1> Hello world!\n");
return 0;
}

static void hello_exit(void) {
printk("<1> Bye, cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);

make file for above code is

Makefile

obj-m := hello.o
KVERSION = $(2.6.25-14.fc9.i686)

all:

make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:

make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
~




after doing make i am getting

make -C /lib/modules//build M=/home/DRAX modules
make: *** /lib/modules//build: No such file or directory. Stop.
make: *** [all] Error 2



but i checked in /lib/modules/2.6.25-14.fc9.i686/ path, build file is there, it is in red colour like this

build -> ../../../usr/src/kernels/2.6.25-14.fc9.i686

what is that mean?

grail 06-28-2010 12:24 AM

Check how you are setting the KVERSION variable ;)

boidi 06-28-2010 12:36 AM

i am the beginer to linux,
i saw how to write a make file for module, in that he given KVERSION = $(username -r)

boidi 06-28-2010 12:50 AM

sorry,
it is KVERSION = $(uname -r)

boidi 06-28-2010 01:48 AM

anybody please help me

grail 06-28-2010 01:59 AM

You are on the right track :)

The difference is that the following:
Quote:

KVERSION = $(uname -r)
This runs the command 'uname' with the '-r' switch and returns the value to the variable KVERSION.

However, your copy in your Makefile says:
Quote:

KVERSION = $(2.6.25-14.fc9.i686)
So now it is trying to run the string "2.6.25-14.fc9.i686" and send the output to variable KVERSION, but of course a string cannot be run.

So either stick with the original call to 'uname' or simply assign the string, ie without $() around it.

boidi 06-28-2010 03:18 AM

but still i am getting error like this

make -C /lib/modules/2.6.25-14.fc9.i686/build M=/home/DRAX modules
make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
make: *** [all] Error 2

boidi 06-28-2010 03:21 AM

but still i am getting error like this

make -C /lib/modules/2.6.25-14.fc9.i686/build M=/home/DRAX modules
make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
make: *** [all] Error 2

knudfl 06-28-2010 03:57 AM

Post # 3
Quote:

but i checked in /lib/modules/2.6.25-14.fc9.i686/ path,
build file is there, it is in red colour like this

build -> ../../../usr/src/kernels/2.6.25-14.fc9.i686
A link shown in red is a broken link.
I.e. a link pointing to a non existing file / directory.

Please show the output of : 'ls -l /usr/src/kernels/'

And from : rpm -qa | grep kernel
.

boidi 06-28-2010 05:47 AM

Please show the output of : 'ls -l /usr/src/kernels/'

And from : rpm -qa | grep kernel


1)kernels folder is not there in /usr/src

2) rpm -qa | grep kernel

kerneloops-0.10-11.fc9.i386
kernel-2.6.25-14.fc9.i686
kernel-headers-2.6.25-14.fc9.i386

knudfl 06-28-2010 07:04 AM

OK, then :

# yum install kernel-devel

..

boidi 06-28-2010 11:20 PM

while doing yum install kernel-devel i am getting

Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mir...ra-9&arch=i386 error was
[Errno 4] IOError: <urlopen error (110, 'Connection timed out')>
http://download.fedora.redhat.com/pu...ta/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

knudfl 06-29-2010 01:40 AM

Why in the first place use an old obsolete Linux ?
Better install Fedora 13.

Fedora 9 was moved to the old archive long time ago.
http://download.fedora.redhat.com/pu...thing/i386/os/

Old updates
http://download.fedora.redhat.com/pu...pdates/9/i386/

So you will have to use those two mirrors instead :
/etc/yum.repos.d/"new.repo"
http://forums.fedoraforum.org/showthread.php?t=221471
..


All times are GMT -5. The time now is 01:00 PM.