Unable to compile the kernel module

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ville_toivonen
Posts: 2
Joined: 18. Feb 2009, 00:21

Unable to compile the kernel module

Post by ville_toivonen »

Hi

I'm using Ubuntu 8.10. I updated the kernel today using the auto-update tool. During that process I got a message:
Compilation of the kernel module FAILED!


VirtualBox will not start until this problem is fixed. Please consult /var/log/vbox-install.log to find out why the kernel module does not compile. Most probably the kernel sources were not found. Install them (the package name is probably linux-headers-<version> whereby <version> can be determined by 'uname -r') and execute

/etc/init.d/vboxdrv setup

as root.
I entered the command, and got:
* Stopping VirtualBox kernel module
* done.
* Recompiling VirtualBox kernel module
* Look at /var/log/vbox-install.log to find out what went wrong
vbox-install.log:
Attempting to install using DKMS
removing old DKMS module vboxdrv version

Error! Invalid number of parameters passed.
Usage: remove -m <module> -v <module-version> --all
or: remove -m <module> -v <module-version> -k <kernel-version>

------------------------------
Deleting module version: 2.1.4
completely from the DKMS tree.
------------------------------
Done.

Creating symlink /var/lib/dkms/vboxdrv/2.1.4/source ->
/usr/src/vboxdrv-2.1.4

DKMS: add Completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.27-11-generic -C /lib/modules/2.6.27-11-generic/build M=/var/lib/dkms/vboxdrv/2.1.4/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 2.6.27-11-generic (i686)
Consult the make.log in the build directory
/var/lib/dkms/vboxdrv/2.1.4/build/ for more information.
0
0
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.27-11-generic/build SUBDIRS=/tmp/vbox.9 SRCROOT=/tmp/vbox.9 modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /tmp/vbox.9/.tmp_versions ; rm -f /tmp/vbox.9/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.9
gcc -Wp,-MD,/tmp/vbox.9/linux/.SUPDrv-linux.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude -I/usr/src/linux-headers-2.6.27-11-generic/arch/x86/include -include include/linux/autoconf.h -Iubuntu/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/2.6.27-11-generic/build/include -I/tmp/vbox.9/ -I/tmp/vbox.9/include -I/tmp/vbox.9/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_X86 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)" -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.9/linux/.tmp_SUPDrv-linux.o /tmp/vbox.9/linux/SUPDrv-linux.c
In file included from include/linux/aio.h:7,
from include/linux/sched.h:343,
from include/linux/smp_lock.h:5,
from include/linux/hardirq.h:5,
from include/linux/interrupt.h:11,
from include/asm/highmem.h:23,
from include/linux/highmem.h:24,
from include/linux/pagemap.h:10,
from /tmp/vbox.9/r0drv/linux/the-linux-kernel.h:81,
from /tmp/vbox.9/linux/SUPDrv-linux.c:38:
include/linux/uio.h:38: virhe: expected identifier or ”(” before ”/” token
In file included from include/linux/aio.h:7,
from include/linux/sched.h:343,
from include/linux/smp_lock.h:5,
from include/linux/hardirq.h:5,
from include/linux/interrupt.h:11,
from include/asm/highmem.h:23,
from include/linux/highmem.h:24,
from include/linux/pagemap.h:10,
from /tmp/vbox.9/r0drv/linux/the-linux-kernel.h:81,
from /tmp/vbox.9/linux/SUPDrv-linux.c:38:
include/linux/uio.h:38:2: warning: missing terminating " character
include/linux/uio.h:38: virhe: loppumerkki " puuttuu
include/linux/uio.h:41: virhe: odottamaton ”\5” ohjelmassa
include/linux/uio.h:41:69: warning: missing terminating ' character
include/linux/uio.h:41: virhe: loppumerkki ' puuttuu
include/linux/uio.h:45:45: warning: null character(s) ignored
include/linux/uio.h:50:7: error: exponent has no digits
make[2]: *** [/tmp/vbox.9/linux/SUPDrv-linux.o] Virhe 1 (error 1)
make[1]: *** [_module_/tmp/vbox.9] Virhe 2 (error 2)
make: *** [vboxdrv] Virhe 2
make.log:
DKMS make.log for vboxdrv-2.1.4 for kernel 2.6.27-11-generic (i686)
ke 18.2.2009 01:36:06 +0200
make: Siirrytään hakemistoon "/usr/src/linux-headers-2.6.27-11-generic"
LD /var/lib/dkms/vboxdrv/2.1.4/build/built-in.o
CC [M] /var/lib/dkms/vboxdrv/2.1.4/build/linux/SUPDrv-linux.o
In file included from include/linux/aio.h:7,
from include/linux/sched.h:343,
from include/linux/smp_lock.h:5,
from include/linux/hardirq.h:5,
from include/linux/interrupt.h:11,
from include/asm/highmem.h:23,
from include/linux/highmem.h:24,
from include/linux/pagemap.h:10,
from /var/lib/dkms/vboxdrv/2.1.4/build/r0drv/linux/the-linux-kernel.h:81,
from /var/lib/dkms/vboxdrv/2.1.4/build/linux/SUPDrv-linux.c:38:
include/linux/uio.h:38: virhe: expected identifier or ”(” before ”/” token
In file included from include/linux/aio.h:7,
from include/linux/sched.h:343,
from include/linux/smp_lock.h:5,
from include/linux/hardirq.h:5,
from include/linux/interrupt.h:11,
from include/asm/highmem.h:23,
from include/linux/highmem.h:24,
from include/linux/pagemap.h:10,
from /var/lib/dkms/vboxdrv/2.1.4/build/r0drv/linux/the-linux-kernel.h:81,
from /var/lib/dkms/vboxdrv/2.1.4/build/linux/SUPDrv-linux.c:38:
include/linux/uio.h:38:2: warning: missing terminating " character
include/linux/uio.h:38: virhe: loppumerkki " puuttuu
include/linux/uio.h:41: virhe: odottamaton ”\5” ohjelmassa
include/linux/uio.h:41:69: warning: missing terminating ' character
include/linux/uio.h:41: virhe: loppumerkki ' puuttuu
include/linux/uio.h:45:45: warning: null character(s) ignored
include/linux/uio.h:50:7: error: exponent has no digits
make[1]: *** [/var/lib/dkms/vboxdrv/2.1.4/build/linux/SUPDrv-linux.o] Virhe 1 (error 1)
make: *** [_module_/var/lib/dkms/vboxdrv/2.1.4/build] Virhe 2 (error 2)
make: Poistutaan hakemistosta "/usr/src/linux-headers-2.6.27-11-generic"
I've tried to install, remove and reinstall packages like virtualbox-2.1, build-essentials and the kernel headers, but the error persists. Could someone assist me on this? Or am I facing a reinstall of my Ubuntu?

Best regards, Ville
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

Post by Sasquatch »

Build-essentials and kernel-headers should be enough. Make sure that the headers are the same flavour as your booted kernel. Usually -generic. Did you try to run /etc/init.d/vboxdrv setup as root again?
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.
ville_toivonen
Posts: 2
Joined: 18. Feb 2009, 00:21

Post by ville_toivonen »

Sasquatch wrote:Build-essentials and kernel-headers should be enough. Make sure that the headers are the same flavour as your booted kernel. Usually -generic. Did you try to run /etc/init.d/vboxdrv setup as root again?
Yes, I ran the command on every occasion. I didn't pay special attention that the headers would be of the same flavour as my booted kernel, so I don't know if they were. I have now reinstalled my Ubuntu and Virtualbox is working okay.

Thanks for your reply.
Post Reply