2

I frequently run the Ubuntu updates-manager enter image description here,
and after that, every time, I need to do a make to re-install my TV tuner driver (like described in here)

But that time, make stops with errors:
Following error messages are translated from french

$ make
make -C /lib/modules/3.2.0-53-generic-pae/build M= modules
make[1]: entering in folder « /usr/src/linux-headers-3.2.0-53-generic-pae »
make[2]: *** No rule to build the target « arch/x86/tools/relocs.c », needed for « arch/x86/tools/relocs ». Stop.
make[1]: *** [archscripts] Erreur 2
make[1]: exiting folder « /usr/src/linux-headers-3.2.0-53-generic-pae »
make: *** [all] Erreur 2

How can I solve this error please ?


For information:

  • Ubuntu version is 12.04 (precise)
  • Kernel Linux is 3.2.0-53-generic-pae
  • Content of /usr/src/linux-headers-3.2.0-53-generic/arch/x86/
    is similar to /usr/src/linux-headers-3.2.0-52-generic/arch/x86/

  • content of folder /usr/src/linux-source-3.2.0 is

    $ ls -la /usr/src/linux-source-3.2.0
    total 78020
    drwxr-xr-x  4 root root     4096 sept. 21 08:44 .
    drwxr-xr-x 74 root root     4096 sept. 21 22:44 ..
    drwxr-xr-x 10 root root     4096 sept. 21 08:44 debian
    drwxr-xr-x  8 root root     4096 sept. 21 08:44 debian.master
    -rw-r--r--  1 root root 79874365 aug.  23 00:11 linux-source-3.2.0.tar.bz2
    

    and

    $ find /usr/src/linux-source-3.2.0 -name "relocs.c"
    

    returns nothing

0

2 Answers 2

3

The clue to this question is this part of the error message:

make[2]: * No rule to build the target « arch/x86/tools/relocs.c », needed for « arch/x86/tools/relocs ». Stop.

The makefile is looking for a code module called relocs.c.

Now, code modules don't normally exist in the kernel headers. You need to extract the kernel source first and then the Makefile has something to chew on.

Let's do this.

Navigate to your kernel source folder:

cd /usr/src/linux-source-[version]

In your case [version] kernel version is 3.2.0.

List the contents of the folder. You should see a file in there called linux-source-[version].tar.bz2. N.B. as before replace [version] with your kernel version number.

If you don't, install the source:

sudo apt-get install linux-source

Now extract the source:

sudo tar -jxvf linux-source-[version].tar.bz2

Then you should be able to complete your compilation.

3
  • @Boris - if you just got a kernel update then yes, you'll need to recompile again. Check that you are still running 3.2.0.53 i.e. uname -r
    – fossfreedom
    Sep 22, 2013 at 15:36
  • @Boris - please join me in the general room - chat.stackexchange.com/rooms/201/ask-ubuntu-general-room
    – fossfreedom
    Sep 22, 2013 at 15:46
  • just to confirm your though: make problem is soled and TV Tuner driver are well installed with old kernel 3.2.0-52-generic
    – Boris
    Sep 22, 2013 at 17:46
-1

i386 headers required:

sudo apt-get install linux-headers-*(kernel version)*:i386

Example:

sudo apt-get install linux-headers-5.4.0-42:i386
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .