Page 1 of 2
Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 28. Mar 2009, 17:27
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
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 28. Mar 2009, 17:46
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.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 29. Mar 2009, 18:09
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.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 31. Mar 2009, 11:44
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.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 2. Apr 2009, 22:25
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?
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 3. Apr 2009, 16:10
by hildebrand_us
That was a typo. Corrected it.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 5. Apr 2009, 02:26
by timrichardson
make-kpkg build kernel_headers fails for me
lguest.c:34:18: error: zlib.h: No such file or directory
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 5. Apr 2009, 09:05
by hildebrand_us
Are you sure the headers are fine?
otherwise do what I did. copy the relevant file from your working kernel.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 5. Apr 2009, 13:37
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.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 6. Apr 2009, 05:27
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.
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 6. Apr 2009, 05:37
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
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 6. Apr 2009, 06:39
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
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 6. Apr 2009, 22:42
by Velvet Elvis
I was able to get the headers to build by installing zlib1g-dev
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 7. Apr 2009, 19:07
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
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29
Posted: 8. Apr 2009, 10:51
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.