Thread: Simple Make Error

  1. #1
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74

    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?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    you have a directory called SUBDIRS=/home/joshua/tg3-3.92n? why?

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

  4. #4
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74
    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.

  5. #5
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74
    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?

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    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.

  7. #7
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74
    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.

  8. #8
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74
    Alright I found the problem. I redownloaded the driver and retried it not under root and it was fine. Thanks for all the help.

Popular pages Recent additions subscribe to a feed

Similar Threads

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