Opened 12 years ago
Closed 11 years ago
#11335 closed defect (fixed)
VirtualBox-4.2.6 fails to build with split kernel
Reported by: | mkdesu | Owned by: | |
---|---|---|---|
Component: | guest additions | Version: | VirtualBox 4.2.6 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description
./configure --with-linux=...
option does not work properly. With a split kernel (i.e., a kernel that is used like make -C /usr/src/linux O=/usr/src/linux-main
).
Example:
$ ./configure --nofatal --disable-xpcom --disable-sdl-ttf --disable-pulse --disable-alsa --with-linux=/usr/src/linux-main --build-headless $ . env.sh $ kmk ... kmk: *** [/tmp/VirtualBox-4.2.6/out/linux.x86/release/obj/RuntimeR0Drv/r0drv/linux/assert-r0drv-linux.o] Error 1 The failing command: @gcc -c -O2 -nostdinc -iwithprefix include -include /usr/src/linux-main/include/generated/autoconf.h -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wstrict-prototypes -Wno-pointer-sign -Wno-sign-compare -fdiagnostics-show-option -fno-stack-protector -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -include /tmp/VirtualBox-4.2.6/include/VBox/SUPDrvMangling.h -mpreferred-stack-boundary=2 -msoft-float -I/tmp/VirtualBox-4.2.6/src/VBox/Runtime/r0drv/linux -I/tmp/VirtualBox-4.2.6/src/VBox/Runtime -I/tmp/VirtualBox-4.2.6/src/VBox/Runtime/include -I/usr/src/linux-main/include -I/usr/src/linux-main/include2 -I/usr/src/linux-3.4.7-hardened/include -I/usr/src/linux-3.4.7-hardened/include/asm-i386/mach-default -I/usr/src/linux-3.4.7-hardened/include/asm-x86/mach-default -I/usr/src/linux-3.4.7-hardened/arch/x86/include -I/usr/src/linux-3.4.7-hardened/arch/x86/include/asm/mach-default -I/usr/src/linux-3.4.7-hardened/arch/x86/include/uapi -I/usr/src/linux-3.4.7-hardened/arch/x86/include/generated -I/usr/src/linux-3.4.7-hardened/arch/x86/include/generated/uapi -I/usr/src/linux-3.4.7-hardened/include/uapi -I/usr/src/linux-3.4.7-hardened/include/generated/uapi -I/usr/src/linux-3.4.7-hardened/include -I/tmp/VirtualBox-4.2.6/out/linux.x86/release/obj/RuntimeR0Drv/dtrace -I/tmp/VirtualBox-4.2.6/include -I/tmp/VirtualBox-4.2.6/out/linux.x86/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DRTPATH_APP_PRIVATE=\"/opt/VirtualBox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=64 -D__KERNEL__ -DMODULE -DIN_RT_R0 -DRT_WITH_VBOX -DRT_WITHOUT_NOCRT_WRAPPERS -DRT_NO_EXPORT_SYMBOL -DMODULE -DKBUILD_MODNAME=KBUILD_STR\(vboxdrv\) -DKBUILD_BASENAME=KBUILD_STR\(vboxdrv\) -DIN_SUP_R0 -Wp,-MD,/tmp/VirtualBox-4.2.6/out/linux.x86/release/obj/RuntimeR0Drv/r0drv/linux/assert-r0drv-linux.o.dep -Wp,-MT,/tmp/VirtualBox-4.2.6/out/linux.x86/release/obj/RuntimeR0Drv/r0drv/linux/assert-r0drv-linux.o -Wp,-MP -o /tmp/VirtualBox-4.2.6/out/linux.x86/release/obj/RuntimeR0Drv/r0drv/linux/assert-r0drv-linux.o /tmp/VirtualBox-4.2.6/src/VBox/Runtime/r0drv/linux/assert-r0drv-linux.c
In my configuration, /lib/modules/.../{build,source}
links are unavailable, but I don't think it matters here, since the configuration correctly detects kernel sources (/usr/src/linux-3.4.7-hardened
) and build (/usr/src/linux-main
) trees.
Please see Gentoo bug #424816 for more information.
The following (hackish) command apparently fixes the issue:
$ sed -i 's@\<kernelpath\>\(.*/generated\>\)@VBOX_LINUX_SRC\1@' Config.kmk
Should be fixed a longer time ago, at least it works for VBox 4.3.2.