C Board  

Go Back   C Board > Community Boards > Tech Board

Reply
 
LinkBack Thread Tools Display Modes
Old 07-04-2009, 06:13 PM   #1
The Registered User
 
Aparavoid's Avatar
 
Join Date: May 2009
Posts: 62
Simple Make Error

Im trying to build a wireless driver for Debian and keep running into a problem that seems to be make's fault, but Im still really new to make so Im probably wrong. This is the error I get:

Code:
make -C  SUBDIRS=/home/joshua/tg3-3.92n modules
make: *** SUBDIRS=/home/joshua/tg3-3.92n: No such file or directory.  Stop.
make: *** [default] Error 2
The problem is no matter what i set SUBDIR to it is always unrecognized. The directory shown in the example is definitly valid. Am I over looking something simple?
Aparavoid is offline   Reply With Quote
Old 07-04-2009, 06:30 PM   #2
and the Hat of Guessing
 
tabstop's Avatar
 
Join Date: Nov 2007
Posts: 8,740
you have a directory called SUBDIRS=/home/joshua/tg3-3.92n? why?
tabstop is offline   Reply With Quote
Old 07-04-2009, 06:37 PM   #3
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
What tabstop is trying to say is that the -C option to "make" is "Go to subdirectory of next argument". Since the next thing you give is "SUBDIR=...", make will try to go to a directory called "SUBDIR=..." - presumably, you do not actually have such a direectory.

Either drop the -C, or give a directory-name that is correct.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 07-04-2009, 07:31 PM   #4
The Registered User
 
Aparavoid's Avatar
 
Join Date: May 2009
Posts: 62
Quote:
Originally Posted by matsp View Post
What tabstop is trying to say is that the -C option to "make" is "Go to subdirectory of next argument". Since the next thing you give is "SUBDIR=...", make will try to go to a directory called "SUBDIR=..." - presumably, you do not actually have such a direectory.

Either drop the -C, or give a directory-name that is correct.

--
Mats
That message was from just from the default make only with no added arguments. I tried this command instead as you said:

Code:
make SUBDIRS=/home/joshua/tg3-3.92n/
It said nothing was to be done. I'm guessing that means I got the directory correct but what should I do now?

Last edited by Aparavoid; 07-04-2009 at 07:41 PM.
Aparavoid is offline   Reply With Quote
Old 07-04-2009, 07:48 PM   #5
The Registered User
 
Aparavoid's Avatar
 
Join Date: May 2009
Posts: 62
Alright I looked inside the makefile that came with the driver. It contained this line:

Code:
default: tg3_flags.h
	make -C $(BCMCFGDIR) SUBDIRS=$(shell pwd) modules
This line includes both -C and SUBDIRS which I think is the problem. Should I edit the line?
Aparavoid is offline   Reply With Quote
Old 07-04-2009, 08:02 PM   #6
and the Hat of Guessing
 
tabstop's Avatar
 
Join Date: Nov 2007
Posts: 8,740
If make says nothing is to be done, then either you don't have any .c files (that it can find) or they all have already been compiled.

(And notice the difference between what they have and what you tried to do: there's something between -C and SUBDIRS, that something being the argument to -C.
tabstop is offline   Reply With Quote
Old 07-04-2009, 08:52 PM   #7
The Registered User
 
Aparavoid's Avatar
 
Join Date: May 2009
Posts: 62
Alright I got a strange error when did it with the right directory:

Code:
make: Entering directory `/home/joshua/tg3-3.92n'
make SUBDIRS=/home/joshua/tg3-3.92n modules
make[1]: Entering directory `/home/joshua/tg3-3.92n'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/home/joshua/tg3-3.92n'
make: *** [default] Error 2
make: Leaving directory `/home/joshua/tg3-3.92n'
How do I set the rules to target the modules? Is it a flag that I have to set?
A google search brought me to this post: http://www.linuxquestions.org/questi...-stop.-571661/

It seems the problem may be because I dont have the kernel headers or it may be looking in the wrong location. Does anyone know to get the headers or tell if I already have them?

Last edited by Aparavoid; 07-04-2009 at 08:58 PM.
Aparavoid is offline   Reply With Quote
Old 07-05-2009, 06:39 AM   #8
The Registered User
 
Aparavoid's Avatar
 
Join Date: May 2009
Posts: 62
Alright I found the problem. I redownloaded the driver and retried it not under root and it was fine. Thanks for all the help.
Aparavoid is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An error is driving me nuts! ulillillia C Programming 5 04-04-2009 09:15 PM
how do you resolve this error? -EquinoX- C Programming 32 11-05-2008 04:35 PM
Getting other processes class names Hawkin Windows Programming 3 03-20-2008 04:02 PM
Connecting to a mysql server and querying problem Diod C++ Programming 8 02-13-2006 10:33 AM
C++ compilation issues Rupan C++ Programming 1 08-22-2005 05:45 AM


All times are GMT -6. The time now is 09:05 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22