[FIXED] Building the kernel modules fail on Ubuntu

Postings relating to old VirtualBox pre-releases
Post Reply
uli100
Posts: 59
Joined: 29. Oct 2009, 18:34
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Various Linux Distros
Location: Stuttgart, Germany

[FIXED] Building the kernel modules fail on Ubuntu

Post by uli100 »

My environment is this: Ubuntu-10.04 host system, 32 bit, latest kernel 2.6.32-33. I get errors when executing /etc/init.d/vboxdrv setup.

Code: Select all

/tmp/vbox.0/include/iprt/x86.h:959:1: warning: "MSR_IA32_DS_AREA" redefined
In file included from /usr/src/linux-headers-2.6.32-33-generic-pae/arch/x86/include/asm/msr.h:4,
                 from /usr/src/linux-headers-2.6.32-33-generic-pae/arch/x86/include/asm/processor.h:21,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from /tmp/vbox.0/include/internal/iprt.h:56,
                 from /tmp/vbox.0/common/string/strformatrt.c:33:
/usr/src/linux-headers-2.6.32-33-generic-pae/arch/x86/include/asm/msr-index.h:48:1: warning: this is the location of the previous definition
In file included from /tmp/vbox.0/common/string/strformatrt.c:49:
/tmp/vbox.0/include/iprt/x86.h:1958: error: expected identifier or ‘(’ before numeric constant
/tmp/vbox.0/include/iprt/x86.h:1960: error: expected ‘;’ before ‘uint16_t’
/tmp/vbox.0/include/iprt/x86.h:2009: error: expected identifier or ‘(’ before numeric constant
/tmp/vbox.0/include/iprt/x86.h:2010: error: expected ‘;’ before ‘uint16_t’
make[2]: *** [/tmp/vbox.0/common/string/strformatrt.o] Fehler 1
make[1]: *** [_module_/tmp/vbox.0] Fehler 2
make: *** [vboxdrv] Fehler 2
It seems to work with this dirty fix:

Code: Select all

--- vboxdrv/include/iprt/x86.h.orig	2011-07-16 06:38:40.318395116 +0200
+++ vboxdrv/include/iprt/x86.h.fixed	2011-07-16 07:15:50.417581991 +0200
@@ -32,10 +32,10 @@
 #include <iprt/assert.h>
 
 /* Workaround for Solaris sys/regset.h defining CS, DS */
-#ifdef RT_OS_SOLARIS
+//#ifdef RT_OS_SOLARIS
 # undef CS
 # undef DS
-#endif
+//#endif
pico_c_nickel
Posts: 22
Joined: 22. Jan 2009, 19:16

Re: 4.1 beta 3: Building the kernel modules fail on Ubuntu

Post by pico_c_nickel »

I'm suffering from the same problem on Debian unstable (used the deb for squeeze)

@uli100 thanks for the ugly fix

Regards
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: 4.1 beta 3: Building the kernel modules fail on Ubuntu

Post by frank »

Yes, already aware of this. This will be fixed with the final 4.1 release.
uli100
Posts: 59
Joined: 29. Oct 2009, 18:34
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Various Linux Distros
Location: Stuttgart, Germany

Re: [FIXED] Building the kernel modules fail on Ubuntu

Post by uli100 »

Thanks a lot, 4.1 looks very promising to me.

Best regards, Uli.
Post Reply