Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 39

Thread: no rule to make target kernel/bounds.c

  1. #11
    Join Date
    Jan 2006
    Beans
    23

    Re: no rule to make target kernel/bounds.c

    Hi!

    I tried to follow the instructions (here) as I was getting the following error when trying to build kernel modules (a simple hello_world module) -
    error: linux/module.h: No such file or directory
    ,
    and got the following errors -
    ~/workspace/work/rtl$ sudo make
    make -C /lib/modules/2.6.28-15-generic/build M= modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/basic/docproc
    HOSTCC scripts/basic/hash
    HOSTCC scripts/kconfig/conf.o
    scripts/kconfig/conf.c: In function ‘conf_askvalue’:
    scripts/kconfig/conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
    scripts/kconfig/conf.c: In function ‘conf_choice’:
    scripts/kconfig/conf.c:306: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
    HOSTCC scripts/kconfig/kxgettext.o
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf -s arch/x86/Kconfig
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
    make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    UPD include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
    make: *** [all] Error 2
    I've been following the steps above to get past the error. I first tried installing the linux-headers -
    Code:
    sudo apt-get --reinstall install linux-headers-`uname -r`
    but I cannot see any file of the name linux-source-2.6.28-15-generic.tar.bz2. In fact, I don't see any compressed file (tar.bz2) at all!

    Have I missed out installing something?

  2. #12
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    26

    Re: no rule to make target kernel/bounds.c

    Since you've installed linux-headers, you won't find a file called "linux-source".

    If you need the complete kernel sources, you have to install the package named "linux-source" by running

    Code:
    sudo apt-get install linux-source
    Mind the difference between linux-headers and linux-source.

    Headers are being unpacked automatically to /usr/src whereas the installation of linux-source places a .tar.bz2 file in the directory /usr/src. This .tar.bz2 file (which is only there if you installed linux-source) has to be unpacked by running these commands:

    Code:
    cd /usr/src
    sudo tar xvjf linux-source-$YOUR_VERSION_HERE.tar.bz2
    Last edited by HubertB; November 4th, 2009 at 03:25 PM. Reason: More information, fixed typos

  3. #13
    Join Date
    Jan 2006
    Beans
    23

    Re: no rule to make target kernel/bounds.c

    Hi!

    Thanks. I followed the steps mentioned -
    Code:
    ~$ sudo apt-get install linux-source
    ~$ cd /usr/src
    /usr/src$ sudo tar -xjvf linux-source-2.6.28.tar.bz2
    However, I still get the following error -
    make -C /lib/modules/2.6.28-15-generic/build M= modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
    make: *** [all] Error 2
    In my /usr/src directory, I have two header folders -
    /usr/src$ ls -al
    linux-headers-2.6.28-15-generic
    linux-headers-2.6.28-15
    ...
    Should the linux-source-2.6.28.tar.bz2 be extracted to a folder 'linux-source-2.6.28-15-generic' or 'linux-source-2.6.28-15', instead of 'linux-source-2.6.28'?

    Thanks

  4. #14
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    26

    Re: no rule to make target kernel/bounds.c

    Something is very strange here. You said that you installed linux-source and also unpacked it, but your /usr/src directory contains only 2 subdirectories.

    I just verified the above stated procedure. On a fresh installed Ubuntu 9.10 system, /usr/src contains this:
    Code:
    $ ls /usr/src/
    linux-headers-2.6.31-14
    linux-headers-2.6.31-14-generic
    Then, I went ahead:
    Code:
    $ sudo apt-get install linux-source
    $ cd /usr/src
    $ sudo tar xvjf linux-source-2.6.31.tar.bz2
    $ ls /usr/src
    linux-headers-2.6.31-14          
    linux-headers-2.6.31-14-generic
    linux-source-2.6.31
    linux-source-2.6.31.tar.bz2
    Maybe you made a mistake while copy-pasting the output of ls /usr/src since I even don't see a linux-source-$VERSION.tar.bz2?

    PS: You could try creating a symlink to the extracted kernel sources (provided that they are extracted in /usr/src). Make sure you replace the version numbers which the ones that you need:
    Code:
    $ sudo ln -s /usr/src/linux-source-2.6.31 /usr/src/linux
    Last edited by HubertB; November 5th, 2009 at 07:57 AM.

  5. #15
    Join Date
    Aug 2008
    Location
    Alexandria,Egypt
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: no rule to make target kernel/bounds.c

    hi

    i was facing a similar problem when i was trying to install a wireless driver
    the solution was not to use sudo with make install, instead try this
    sudo su
    make
    make install
    i don't know a reson for this but it worked that way

  6. #16
    Join Date
    Nov 2009
    Beans
    2

    Re: no rule to make target kernel/bounds.c

    Working as superuser instead of sudoing worked for me, too!

  7. #17
    Join Date
    Nov 2009
    Beans
    1

    Re: no rule to make target kernel/bounds.c

    Ok, something is broken here. I tried doing a make clean and sudo make and sudo install. No luck. My problem is that I get a "No rule to make target 'kernel/bounds.c ... ' in the make install step. I am running 9.10.

    When I try and do a make in the /usr/src/linux-headers directory it doesn't work either. Same error. Why are we discussing the linux-sources?

  8. #18
    Join Date
    Nov 2009
    Location
    Switzerland
    Beans
    23
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: no rule to make target kernel/bounds.c

    Anyone solved the problem? I got exactly the same problem at Ubuntu 9.10 ...

  9. #19
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    26

    Re: no rule to make target kernel/bounds.c

    Guys, please read the thread more carefully!

    bounds.c is in the file /usr/src/linux-source-2.6.31.tar.bz2 (hint: This version number applies to 9.10) which is only there if you have the package linux-source installed AND extracted (see above on how to do this).

    Furthermore you've already been given another hint: Try compiling and installing using sudo -s instead of sudo. Using sudo -s you'll become superuser aka root so you have to use this command only once:
    Code:
    $ sudo -s
    # a_command_to_be_executed <- executed with full priviledges - please be careful!
    # another_command_with_root_rights
    Please don't take that personally, but I'm tired of answering this question over and over again.

    If you still need help, let me know.
    Last edited by HubertB; December 8th, 2009 at 12:24 AM.

  10. #20
    Join Date
    Jan 2010
    Beans
    8

    Re: no rule to make target kernel/bounds.c

    I am trying to compile, make and install the latest Ralink Wireless drivers on my fresh install of Ubuntu 9.1 64 bit.
    I get the following error message when I type "make":
    make -C tools
    make[1]: Entering directory `/home/testrig4ub64/Desktop/Wireless installers/RT2870_LinuxSTA_V2.3.0.0/tools'
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory `/home/testrig4ub64/Desktop/Wireless installers/RT2870_LinuxSTA_V2.3.0.0/tools'
    /home/testrig4ub64/Desktop/Wireless installers/RT2870_LinuxSTA_V2.3.0.0/tools/bin2h
    make: /home/testrig4ub64/Desktop/Wireless: Command not found
    make: *** [build_tools] Error 127

    I have done pretty much all that has been suggested above. Does Ubuntu not come with a compiler? Why does it not recognise the 'make' command like all the other linux flavours?

    Already done the following:
    sudo apt-get update
    sudo apt-get install build-essential
    Still get errors as though it does not know what make means.

    The same process compiled happily on another machine so I am fairly sure it is not the source code which is wrong.
    Can anyone help here please?

    Ed: I have followed all the Compiling instructions on this site, so I have checkinstall, but that still returns the same error.
    Last edited by RegPerrin; January 10th, 2010 at 07:02 AM. Reason: speeling

Page 2 of 4 FirstFirst 1234 LastLast

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
  •