Results 1 to 3 of 3

Thread: Problem compiling c script (driver example: hello world)

  1. #1
    Join Date
    Jun 2013
    Beans
    3

    Wink Problem compiling c script (driver example: hello world)

    Hi, i am following a driver example of 'Hello World', by http://www.linuxdevcenter.com/pub/a/...der-linux.html

    The file is: http://www.linuxdevcenter.com/linux/..._printk.tar.gz

    When i do make in Terminal in the folder:

    $ make

    This is being showed as result:

    Code:
    make -C /lib/modules/3.5.0-34-generic/build M=/home/johann/Dropbox/BSI UFRPE/8º Período/Infra-Estrutura de Software/driver-linuxdevcenter/hello_printk modules
    make[1]: Entering directory `/usr/src/linux-headers-3.5.0-34-generic'
    make[1]: *** No rule to make target `UFRPE/8º'.  Stop.
    make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-34-generic'
    make: *** [default] Error 2
    What happened? I can't figure out... rule?

    I'm a beginner in the linux universe, i never compiled C files before in this OS.

    Thanks you very much!

  2. #2
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Problem compiling c script (driver example: hello world)

    It is failing to build because of the path the file is in:

    Code:
    M=/home/johann/Dropbox/BSI UFRPE/8º Período/Infra-Estrutura de Software/driver-linuxdevcenter/hello_printk
    Will be interpreted by the shell as several arguments, because of the spaces:

    Code:
    M=/home/johann/Dropbox/BSI
    UFRPE/8º
    Período/Infra-Estrutura
    de
    Software/driver-linuxdevcenter/hello_printk
    To fix this, use a path without spaces in, or edit the Makefile to quote the output of
    Code:
    $(shell pwd)
    I suggest getting used to make before trying to build a kernel module. Here's the make manual: http://www.gnu.org/software/make/manual/make.html

  3. #3
    Join Date
    Jun 2013
    Beans
    3

    Re: Problem compiling c script (driver example: hello world)

    Quote Originally Posted by MG&TL View Post
    It is failing to build because of the path the file is in:

    Code:
    M=/home/johann/Dropbox/BSI UFRPE/8º Período/Infra-Estrutura de Software/driver-linuxdevcenter/hello_printk
    Will be interpreted by the shell as several arguments, because of the spaces:

    Code:
    M=/home/johann/Dropbox/BSI
    UFRPE/8º
    Período/Infra-Estrutura
    de
    Software/driver-linuxdevcenter/hello_printk
    To fix this, use a path without spaces in, or edit the Makefile to quote the output of
    Code:
    $(shell pwd)
    I suggest getting used to make before trying to build a kernel module. Here's the make manual: http://www.gnu.org/software/make/manual/make.html
    Thank you MG&TL!
    It was that! D

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
  •