LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-23-2007, 12:28 PM   #1
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
make[1]: *** No rule to make target `modules'. Stop.


not sure if this is the right place to put this but,
when trying to compile a module for a wireless adapter (rt2570 from seriamonkey) i have a problem. I run the make command and get this

Code:
make[1]: Entering directory `/usr/src/linux-2.6.18.2-34-obj/i386/default'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/i386/default'
rt2570.ko failed to build!
make: *** [module] Error 1
tom:/home/thomas/Desktop/rt2570-1.1.0-b2/rt2570-1.1.0-b2/Module #
its probably something really simple - any help would be greatly appreciated!
Thanks
 
Old 07-23-2007, 12:59 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Do you have the kernel headers installed?
 
Old 07-23-2007, 02:29 PM   #3
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Original Poster
Rep: Reputation: 15
yes,
thats why i'm so confused..

any other ideas?
 
Old 07-23-2007, 02:39 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
And the kernel headers do match the current kernel version? Otherwise, this should work fine...
 
Old 07-23-2007, 02:59 PM   #5
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Original Poster
Rep: Reputation: 15
ok, how would i make sure that what you have said is correctly installed on my system?

all im relying on is what yast is telling me is installed (using opensuse)
 
Old 07-23-2007, 05:55 PM   #6
BootLaptop
LQ Newbie
 
Registered: May 2007
Posts: 27

Rep: Reputation: 15
When i got this error it was because I issued the command in a directory other than the directory where ndiswrapper was created by the tar command.
 
Old 07-24-2007, 05:34 AM   #7
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Original Poster
Rep: Reputation: 15
hi,
but from what i can see here, it has found the makefile (so i'm issuing "make" in the correct directory) but then get:

Code:
make[1]: *** No rule to make target `modules'.  Stop.
 
Old 07-24-2007, 10:51 PM   #8
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
In the Makefile you may find a line like:

KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build

When this is read the $(shell uname -r) part gets changed to whatever the output of the command 'uname -r' is.

Check that there really are kernel header files in that location. If not just edit the Makefile to set the correct location.
 
Old 09-30-2007, 04:15 AM   #9
bonder
LQ Newbie
 
Registered: Sep 2007
Distribution: Debian Lenny
Posts: 9

Rep: Reputation: 0
I'm having a similar problem trying to install the rt73 serialmonkey driver on Ubuntu 7.04. When I run the make command I get the following output:
Code:
make[1]: Entering directory `/lib/modules/2.6.20-16-386/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory '/lib/modules/2.6.20-16-386/build'
rt73.ko failed to build!
make: *** [module] Error 1
As you can see, it's pretty much the same output as in the OP. I have the correct kernel headers installed and I tried editing the make file as maroonbaboon suggested to no avail. I wish I could offer some help, but I'm afraid I'm in the same boat as tjyorkshire.
 
Old 09-30-2007, 07:27 AM   #10
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
What did you change the KERNEL_SOURCES line to? Looks like the output of your 'make' command might still be using the uname -r version.

What is in the directory /lib/modules/2.6.20-16-386/build ?

Too bad the o/p did not reply. At the time I had access to an Ubuntu system, but now can't recall the exact setup.
 
Old 09-30-2007, 10:18 AM   #11
NemoTheBlue
LQ Newbie
 
Registered: Sep 2007
Distribution: Ubuntu 7.04 Server
Posts: 8

Rep: Reputation: 0
Hi guys, I'm having exactly the same problem trying to install a NIC driver. I'm something of a noob with Linux, though. What exactly are kernel headers? And what should be the connection between KERNEL_SOURCES and the contents of the /build folder?

By the way, when you say edit the makefile, will I be using vi for that?

Edit: I should mention that I originally got a message saying the /build folder did not exist, but since I thought it was just a target directory I went and mkdir'd it. What should be in there?

Last edited by NemoTheBlue; 09-30-2007 at 10:23 AM.
 
Old 09-30-2007, 02:37 PM   #12
bonder
LQ Newbie
 
Registered: Sep 2007
Distribution: Debian Lenny
Posts: 9

Rep: Reputation: 0
The KERNEL_SOURCES line of the Makefile originally read:
Code:
ifdef KERNDIR
 KERNEL_SOURCES := $(KERNDIR)
else
 KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build
endif
Edit: That was the state of the Makefile for the output I posted previously

I changed this to:
Code:
ifdef KERNDIR
 KERNEL_SOURCES := $(KERNDIR)
else
 KERNEL_SOURCES := /usr/src/linux-headers-2.6.20-16-386/build
endif
when I tried running make with the modified Makefile, I got pretty much the same output as before:
Code:
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-386/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-2.6.20-16-386/build'
rt73.ko failed to build!
make: *** [module] Error 1
Like NemoTheBlue, I got a message saying that the /build file did not exist (both /lib/modules/2.6.20-16-386/build and /usr/src/linux-headers-2.6.20-16-386/build for the pre- and post-modified Makefile, respectively), so I created them using mkdir. So, both the build folders are empty. Could it be something as simple as I'm missing some packages necessary to do this?

Edit: @NemoTheBlue, you can use whatever text editor you want to edit the Makefile. I used vim, you can use that or gedit, or emacs, or whatever your text editor of choice is.

Last edited by bonder; 09-30-2007 at 02:44 PM. Reason: edited for clarification and to add more information
 
Old 09-30-2007, 09:19 PM   #13
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Quote:
Originally Posted by bonder View Post
So, both the build folders are empty. Could it be something as simple as I'm missing some packages necessary to do this?
Yes, that is definitely your problem! The 'kernel header files' contain descriptions of what's what inside the linux kernel. If you compile a driver it uses these to link up correctly with the kernel.

Exactly the same header files must be used to compile the kernel itself and the drivers it will use.

Many distros provide them as a package, matching whatever kernel the distro provides. If you compile your own kernel, they are part of the kernel source code. When you compile the driver, you need to tell the compiler where to find them, in this case by setting KERNEL_SOURCES correctly.
 
Old 09-30-2007, 10:30 PM   #14
bonder
LQ Newbie
 
Registered: Sep 2007
Distribution: Debian Lenny
Posts: 9

Rep: Reputation: 0
How do I find what packages I need to install? I've run
Code:
sudo apt-get install linux-headers-`uname -r`
and
Code:
sudo aptitude install build-essential linux-headers-`uname -r`
from the command line, but this doesn't change anything.

Last edited by bonder; 10-02-2007 at 12:47 AM. Reason: add more information
 
Old 10-01-2007, 03:37 AM   #15
NemoTheBlue
LQ Newbie
 
Registered: Sep 2007
Distribution: Ubuntu 7.04 Server
Posts: 8

Rep: Reputation: 0
Great information so far, everyone. I think it'll go a long way to sorting me out, but not the whole way! My situation's slightly more complicated since the driver I'm trying to build is a NIC driver. My Ubuntu server is completely offline until I get the driver built, so apt-get isn't an option for me. As long as I know my kernel version, can I download the headers on another system, transfer them over and manually install? If that's an option, how would I install them or can they simply be copied into the right directory?
 
  


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
make: *** No rule to make target `mrproper'. Stop. dauphinfay Linux - General 6 10-16-2009 12:29 AM
Belkin Wirless G RTL8185L make[1]: *** No rule to make target `Makefile'. Stop. SilverRock Linux - Wireless Networking 2 02-11-2007 07:25 AM
linux-wlan-ng: No rule to make target `modules'. Stop. johnc2k Linux - Software 1 01-26-2007 05:19 PM
make: *** No rule to make target 'gconfig'. Stop. cswake Slackware 4 10-10-2004 12:13 PM
*** No rule to make target `modules'. Stop. kmack2001 Linux - Newbie 9 02-16-2004 01:02 PM


All times are GMT -5. The time now is 06:30 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration