LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-11-2013, 08:03 PM   #1
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
After upgrading to kernel 3.8 module-assistant can't find kernel headers (Debian Sid)


Hi folks,

I'm using Debian Sid and a few days ago I upgraded to kernel 3.8 (from the official Debian repositories). The point is, after this upgrade, module-assistant can't find the kernel headers, even though they are installed. If for example, I try to compile virtualbox I get this:

Code:
# m-a -t a-i virtualbox
.
Updated infos about 1 packages
Getting source for kernel version: 3.8-1-amd64
apt-get install linux-headers-3.8-1-amd64 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-3.8-1-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
apt-get install build-essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Done!


Bad luck, the kernel headers for the target kernel version could not be found and you did not specify other valid kernel headers to use.
      

However, you can install the header files for your kernel which are provided by the linux-headers-3.8-1-amd64 package. For most modules packages, these files are 
perfectly sufficient without having the original kernel source.

To install the package, run:

module-assistant prepare

or

apt-get install linux-headers-3.8-1-amd64
But the kernel headers are installed, as you can see in the following output:

Code:
# apt-cache policy linux-headers-3.8-1-amd64
linux-headers-3.8-1-amd64:
  Installed: 3.8.12-1
  Candidate: 3.8.12-1
  Version table:
 *** 3.8.12-1 0
        500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
If I specify the kernel-headers directory when invoking module-assistant, it throws this error:

Code:
# m-a --kernel-dir /usr/src/linux-headers-3.8-1-amd64 a-i virtualbox

Updated infos about 1 packages
Bad kernel version specification at /usr/bin/m-a line 568, <$apt> line 7.
This is the output of uname -a, just in case:

Code:
# uname -a
Linux debian 3.8-1-amd64 #1 SMP Debian 3.8.12-1 x86_64 GNU/Linux
I just found this related bug report for the same version of module-assistant I'm using, but I'm not sure about how to apply the patch (and whether or not it will fix this issue). Does anyone one know how to apply this patch?

Thanks!
 
Old 05-12-2013, 10:23 AM   #2
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The patch should do it, you will need to
Code:
$ apt-get source module-assistant
Copy the .patch file to the downloaded source directory, apply the patch e.g.
Code:
$ patch <detection.patch
Code:
$ cd module-assistant*
Get the build dependencies
Code:
# apt-get build-dep module-assistant
Then rebuild the package
Code:
$ dpkg-buildpackage -rfakeroot -us -uc
(you might need to install fakeroot - though I believe it's part of build-essential(?), which I'd suspect is already installed)

Install
Code:
$ cd ..
Code:
# dpkg -i module-assistant*deb
 
1 members found this post helpful.
Old 05-12-2013, 07:01 PM   #3
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Original Poster
Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hello caravel, thanks for your help.

I followed the steps you suggested, and everything seems to go fine but when I get to the dpkg-buildpackage -rfakeroot -us -uc command, I get long output that eventually ends in the following error:

Code:
nsgmls:I: maximum number of errors (200) reached; change with -E option
Can't call method "value" on an undefined value at /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl line 249, <STDIN> line 1.
make[1]: *** [module-assistant.8] Error 8
make[1]: Leaving directory `/home/vicente/Desktop/ma/module-assistant-0.11.4'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-indep] Error 2
dpkg-buildpackage: fallo: debian/rules build devolvió un estado de salida de error 2
The translation of the last line is pretty much this: "dpkg-buildpackage: fail: debian/rules returned an error exit status 2."

Any ideas about what might be wrong? Maybe a problem in the source package itself?
 
Old 05-13-2013, 12:06 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Just a shot in the dark, how many kernels do you have installed if more than 1 are you boot to the latest?
 
1 members found this post helpful.
Old 05-13-2013, 05:24 AM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Install docbook-utils and try again.
 
1 members found this post helpful.
Old 05-13-2013, 11:27 AM   #6
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Original Poster
Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hello again,

The package that was missing was docbook-to-man (your suggestion to install docbook-utils made me suspect that some other docbook package was missing ). After installing it, I got past the first error, but got other errors which seemed to be caused by a problem in module-assistant itself, so I made these changes and it finally compiled fine.

Now I'm having other problem when building the virtualbox module with module-assistant (not the initial problem, though). Judging from the results of a quick web search, the virtualbox module fails to build against new kernels for some reason. However, I will have to wait before attempting to fix it, since this will be a busy week for me. Anyway I managed to install the nVidia driver from the repositories (didn't know I could do without module-assistant to install the non-free driver from the repos, as I've always used it to build the driver).

@EDDY1: For the record, I only have the 3.8 kernel installed at the moment (which is the one I'm currently using).

Since the initial problem with module-assistant is fixed now, I will mark this thread as solved. Thank you both for your help, folks; much appreciated.

Last edited by Hungry ghost; 05-13-2013 at 11:29 AM.
 
Old 05-13-2013, 03:01 PM   #7
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The virtualbox module may be failing to build for the same reason (i.e. lack of include/linux/version.h)
 
Old 05-13-2013, 06:51 PM   #8
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Original Poster
Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Well, the last lines of the build log are different to the first error messages I got, which makes me think this is another issue:

Code:
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: error: ‘VM_RESERVED’ undeclared (first use in this function)
/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1451:38: note: each undeclared identifier is reported only once for each function it appears in
kmk[5]: *** [/usr/src/modules/virtualbox/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
kmk[5]: *** Waiting for unfinished jobs....
kmk[5]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[5]: Entering directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[5]: *** Exiting with status 2
kmk[4]: *** [/usr/src/modules/virtualbox/vboxdrv] Error 2
kmk[4]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[3]: *** [_module_/usr/src/modules/virtualbox] Error 2
kmk[3]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk[2]: *** [sub-make] Error 2
kmk[2]: Leaving directory `/usr/src/linux-headers-3.8-1-common'
kmk[1]: *** [all] Error 2
kmk[1]: Leaving directory `/usr/src/linux-headers-3.8-1-amd64'
kmk: *** [binary-modules] Error 2
make: *** [kdist_build] Error 2
There's a similar bug report but is related to kernels 3.6 and 3.7, though I suspect it's the same issue since parts of the errors look quite similar. Will try the patch in the link when I have some time this week.

Last edited by Hungry ghost; 05-13-2013 at 07:08 PM.
 
Old 05-14-2013, 03:34 AM   #9
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Your linked bug report is relevant. It's probably resolved if you use Debian's virtualbox packages and kernels.
 
Old 05-16-2013, 07:59 PM   #10
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Original Poster
Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hi again,

This is just to let you know that VirtualBox got upgraded with today's updates and now it's working fine again, so the problem seems to be solved. Thanks a lot for your help, caravel.

Cheers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Updated to kernel 3.0.4 but now source package can not find kernel headers. ReaperX7 Slackware 2 10-03-2011 06:48 PM
Audio disappeared after upgrading Debian Sid kernel from 2.6.32 to 2.6.38 GuitarMaster Linux - Software 0 04-04-2011 08:11 AM
Upgrading slackware kernel headers archlyn Slackware 12 01-27-2010 09:08 AM
LXer: Building Kernel Modules With Module-Assistant On Debian Lenny LXer Syndicated Linux News 0 01-26-2010 01:30 PM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration