FS#57720 - [virtualbox] [virtualbox-host-dkms] incorrectly repeating directory in kernel module Makefile.

Attached to Project: Community Packages
Opened by Oid Maps (dreieck) - Monday, 05 March 2018, 14:07 GMT
Last edited by Christian Hesse (eworm) - Friday, 17 July 2020, 06:47 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

###### Description ######

Since some time (previously it worked), building the virtualbox host kernel modules manually is no longer possible, since the Makefile which gets generated when the Arch Linux package is built adds incorrectly a subdirectory two times, making include files no longer findable.

I am currently using community/virtualbox-host-dkms version 5.2.8-1.

###### Steps to reproduce ######

:::bash
cd /usr/src/vboxhost-5.2.8_OSE
make clean
make -j1 2>&1

The output is this:

=== Building 'vboxdrv' module ===
make[1]: Entering directory '/usr/src/vboxhost-5.2.8_OSE/vboxdrv'
make V= CONFIG_MODULE_SIG= -C /lib/modules/4.15.3-pf/build SUBDIRS=/usr/src/vboxhost-5.2.8_OSE/vboxdrv SRCROOT=/usr/src/vboxhost-5.2.8_OSE/vboxdrv -j1 modules
make[2]: Entering directory '/usr/lib/modules/4.15.3-pf/build'
CC [M] /usr/src/vboxhost-5.2.8_OSE/vboxdrv/linux/SUPDrv-linux.o
cc1: fatal error: /usr/src/vboxhost-5.2.8_OSE/vboxdrv/vboxdrv/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
make[3]: *** [scripts/Makefile.build:317: /usr/src/vboxhost-5.2.8_OSE/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** [Makefile:1509: _module_/usr/src/vboxhost-5.2.8_OSE/vboxdrv] Error 2
make[2]: Leaving directory '/usr/lib/modules/4.15.3-pf/build'
make[1]: *** [/usr/src/vboxhost-5.2.8_OSE/vboxdrv/Makefile.include.footer:101: vboxdrv] Error 2
make[1]: Leaving directory '/usr/src/vboxhost-5.2.8_OSE/vboxdrv'
make: *** [Makefile:49: all] Error 2

The file ''SUPDrvMangling.h'' cannot be found because ''vboxdrv/'' appears twice in the path. It should only appear once.

Similar things happen if I try to compile the individual modules one by one. For example:

:::bash
cd /usr/src/vboxhost-5.2.8_OSE/vboxpci
make clean
make -j1 2>%1

produces the following output:

make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.15.3-pf/build SUBDIRS=/usr/src/vboxhost-5.2.8_OSE/vboxpci SRCROOT=/usr/src/vboxhost-5.2.8_OSE/vboxpci -j1 modules
make[1]: Entering directory '/usr/lib/modules/4.15.3-pf/build'
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)
mkdir -p /usr/src/vboxhost-5.2.8_OSE/vboxpci/.tmp_versions ; rm -f /usr/src/vboxhost-5.2.8_OSE/vboxpci/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/usr/src/vboxhost-5.2.8_OSE/vboxpci
gcc -Wp,-MD,/usr/src/vboxhost-5.2.8_OSE/vboxpci/linux/.VBoxPci-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -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 -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_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -include /usr/src/vboxhost-5.2.8_OSE/vboxpci/vboxpci/include/VBox/SUPDrvMangling.h -fno-pie -I/lib/modules/4.15.3-pf/build/include -I/usr/src/vboxhost-5.2.8_OSE/vboxpci/vboxpci/ -I/usr/src/vboxhost-5.2.8_OSE/vboxpci/vboxpci/include -I/usr/src/vboxhost-5.2.8_OSE/vboxpci/vboxpci/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_AMD64 -DMODULE -DKBUILD_BASENAME='"VBoxPci_linux"' -DKBUILD_MODNAME='"vboxpci"' -c -o /usr/src/vboxhost-5.2.8_OSE/vboxpci/linux/.tmp_VBoxPci-linux.o /usr/src/vboxhost-5.2.8_OSE/vboxpci/linux/VBoxPci-linux.c
cc1: fatal error: /usr/src/vboxhost-5.2.8_OSE/vboxpci/vboxpci/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
make[2]: *** [scripts/Makefile.build:317: /usr/src/vboxhost-5.2.8_OSE/vboxpci/linux/VBoxPci-linux.o] Error 1
make[1]: *** [Makefile:1509: _module_/usr/src/vboxhost-5.2.8_OSE/vboxpci] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.15.3-pf/build'
make: *** [/usr/src/vboxhost-5.2.8_OSE/vboxpci/Makefile.include.footer:101: vboxpci] Error 2

Again, ''vboxpci/'' appears twice in the path.
This task depends upon

Closed by  Christian Hesse (eworm)
Friday, 17 July 2020, 06:47 GMT
Reason for closing:  Works for me
Additional comments about closing:  works for me
Comment by Oid Maps (dreieck) - Tuesday, 04 September 2018, 15:16 GMT
  • Field changed: Percent Complete (100% → 0%)
There is a patch which allows building without DKMS:

http://virtualbox.org/ticket/17645 (http://virtualbox.org/raw-attachment/ticket/17645/build-without-dkms.patch)

.. since there is no non-DKMS-package, but building directly without DKMS is a more fundamental way of doing it, no-DKMS-building should be supported.

Loading...