VirtualBox

Ticket #2986 (closed defect: wontfix)

Opened 5 years ago

Last modified 4 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. 

Attachments

Module compile.log Download (47.3 KB) - added by Ninho 5 years ago.
Failure.txt Download (4.3 KB) - added by Ninho 5 years ago.
Reports showing failure while loading VirtualBox

Change History

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

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

comment:2 in reply to: ↑ 1 Changed 5 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 5 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 5 years ago by frank

  • Description modified (diff)

comment:5 Changed 5 years ago by Ninho

I had anticipated your reply somewhat and tried removing the function redefinitions from (both) header files; unfortunately it ended up with more errors just as you say. I may retry one more time (after all I did not really know what I was doing...)

Thank you for leaving the bug open.

Changed 5 years ago by Ninho

comment:6 Changed 5 years ago by Ninho

Confirmed : removing the duplicate function defs uncovered other problems. Attaching log in case it helps.

Regards

comment:7 Changed 5 years ago by frank

The other fix is contained in r15889.

comment:8 Changed 5 years ago by Ninho

' fix is contained in r15889.'

T.Y. I would try the patch, if only somebody would summarise the commands needed to apply the diff and patch.

comment:9 Changed 5 years ago by Ninho

Edit my above comment : this particular patch appears to be short enough I seem to be able to apply it by hand. I'll report soon.

comment:10 Changed 5 years ago by Ninho

Here. Errors still :=(

make -f /usr/src/linux-2.6.5-7.276/scripts/Makefile.build obj=/tmp/vbox.3
  gcc -Wp,-MD,/tmp/vbox.3/linux/.VBoxNetFlt-linux.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5-7.276/include  -I/tmp/vbox.3 -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.3/  -I/tmp/vbox.3/include  -I/tmp/vbox.3/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME=VBoxNetFlt_linux -DKBUILD_MODNAME=vboxnetflt -c -o /tmp/vbox.3/linux/.tmp_VBoxNetFlt-linux.o /tmp/vbox.3/linux/VBoxNetFlt-linux.c
/tmp/vbox.3/linux/VBoxNetFlt-linux.c: In function `vboxNetFltLinuxSkBufFromSG':
/tmp/vbox.3/linux/VBoxNetFlt-linux.c:313: error: `NET_IP_ALIGN' undeclared (first use in this function)
/tmp/vbox.3/linux/VBoxNetFlt-linux.c:313: error: (Each undeclared identifier is reported only once
/tmp/vbox.3/linux/VBoxNetFlt-linux.c:313: error: for each function it appears in.)
/tmp/vbox.3/linux/VBoxNetFlt-linux.c: In function `vboxNetFltLinuxAttachToInterface':
/tmp/vbox.3/linux/VBoxNetFlt-linux.c:647: warning: assignment from incompatible pointer type
/tmp/vbox.3/linux/VBoxNetFlt-linux.c: In function `vboxNetFltOsPreInitInstance':
/tmp/vbox.3/linux/VBoxNetFlt-linux.c:1035: warning: assignment from incompatible pointer type
make[4]: *** [/tmp/vbox.3/linux/VBoxNetFlt-linux.o] Erreur 1
make[3]: *** [_module_/tmp/vbox.3] Erreur 2
make[2]: *** [modules] Erreur 2
make[1]: *** [modules] Erreur 2
make: *** [vboxnetflt] Erreur 2

comment:11 Changed 5 years ago by Ninho

News : Installed newer VirtualBox 2.1.2 which includes 'Changeset 15889' unless I am mistaken. Manually removed the offending redefs from both instances of 'the-linux-kernel.h'. Recompiled modules, no errors; modules loaded successfully!

(However I couldn't quite eat the pudding for it says my distro is missing 'libstdc++.so.6'. I guess this bug is not the place to enquire about fixing this new problem.)

comment:12 Changed 5 years ago by Ninho

Frank, Although the modules did compile without error, there were two warnings to the log :

/tmp/vbox.1/r0drv/linux/mp-r0drv-linux.c:262: warning: `rtmpOnSpecificLinuxWrapper' defined but not used

* Warning: "SUPDrvLinuxIDC" tmp/vbox.1/vboxnetflt.ko undefined!

Are you still taking this bug into consideration ?

comment:13 Changed 5 years ago by frank

You can ignore these two warnings. As for the libstdc++ problem: We are indeed depend on libstdc++6 with our run installer so if your distribution does not provide this library there is nothing we can do about this, sorry.

comment:14 Changed 5 years ago by Ninho

Installed binary libstdc++.so.6 which is indeed found and loaded by VirtualBox. However, virtualbox still fails loading, ending in a floating point exception while loading libncurses! I have ncurses 5.4-61.3 (i586), and I could see no special note in Requirements for a particular version of that lib.

Is this matter for a separate bug report ? Here's the end of the loader reports, first with LD_DEBUG=libs , then =all, showing the failure.

_

{{{... 9289: find library=libncurses.so.5; searching 9289: search path=/opt/VirtualBox-2.1.2 (RPATH from file ./VirtualBox) 9289: trying file=/opt/VirtualBox-2.1.2/libncurses.so.5 9289: search path=/opt/VirtualBox-2.1.2 (RPATH from file ./VirtualBox) 9289: trying file=/opt/VirtualBox-2.1.2/libncurses.so.5 9289: search cache=/etc/ld.so.cache 9289: trying file=/lib/libncurses.so.5 9289: Exception en point flottant

}}}

_

... And :

_ {{{... 9414: checking for version `GLIBC_2.1' in file /lib/tls/libc.so.6 required by file /lib/libncurses.so.5 9414: checking for version `GLIBC_2.0' in file /lib/tls/libc.so.6 required by file /lib/libncurses.so.5 9414: 9414: relocation processing: /lib/libncurses.so.5 9414: symbol=_nc_outch; lookup in file=./VirtualBox 9414: symbol=_nc_outch; lookup in file=/lib/tls/libpthread.so.0 9414: symbol=_nc_outch; lookup in file=/lib/libdl.so.2 9414: symbol=_nc_outch; lookup in file=/usr/lib/libstdc++.so.6 9414: symbol=_nc_outch; lookup in file=/lib/tls/libc.so.6 9414: symbol=_nc_outch; lookup in file=/lib/ld-linux.so.2 9414: symbol=_nc_outch; lookup in file=/lib/tls/libm.so.6 9414: symbol=_nc_outch; lookup in file=/lib/libgcc_s.so.1 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/VBoxRT.so 9414: symbol=_nc_outch; lookup in file=/lib/tls/librt.so.1 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/VirtualBox.so 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/VBoxKeyboard.so 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/VBoxRT.so 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libXcursor.so.1 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libXext.so.6 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libX11.so.6 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/VBoxXPCOM.so 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/libVBoxQtCore.so.4 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/libVBoxQtGui.so.4 9414: symbol=_nc_outch; lookup in file=/opt/VirtualBox- 2.1.2/libVBoxQtNetwork.so.4 9414: symbol=_nc_outch; lookup in file=/usr/lib/libSDL- 1.2.so.0 9414: symbol=_nc_outch; lookup in file=/usr/lib/libstdc++.so.6 9414: symbol=_nc_outch; lookup in file=/lib/libgcc_s.so.1 9414: symbol=_nc_outch; lookup in file=/lib/tls/libc.so.6 9414: symbol=_nc_outch; lookup in file=/lib/tls/libpthread.so.0 9414: symbol=_nc_outch; lookup in file=/lib/tls/librt.so.1 9414: symbol=_nc_outch; lookup in file=/lib/libdl.so.2 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libXrender.so.1 9414: symbol=_nc_outch; lookup in file=/lib/tls/libm.so.6 9414: symbol=_nc_outch; lookup in file=/usr/lib/libfontconfig.so.1 9414: symbol=_nc_outch; lookup in file=/lib/libz.so.1 9414: symbol=_nc_outch; lookup in file=/opt/gnome/lib/libgthread-2.0.so.0 9414: symbol=_nc_outch; lookup in file=/opt/gnome/lib/libglib-2.0.so.0 9414: symbol=_nc_outch; lookup in file=/usr/lib/libpng12.so.0 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libSM.so.6 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libICE.so.6 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libXi.so.6 9414: symbol=_nc_outch; lookup in file=/usr/X11R6/lib/libXrandr.so.2 9414: symbol=_nc_outch; lookup in file=/usr/lib/libXfixes.so.3 Exception en point flottant _

}}}

Changed 5 years ago by Ninho

Reports showing failure while loading VirtualBox

comment:15 Changed 5 years ago by Ninho

Attached the report as Failure.txt, because the previous cut and paste ended out so poorly formatted.

comment:16 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to wontfix
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use