Page 1 of 2 12 LastLast
Results 1 to 10 of 39

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

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Beans
    1

    no rule to make target kernel/bounds.c

    Hello,

    I must compile my kernel for my webcam driver. But after the command "make prepare", I've got that :

    make[1]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
    make: *** [prepare0] Error 2

    so I've try sudo apt-get --reinstall install linux-headers-`uname -r` and I've installed the kernel source, but without any success...

    It's the same error with other kernel version.

    Can you help me please ?

    $(uname -r) is 2.6.27-9-server

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

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

    Hi!

    Installing the kernel sources using apt / aptitude / synaptic / whatsoever only puts the compressed source code into /usr/src. You need to uncompress the sources:

    Code:
    $ cd /usr/src
    $ sudo tar -xvjf linux-source-$YOUR_VERSION_HERE.tar.bz2
    Then just change into the new /usr/src/linux-source-$YOUR_VERSION_HERE directory and built your kernel like you used to

    So long

  3. #3
    Join Date
    May 2008
    Location
    Canada
    Beans
    64
    Distro
    Ubuntu 8.04 Hardy Heron

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

    Thank you. This helped me with the same problem.

  4. #4
    Join Date
    Feb 2009
    Beans
    3

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

    Sorry, I'm new in it, what does $YOUR_VERSION_HERE mean? Is it my kernel version?

    Thanks.

  5. #5
    Join Date
    Feb 2009
    Beans
    3

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

    Sorry for my last reply. I installed linux-source and then I understood what you meant with $YOUR_VERSION_HERE.

    Thanks!

  6. #6
    Join Date
    Sep 2009
    Beans
    5

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

    I have the same problem but my archive is uncompressed already ! But i still get the same message

    ***@***-laptop:~$ cd microdia
    ***@***-laptop:~/microdia$ sudo make
    make -C /lib/modules/2.6.28-15-generic/build SUBDIRS= 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: *** [driver] Error 2

    I'm trying to setup my built-in webcam on Lenovo 3000 N100 (Ubuntu 9.04)
    I need help !!!!

  7. #7
    Join Date
    Oct 2006
    Beans
    20

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

    Quote Originally Posted by HubertB View Post
    Hi!

    Installing the kernel sources using apt / aptitude / synaptic / whatsoever only puts the compressed source code into /usr/src. You need to uncompress the sources:

    Code:
    $ cd /usr/src
    $ sudo tar -xvjf linux-source-$YOUR_VERSION_HERE.tar.bz2
    Then just change into the new /usr/src/linux-source-$YOUR_VERSION_HERE directory and built your kernel like you used to

    So long
    This works, you need to make sure when you compile your code it's pointing to the Linux sources and not the headers. You will see in the error where it's point to. For example:

    make[1]: Entering directory `/usr/src/linux-headers-2.6.28-16-generic'

    You can see it's still pointing to the headers.

  8. #8
    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?

  9. #9
    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

  10. #10
    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

Page 1 of 2 12 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
  •