Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Discussions related to using VirtualBox on Linux hosts.
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

Hi All
I am using Kernel 2.6.29-1-686 got from sid repository on my Debian Lenny system.
I installed Virtualbox 2.1.4 from its repository today.

When I try to compile the kernel module for that it is giving the following error:-
** Compiling vboxdrv
make KBUILD_VERBOSE= -C /lib/modules/2.6.29-1-686/build SUBDIRS=/tmp/vbox.1 SRCROOT=/tmp/vbox.1 modules
make -C /usr/src/linux-headers-2.6.29-1-686 \
KBUILD_SRC=/usr/src/linux-headers-2.6.29-1-common \
KBUILD_EXTMOD="/tmp/vbox.1" -f /usr/src/linux-headers-2.6.29-1-common/Makefile \
modules
/usr/src/linux-headers-2.6.29-1-common/arch/x86/Makefile:41: /usr/src/linux-headers-2.6.29-1-common/arch/x86/Makefile_32.cpu: No such file or directory
make[3]: *** No rule to make target `/usr/src/linux-headers-2.6.29-1-common/arch/x86/Makefile_32.cpu'. Stop.
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make: *** [vboxdrv] Error 2
I would appreciate if I could get some help on this.
Thanks in advance.
Best Regards
Hildebrand
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Sasquatch »

Do you have any idea why you get that error? Because the install and compile scripts were made _before_ that kernel was released. Each kernel needs it's own configuration and the new one isn't included yet. So you have to "hack" that yourself, or wait for an official release that supports 2.6.29.
In the mean time, check the Bugtracker and create a bug for it if none exists yet. It might be added in 2.2.0 final. You need a separate account for the bugtracker though.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

Thanks sasquatch for the prompt reply which got me thinking about the problem.
It was talking about the missing file: /usr/src/linux-headers-2.6.29-1-common/arch/x86/Makefile_32.cpu
On going through the header code for an older kernel 2.6.26 I found that file contains the CPU tuning section. I copied this file from 2.6.26 headers to that of 2.6.29 header and I have been able to compile the driver now.
I didn't think that it was a problem with driver alone because the release changes mention that in jan-feb itself some compatibility had been taken care for 2.6.29 kernels so I guess its already done.
I'll file a bug report for the kernel header although I hope that its not missing because its no longer supposed to be needed for tuning purposes.
Anyway I've already mentioned the workaround.
Thanks for your post which got me thinking.
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

I filed a bug. It turned out to be a recurrent bug.
Package maintainer has suggested the following fix to rebuild the kernel package headers from source:-
> # apt-get install linux-source-2.6.29
> # cd /usr/src
> # tar jxf linux-source-2.6.29.tar.bz2
> # cd linux-source-2.6.29
> # make-kpkg build kernel_headers
> ##long long time
>
> # dpkg -i linux-header*.deb
> # cd /usr/src/linux-headers-2.6.29/include/
> # rm asm && ln -s asm-x86 asm
>
> Then you can rebuild you modules.
Last edited by hildebrand_us on 3. Apr 2009, 16:09, edited 1 time in total.
Velvet Elvis
Posts: 12
Joined: 14. Mar 2009, 03:17

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Velvet Elvis »

> # cd /usr/src/linux-headers-2.6.26/include/
Is this a typo or do you still have the .26 headers installed as well?
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

That was a typo. Corrected it.
timrichardson
Posts: 3
Joined: 29. Oct 2008, 22:24

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by timrichardson »

make-kpkg build kernel_headers fails for me
lguest.c:34:18: error: zlib.h: No such file or directory
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

Are you sure the headers are fine?
otherwise do what I did. copy the relevant file from your working kernel.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Sasquatch »

I'm running 2.6.29 now too on my PC, no issues with it at all. Now I do run the Ubuntu vanilla build, and they included the headers like with all their kernels. Even my VM runs with 2.6.29 and the GA installed fine on that (from DKMS).
So, it's all about how you (or your distro maintainer) compiled the kernel and create the header files for it. If it's done properly, there shouldn't be an issue.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Velvet Elvis
Posts: 12
Joined: 14. Mar 2009, 03:17

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Velvet Elvis »

timrichardson wrote:make-kpkg build kernel_headers fails for me
lguest.c:34:18: error: zlib.h: No such file or directory
I'm having the same problem running up to date debain sid.
Velvet Elvis
Posts: 12
Joined: 14. Mar 2009, 03:17

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Velvet Elvis »

Posting from inside the VM so I can copy and paste, here's the whole section where the compile craps out:
make[2]: Leaving directory `/usr/src/linux-source-2.6.29'
/usr/bin/make ARCH=i386 \
-C Documentation/lguest
make[2]: Entering directory `/usr/src/linux-source-2.6.29/Documentation/lguest'
cc -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE lguest.c -lz -o lguest
lguest.c:34:18: error: zlib.h: No such file or directory
make[2]: *** [lguest] Error 1
make[2]: Leaving directory `/usr/src/linux-source-2.6.29/Documentation/lguest'
make[1]: *** [debian/stamp/build/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.29'
make: *** [debian/stamp/do-build-arch] Error 2
Velvet Elvis
Posts: 12
Joined: 14. Mar 2009, 03:17

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Velvet Elvis »

I don't know what the problem is with the headers compiling but here's the problem with the GEs compiling:


http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521712
Velvet Elvis
Posts: 12
Joined: 14. Mar 2009, 03:17

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by Velvet Elvis »

I was able to get the headers to build by installing zlib1g-dev
lugoteehalt
Posts: 57
Joined: 14. Jun 2008, 12:12

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by lugoteehalt »

hildebrand_us wrote:It was talking about the missing file: /usr/srcarch/x86/Makefile_32.cpu
On going through the header code for an older kernel 2.6.26 I found that file contains the CPU tuning section. I copied this file from 2.6.26 headers to that of 2.6.29 header and I have been able to compile the driver now.
I say hidebrand_us where exactly do you put this file - my headers-package has no /linux-headers-2.6.29-1-common/ directory? I tried the workarround below, compiling and installing headers-package, and it did not work. See: http://forums.virtualbox.org/viewtopic. ... 073#p68073
hildebrand_us
Posts: 13
Joined: 1. Aug 2008, 08:28

Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Post by hildebrand_us »

I had installed the headers and package from Debian sid repository.
That had installed the /usr/src/linux-headers-2.6.29-1-common directory for me which the kernel had successfully used.

The packages I installed from sid repository were the kernel package linux-image-2.6.29-1-686 and linux-headers-2.6.29-1-686

Don't forget to remove the sid repository from your sources once you have installed the packages.
Post Reply