Results 1 to 5 of 5

Thread: Make: compiling: where are paths defined?

  1. #1
    Join Date
    Aug 2010
    Beans
    3

    Make: compiling: where are paths defined?

    I am trying to compile a driver. See below

    The instructions are simple, just type "make all", etc.
    But the compile fails when it comes across an undefined identifier.

    But the identifier is defined in a sub-sub directory of the directory that "make[2]" searched.

    1. Does the compiler's search stop at the first directory that it entered? Can I force it go deeper?
    2. Where is the definition of the directory that the compiler is searching? I've tried /etc/environment (no effect)

    I did two days of google searches, got 3 books from the library. I really stuck!
    Thanks for your help


    terry@terry-desktop:~$ make all

    make -C kmodule/ modules
    make[1]: Entering directory `/home/terry/kmodule'
    make -C /lib/modules/2.6.32-21-generic/build M="/home/terry/kmodule" modules
    make[2]: Entering directory `/usr/src/linux-headers-2.6.32-21-generic'
    CC [M] /home/terry/kmodule/martian.o
    /home/terry/kmodule/martian.c: In function ‘martian_isr’:
    /home/terry/kmodule/martian.c:131: warning: value computed is not used
    /home/terry/kmodule/martian.c:148: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
    /home/terry/kmodule/martian.c:148: error: (Each undeclared identifier is reported only once
    /home/terry/kmodule/martian.c:148: error: for each function it appears in.)
    /home/terry/kmodule/martian.c: In function ‘martian_read’:
    /home/terry/kmodule/martian.c:554: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
    /home/terry/kmodule/martian.c:554: error: implicit declaration of function ‘signal_pending’
    /home/terry/kmodule/martian.c:554: error: implicit declaration of function ‘schedule’
    make[3]: *** [/home/terry/kmodule/martian.o] Error 1
    make[2]: *** [_module_/home/terry/kmodule] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-21-generic'
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/home/terry/kmodule'
    make: *** [all] Error 2
    terry@terry-desktop:~$

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: Make: compiling: where are paths defined?

    Chances are that the driver you are trying to compile is not compatible with your kernel version. Whar driver is it?
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Aug 2010
    Beans
    3

    Re: Make: compiling: where are paths defined?

    I downloaded the driver code from this site. For my internal dial-up modem.

    http://martian.barrelsoutofbond.org/


    The definition of TASK_INTERRUPTIBLE does exist in a header file. But it's two levels deeper than the compile step make[2] announced.

  4. #4
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: Make: compiling: where are paths defined?

    You are probably trying to compile the one from 2008, it gives the same errors here. The 2010 one here works for me (or at least it builds fine, I don't have a martian modem to test it anymore).
    「明後日の夕方には帰ってるからね。」


  5. #5
    Join Date
    Aug 2010
    Beans
    3

    Re: Make: compiling: where are paths defined?

    Yes. That one compiled. Thanks very much.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •