VirtualBox

Opened 8 years ago

Closed 8 years ago

#15464 closed defect (fixed)

VBox 5.18 and 5.20 do not build kernel driver for 4.6.0 kernel

Reported by: marcmerlin1 Owned by:
Component: installer Version: VirtualBox 5.0.20
Keywords: Cc:
Guest type: all Host type: Linux

Description (last modified by Frank Mehnert)

They build for for the 4.4 kernel, but on the same exact machine, they fail like so:

saruman:/tmp/vbox.2# make --trace
Makefile:298: target 'vboxdrv' does not exist
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.2 SRCROOT=/tmp/vbox.2 CONFIG_MODULE_SIG= -C /lib/modules/4.6.0-amd64-volpreempt-sysrq-20160530/build modules
make[1]: Entering directory '/var/change/src/linux-4.6.0-amd64-volpreempt-sysrq-20160530'
Makefile:587: target 'include/config/auto.conf' does not exist
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo >&2 ;							\
/bin/false)
Makefile:1415: target 'crmodverdir' does not exist
mkdir -p /tmp/vbox.2/.tmp_versions ; rm -f /tmp/vbox.2/.tmp_versions/*
Makefile:1419: target 'Module.symvers' does not exist
test -e ./Module.symvers || ( \
echo; \
echo "  WARNING: Symbol version dump ./Module.symvers"; \
echo "           is missing; modules will have no dependencies and modversions."; \
echo )
Makefile:1428: update target '_module_/tmp/vbox.2' due to: crmodverdir Module.symvers
make -f ./scripts/Makefile.build obj=/tmp/vbox.2
make[2]: *** No rule to make target '/tmp/vbox.2/linux/SUPDrv-linux.o', needed by '/tmp/vbox.2/vboxdrv.o'.  Stop.
Makefile:1428: recipe for target '_module_/tmp/vbox.2' failed
make[1]: *** [_module_/tmp/vbox.2] Error 2
make[1]: Leaving directory '/var/change/src/linux-4.6.0-amd64-volpreempt-sysrq-20160530'
Makefile:298: recipe for target 'vboxdrv' failed

It looks like with a 4.6 kernel, it's unable to build /tmp/vbox.1/linux/.SUPDrv-linux.o.d and then everything stops obviously. Yet, /var/change/src/linux-4.6.0-amd64-volpreempt-sysrq-20160530 contains a fully built kernel source and the build makes it unclear what's missing.

If i tweak the module build to build for the 4.4 kernel, then the first line I see is shown below, and everything builds fine.

scripts/Makefile.build:258: update target '/tmp/vbox.1/linux/SUPDrv-linux.o' due to: /tmp/vbox.1/linux/SUPDrv-linux.c scripts/recordmcount.c scripts/recordmcount.h FORCE
set -e; 	   echo '  gcc -Wp,-MD,/tmp/vbox.1/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -include /tmp/vbox.1/include/VBox/SUPDrvMangling.h -I/lib/modules/4.4.5-amd64-volpreempt-sysrq-20160312bc5/build/include -I/tmp/vbox.1/ -I/tmp/vbox.1/include -I/tmp/vbox.1/r0drv/linux -I/tmp/vbox.1/vboxdrv/ -I/tmp/vbox.1/vboxdrv/include -I/tmp/vbox.1/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.1/linux/.tmp_SUPDrv-linux.o /tmp/vbox.1/linux/SUPDrv-linux.c'; gcc -Wp,-MD,/tmp/vbox.1/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -include /tmp/vbox.1/include/VBox/SUPDrvMangling.h -I/lib/modules/4.4.5-amd64-volpreempt-sysrq-20160312bc5/build/include -I/tmp/vbox.1/ -I/tmp/vbox.1/include -I/tmp/vbox.1/r0drv/linux -I/tmp/vbox.1/vboxdrv/ -I/tmp/vbox.1/vboxdrv/include -I/tmp/vbox.1/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.1/linux/.tmp_SUPDrv-linux.o 

Change History (2)

comment:1 by marcmerlin1, 8 years ago

I've just installed kernel 4.5.5 and the driver builds fine there. (I forgot to add that in each case, I'm getting kernel.org kernels, and compiling them myself)

comment:2 by Frank Mehnert, 8 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Compiling against Linux 4.6 was fixed in 5.0.22. See #15439 for a related problem which is fixed in the most recent 5.0 test builds.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use