Page 1 of 1

[FIXED] Building the kernel modules fail on Ubuntu

Posted: 16. Jul 2011, 07:23
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

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

Posted: 16. Jul 2011, 10:40
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

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

Posted: 18. Jul 2011, 13:23
by frank
Yes, already aware of this. This will be fixed with the final 4.1 release.

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

Posted: 19. Jul 2011, 07:42
by uli100
Thanks a lot, 4.1 looks very promising to me.

Best regards, Uli.