VirtualBox

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#7184 closed defect (wontfix)

vboxdrv does not compile/load on Centos 4 with kernel 2.6.27.45

Reported by: Macedo Owned by:
Component: installer Version: VirtualBox 3.2.6
Keywords: vboxdrv module unknown symbol UTF Cc:
Guest type: other Host type: Linux

Description

Environment: Host: Centos 4 with custom kernel 2.6.27.45, dkms 2.1.1.2 VirtualBox 2.3.6 (package VirtualBox-3.2-3.2.6_63112_rhel4-1.i386.rpm)

When running vboxdrv setup, the result is:

[...]
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 are not found.
Install them and execute

  /etc/init.d/vboxdrv setup

as root.

[root@qeynos ~]# tail /var/log/vbox-install.log 
  CC [M]  /tmp/vbox.0/linux/SUPDrv-linux.o
  CC [M]  /tmp/vbox.0/SUPDrv.o
/tmp/vbox.0/SUPDrv.c: In function `supdrvCleanupSession':
/tmp/vbox.0/SUPDrv.c:109: sorry, unimplemented: inlining failed in call to 'supdrvLdrLock': function body not available
/tmp/vbox.0/SUPDrv.c:851: sorry, unimplemented: called from here
/tmp/vbox.0/SUPDrv.c:110: sorry, unimplemented: inlining failed in call to 'supdrvLdrUnlock': function body not available
/tmp/vbox.0/SUPDrv.c:870: sorry, unimplemented: called from here
make[2]: *** [/tmp/vbox.0/SUPDrv.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

This was fixed with the change below on /usr/src/vboxdrv-3.2.6/include/iprt/cdefs.h:

[root@qeynos iprt]# diff -u cdefs.h.orig cdefs.h
--- cdefs.h.orig        2010-06-25 12:32:20.000000000 -0300
+++ cdefs.h     2010-07-16 16:56:29.000000000 -0300
@@ -736,7 +736,7 @@
  * @remarks Don't use this macro on C++ methods.
  */
 #ifdef __GNUC__
-# define DECLINLINE(type) static __inline__ type
+# define DECLINLINE(type) static type
 #elif defined(__cplusplus)
 # define DECLINLINE(type) inline type
 #elif defined(_MSC_VER)
@@ -755,7 +755,7 @@
  * @remarks Use sparsely and with care. Don't use this macro on C++ methods.
  */
 #ifdef __GNUC__
-# define DECL_FORCE_INLINE(type)    __attribute__((always_inline)) DECLINLINE(type)
+# define DECL_FORCE_INLINE(type)    DECLINLINE(type)
 #elif defined(_MSC_VER)
 # define DECL_FORCE_INLINE(type)    __forceinline type
 #else

After this, the module compiles but when I try to load, I get the following:

[root@qeynos ~]#   /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module                          [  OK  ]
Recompiling VirtualBox kernel module                       [  OK  ]
Starting VirtualBox kernel module                          [FAILED]
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
[root@qeynos ~]# dmesg 
vboxdrv: Unknown symbol RTStrPutCpInternal
vboxdrv: Unknown symbol RTUtf16GetCpExInternal
vboxdrv: Unknown symbol RTStrGetCpInternal
vboxdrv: Unknown symbol RTStrGetCpExInternal
vboxdrv: Unknown symbol RTStrGetCpNExInternal
vboxdrv: Unknown symbol RTUtf16PutCpInternal
vboxdrv: Unknown symbol RTUtf16GetCpInternal

These functions have only their prototypes defined in string.h but no body anywhere on the sources. The same occurs with 3.2.4.

Curiously, these functions are defined on the VBox OSE, on utf-8.cpp.

Is there any solution for this?

Change History (3)

comment:1 by Macedo, 14 years ago

One additional information: gcc version is 3.4.6.

comment:2 by Frank Mehnert, 14 years ago

Resolution: wontfix
Status: newclosed

DKMS is not part of CentOS 4, neither is the kernel 2.6.27.45. Compiling the VBox 3.2.6 kernel modules against vanilla 2.6.27.48 works fine here (though on a Debian/Lenny 32-bit host, not CentOS4).

in reply to:  2 comment:3 by Macedo, 14 years ago

Replying to frank:

DKMS is not part of CentOS 4, neither is the kernel 2.6.27.45. Compiling the VBox 3.2.6 kernel modules against vanilla 2.6.27.48 works fine here (though on a Debian/Lenny 32-bit host, not CentOS4).

Sorry to report so lately after the ticket being closed but there was a solution for this weird scenario: -> dkms is installable via yum. No problem with that. -> Must install gcc4 (also via yum). In this case, the system will have gcc and gcc4 commands. Default compiler will still be gcc vanilla (gcc3). -> The workaround: on /usr/src/vboxdrv-3.2.8/dkms.conf, add the following line below the line with PACKAGE_VERSION: MAKE[0]="make CC=gcc4 -C ${kernel_source_dir} SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules"

After these actions, vboxdrv setup works without problem.

Thanks for your attention and sorry for the stupid bug.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use