VirtualBox

Ticket #2986 (new defect) — at Version 4

Opened 9 years ago

Last modified 8 years ago

module compile fails on supported linux distro and kernel

Reported by: Ninho Owned by:
Priority: major Component: installer
Version: VirtualBox 2.1.0 Keywords:
Cc: Guest type: other
Host type: Linux

Description (last modified by frank) (diff)

Compilation of the VBox module fails under SUSE 9.1, kernel 2.6.5-7.276 (that is the latest security fix for this version from Novell)

It appears some IFDEF... statements based on kernel version are inaccurate in the header script "the-linux-kernel.h", leading to redefinition of `jiffies_to_msecs' and `msecs_to_jiffies' (see appended log).

The manual, version 2.1.0, section 1.4 states : supported... SUSE Linux 9 and 10, openSUSE 10.1, 10.2, 10.3 and 11. In same section it says all 2.6 Linux kernels should be covered. In fact the offending scripts seem to be trying to cover even 1.4 kernels, though I understand those are no longer supported.

Please advise as how to repair or circumvent this bug.

Regards.

_

Installing VirtualBox to /opt/VirtualBox-2.1.0 
 
 Output from the module build process (the Linux kernel build system) follows: 
 
 make KBUILD_VERBOSE=1 -C /lib/modules/2.6.5-7.276-default/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules 
 make -C ../../../linux-2.6.5-7.276 O=../linux-2.6.5-7.276-obj/i386/default modules 
 make -C /usr/src/linux-2.6.5-7.276-obj/i386/default                \ 
 KBUILD_SRC=/usr/src/linux-2.6.5-7.276             KBUILD_VERBOSE=1        \ 
 KBUILD_CHECK= KBUILD_EXTMOD="/tmp/vbox.0"        \ 
         -f /usr/src/linux-2.6.5-7.276/Makefile modules 
 mkdir -p /tmp/vbox.0/.tmp_versions 
 make -f /usr/src/linux-2.6.5-7.276/scripts/Makefile.build obj=/tmp/vbox.0 
   gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude
    -Iinclude2 -I/usr/src/linux-2.6.5-7.276/include  -I/tmp/vbox.0 -Wall -Wstrict-prototypes
    -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -mpreferred-stack-boundary=2
    -funit-at-a-time -funit-at-a-time -march=i586 -mregparm=3 -I/usr/src/linux-2.6.5-7.276/include/asm-i386/mach-default
    -Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer  -I/lib/modules/2.6.5-7.276-default/build/include
    -I/tmp/vbox.0/  -I/tmp/vbox.0/include  -I/tmp/vbox.0/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 -DMODULE
    -DKBUILD_BASENAME=SUPDrv_linux -DKBUILD_MODNAME=vboxdrv -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c 
 In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:38: 
 /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:137: error: redefinition of `jiffies_to_msecs' 
 /usr/src/linux-2.6.5-7.276/include/linux/jiffies.h:74: error: `jiffies_to_msecs' previously defined here 
 /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:148: error: redefinition of `msecs_to_jiffies' 
 /usr/src/linux-2.6.5-7.276/include/linux/jiffies.h:96: error: `msecs_to_jiffies' previously defined here 
 make[4]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Erreur 1 
 make[3]: *** [_module_/tmp/vbox.0] Erreur 2 
 make[2]: *** [modules] Erreur 2 
 make[1]: *** [modules] Erreur 2 
 make: *** [vboxdrv] Erreur 2 
 
 End of the output from the Linux kernel build system. 

Change History

comment:1 follow-up: ↓ 2 Changed 9 years ago by frank

Please could you point me to the kernel package containing this sources?

comment:2 in reply to: ↑ 1 Changed 9 years ago by Ninho

Replying to frank:

The primary repository as well as most mirrors have retired this version, but it is still available at, e.g.

 http://ftp5.gwdg.de/pub/linux/suse/discontinued/i386/9.1/ .....

I assume you can get the sources you need by browsing the tree above. This is what I use for updating by YAST and works for me. Please note my kernel is updated version 2.6.5-7.276, not the stock kernel which was 2.6.4.52 if I am not mistaken; it may or may not make a difference relative to this bug.

Alternatively, if the above didn't work, I could send you my local copy of the desired source files by private email or ftp. Please specify the part of the source tree you would need.

Thank you very much !

-- Ninho

comment:3 Changed 9 years ago by frank

I fear we can't fix this bug. There is no easy way to detect these openSUSE kernels. The problem is that they ported back some stuff from Linux 2.6.7 to their 2.6.5 kernel and we usually depend on the version number of the kernel to decide, which kernel feature is present or not. You can fix this problem locally by removing the two functions jiffies_to_msecs() and msecs_to_jiffies() from /usr/src/vboxdrv-2.1.0/r0drv/linux/the-linux-kernel.h and from /usr/src/vboxnetflt-2.1.0/r0drv/linux/the-linux-kernel.h. After doing this, recompile the kernel modules (/etc/init.d/vboxdrv setup). However, I expect an additional error in the vboxnetflt module which we will actually fix in the next release. So I leave this bug open.

comment:4 Changed 9 years ago by frank

  • Description modified (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use