Re: Can not install on Debian
Posted: 22. Aug 2012, 03:37
Hello!
Virtualbox kernel module loading does not work here, too. I have the same kernel oops as reported by TJ on Debian Testing with a vanilla 3.5.2 kernel:
Latest VirtualBox package 4.1.20 installed with dpkg -i, no dkms:
I've tracked the problem down to the definitions of RT_LIKELY & RT_UNLIKELY in /usr/share/virtualbox/src/vboxhost/vboxdrv/include/iprt/cdefs.h:
The problem is caused if __builtin_expect() is used. If -DFORTIFY_RUNNING (-DLOG_ENABLED works too!) is added to the KFLAGS of the vboxdrv Makefile the module loads without problems!
gcc problem/bug?
Regards
Gerald
Virtualbox kernel module loading does not work here, too. I have the same kernel oops as reported by TJ on Debian Testing with a vanilla 3.5.2 kernel:
Code: Select all
localhost:~# cat /etc/debian_version
wheezy/sid
localhost:~# uname -a
Linux localhost 3.5.2 #1 SMP Wed Aug 15 21:19:06 CEST 2012 i686 GNU/Linux
localhost:~# gcc --version
gcc (Debian 4.7.1-2) 4.7.1
Code: Select all
localhost:~# dpkg -i virtualbox-4.1_4.1.20-80170~Debian~wheezy_i386.deb
Code: Select all
#if defined(__GNUC__)
# if __GNUC__ >= 3 && !defined(FORTIFY_RUNNING)
# define RT_LIKELY(expr) __builtin_expect(!!(expr), 1)
# define RT_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
# else
# define RT_LIKELY(expr) (expr)
# define RT_UNLIKELY(expr) (expr)
# endif
#else
# define RT_LIKELY(expr) (expr)
# define RT_UNLIKELY(expr) (expr)
#endif
Code: Select all
--- /usr/share/virtualbox/src/vboxhost/vboxdrv/Makefile.orig 2012-08-22 02:49:06.000000000 +0200
+++ /usr/share/virtualbox/src/vboxhost/vboxdrv/Makefile 2012-08-22 02:51:22.000000000 +0200
@@ -238,7 +238,7 @@
MANGLING := $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h
endif
KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
- -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
+ -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DFORTIFY_RUNNING
ifdef VBOX_REDHAT_KABI
KFLAGS += -DVBOX_REDHAT_KABI
endif
Regards
Gerald