Opened 5 years ago
Last modified 5 years ago
#19688 awaitsfeedback defect
Linux 5.7.x + VBox 6.1.10 driver install failure
Reported by: | Alex Turbov | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.10 |
Keywords: | kernel module | Cc: | |
Guest type: | other | Host type: | Linux |
Description
Trying to install just built modules I've got the error:
ERROR: modpost: "VBoxHost_RTErrConvertToErrno" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTUuidFromStr" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTErrConvertFromErrno" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTLogLoggerEx" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTNetIPv6PseudoChecksumEx" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSpinlockDestroy" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTUuidCompareStr" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemEventCreate" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemFastMutexRequest" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTLogRelGetDefaultInstanceEx" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemEventSignal" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTMemAllocTag" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemEventWait" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTNetIPv4PseudoChecksum" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTNetIPv4FinalizeChecksum" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemFastMutexRelease" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSpinlockAcquire" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTR0Term" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTMemFree" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTTimeNanoTS" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemEventDestroy" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTThreadPreemptIsEnabled" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSpinlockRelease" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemFastMutexDestroy" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTMemAllocZVarTag" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSemFastMutexCreate" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTR0Init" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "SUPDrvLinuxIDC" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTSpinlockCreate" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined! ERROR: modpost: "VBoxHost_RTNetIPv4HdrChecksum" [/usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko] undefined!
My kernel is 5.7.6, GCC is 9.3.0.
Attachments (6)
Change History (25)
by , 5 years ago
Attachment: | vbox-build.log added |
---|
comment:1 by , 5 years ago
your log shows:
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C '''/lib/modules/5.7.6-z1'''/build M=/usr/src/virtualbox-ose-6.1.10/vboxdrv SRCROOT=/usr/src/virtualbox-ose-6.1.10/vboxdrv -j8 modules 3 make[2]: Entering directory '/usr/src/virtualbox-ose-6.1.10/vboxdrv' 4 make[2]: warning: -j8 forced in submake: resetting jobserver mode. 5 test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ 6 echo >&2; \ 7 echo >&2 " ERROR: Kernel configuration is invalid."; \ 8 echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ 9 echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ 10 echo >&2 ; \ 11 /bin/false) ... make -f ./scripts/Makefile.build obj=/usr/src/virtualbox-ose-6.1.10/vboxdrv \ 13 single-build= \ 14 need-builtin=1 need-modorder=1 15 { echo /usr/src/virtualbox-ose-6.1.10/vboxdrv/vboxdrv.ko; :; } \ 16 | awk '!x[$0]++' - > /usr/src/virtualbox-ose-6.1.10/vboxdrv/modules.order 17 make -f ./scripts/Makefile.modpost 18 sed 's/ko$/o/' /usr/src/virtualbox-ose-6.1.10/vboxdrv/modules.order | scripts/mod/modpost -a -i ./Module.symvers -o /usr/src/virtualbox-ose-6.1.10/vboxdrv/Module.symvers -s -T - 19 make -f ./scripts/Makefile.modfinal 20 make[2]: Leaving directory ''''/usr/src/linux-5.7.6''''
comment:2 by , 5 years ago
Sorry, I didn't get what it shows?
root@extop〉/usr/src〉cd /usr/src/linux-5.7.6/ root@extop〉/usr/src/linux-5.7.6〉test -e include/generated/autoconf.h -a -e include/config/auto.conf && echo Ok || echo Fail Ok
Error is not displayed... it's just output of the command performed by make
due to KBUILD_VERBOSE=1
.
Could you please provide some more details what should I look at?
comment:3 by , 5 years ago
So apparently you are trying to manually build the entire OSE edition from the source code?
Are the attached logs build complete or only a subset? What exactly are you doing?
WHat is the output of 'uname -r' and what is the content of 'ls /usr/src/' and 'ls /lib/modules' please?
You say you are trying to install "just build modules" but as you can see from the error message that cannot be the case and the build cannot have been done successful.
comment:4 by , 5 years ago
Also which Linux distro is that and which Virtualbox package you have installed for this OSE edition from where? Also you are apparently building a custom kernel /lib/modules/5.7.6-z1 ?
comment:5 by , 5 years ago
So apparently you are trying to manually build the entire OSE edition from the source code?
Yes, I am.
Also which Linux distro is that and which Virtualbox package you have installed for this OSE edition from where?
I'm using Exherbo.
WHat is the output of 'uname -r' and what is the content of 'ls /usr/src/' and 'ls /lib/modules' please?
$ uname -r 5.7.6-z2 $ ls /usr/src -1 kernel_gcc_patch linux linux-5.7.6 Makefile nvidia-drivers-440.100 patches system76-dkms virtualbox-ose-6.1.10 $ ls /lib/modules -1 5.7.6-z1 5.7.6-z2 $ ll /usr/src/virtualbox-ose-6.1.10 total 8.6M drwxr-xr-x 1 root root 1.1K Jun 30 10:31 vboxdrv/ drwxr-xr-x 1 root root 730 Jun 30 10:31 vboxnetadp/ drwxr-xr-x 1 root root 1.1K Jun 30 10:31 vboxnetflt/ -rw-r--r-- 1 root root 2.6K Jun 13 09:39 build_in_tmp -rw-r--r-- 1 root root 4.3K Jun 13 09:39 Makefile -rw-r--r-- 1 root root 7.6M Jun 30 10:31 vboxdrv.ko -rw-r--r-- 1 root root 372K Jun 30 10:31 vboxnetadp.ko -rw-r--r-- 1 root root 638K Jun 30 10:31 vboxnetflt.ko
You say you are trying to install "just build modules" but as you can see from the error message that cannot be the case and the build cannot have been done successful.
What I see is a bunch of *.ko
files after make KERN_VER=5.7.6-z2 -j8 all
and echo $?
right after make shows 0
. The error from the description happened on make KERN_VER=5.7.6-z2 install
...
Are the attached logs build complete or only a subset?
They are complete. The first one (vbox-build.log
) is a result of make KBUILD_VERBOSE=1 KERN_VER=5.7.6-z2 -j8 all
, the latter is the install
target w/ the same Make variables.
comment:6 by , 5 years ago
please set 'export DEBUG=1' in your environment and re-run the build again. That should give us the following output from the build scripts:
230 # debug - show guesses. 231 ifdef DEBUG 232 ifndef VBOX_KERN_QUIET 233 $(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH)) 234 $(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR)) 235 $(warning dbg: KERN_DIR = $(KERN_DIR)) 236 $(warning dbg: KERN_INCL = $(KERN_INCL)) 237 $(warning dbg: KERN_VERSION = $(KERN_VERSION)) 238 $(warning dbg: MODULE_DIR = $(MODULE_DIR)) 239 $(warning dbg: VBOX_MODULE_SRC_DIR = $(VBOX_MODULE_SRC_DIR)) 240 endif 241 endif
by , 5 years ago
Attachment: | vbox-short-debug.log added |
---|
make KERN_VER=5.7.6-z2 DEBUG=1 install
output
comment:7 by , 5 years ago
so after a successfull build you should find:
/usr/src/vboxhost-6.1.10# nm vboxnetflt.ko |grep VBoxHost_RTErrConvertToErrno U VBoxHost_RTErrConvertToErrno /usr/src/vboxhost-6.1.10# nm vboxnetflt.ko |grep VBoxHost_RTUuidFromStr U VBoxHost_RTUuidFromStr ... /usr/src/vboxhost-6.1.10# find . -name Module.symvers -ls 19532989 40 -rw-r--r-- 1 root root 36944 Jun 30 14:21 ./vboxnetadp/Module.symvers 19532967 40 -rw-r--r-- 1 root root 36944 Jun 30 14:21 ./vboxnetflt/Module.symvers 19532961 40 -rw-r--r-- 1 root root 36944 Jun 30 14:21 ./vboxdrv/Module.symvers /usr/src/vboxhost-6.1.10# find . -name modules.order -ls 19532990 4 -rw-r--r-- 1 root root 60 Jun 30 14:21 ./vboxnetadp/modules.order 19532971 4 -rw-r--r-- 1 root root 60 Jun 30 14:21 ./vboxnetflt/modules.order 19532938 4 -rw-r--r-- 1 root root 54 Jun 30 14:21 ./vboxdrv/modules.order /usr/src/vboxhost-6.1.10# grep VBoxHost_RTErrConvertToErrno ./vboxnetflt/Module.symvers 0x00000000 VBoxHost_RTErrConvertToErrno /usr/share/virtualbox/src/vboxhost/vboxdrv/vboxdrv EXPORT_SYMBOL /usr/src/vboxhost-6.1.10# cat ./vboxnetflt/modules.order /usr/share/virtualbox/src/vboxhost/vboxnetflt/vboxnetflt.ko /usr/src/vboxhost-6.1.10# ls -la /usr/share/virtualbox/src/vboxhost/vboxnetflt/vboxnetflt.ko -rw-r--r-- 1 root root 37992 Jun 30 14:19 /usr/share/virtualbox/src/vboxhost/vboxnetflt/vboxnetflt.ko
can you check your vboxnetflt.ko kmod in usr/src/virtualbox-ose-6.1.10?
comment:8 by , 5 years ago
root@extop〉/usr/src/virtualbox-ose-6.1.10〉nm vboxnetflt.ko |grep VBoxHost_RTErrConvertToErrno U VBoxHost_RTErrConvertToErrno root@extop〉/usr/src/virtualbox-ose-6.1.10〉nm vboxnetflt.ko |grep VBoxHost_RTUuidFromStr U VBoxHost_RTUuidFromStr root@extop〉/usr/src/virtualbox-ose-6.1.10〉find . -name Module.symvers -ls 39258711 36 -rw-r--r-- 1 root root 35980 Jun 30 16:41 ./vboxnetadp/Module.symvers 39258703 36 -rw-r--r-- 1 root root 35980 Jun 30 16:41 ./vboxdrv/Module.symvers 39258710 0 -rw-r--r-- 1 root root 0 Jun 30 16:47 ./vboxnetflt/Module.symvers root@extop〉/usr/src/virtualbox-ose-6.1.10〉find . -name modules.order -ls 39258802 4 -rw-r--r-- 1 root root 56 Jun 30 16:41 ./vboxnetadp/modules.order 39258678 4 -rw-r--r-- 1 root root 50 Jun 30 19:17 ./vboxdrv/modules.order 39258803 4 -rw-r--r-- 1 root root 56 Jun 30 19:17 ./vboxnetflt/modules.order root@extop〉/usr/src/virtualbox-ose-6.1.10〉grep VBoxHost_RTErrConvertToErrno ./vboxnetflt/Module.symvers root@extop〉/usr/src/virtualbox-ose-6.1.10〉1〉cat ./vboxnetflt/modules.order /usr/src/virtualbox-ose-6.1.10/vboxnetflt/vboxnetflt.ko root@extop〉/usr/src/virtualbox-ose-6.1.10〉2〉ls -la vboxnetflt/vboxnetflt.ko -rw-r--r-- 1 root root 638K Jun 30 16:41 vboxnetflt/vboxnetflt.ko
comment:9 by , 5 years ago
thanks now we have the red herring, from your output:
39258710 0 -rw-r--r-- 1 root root 0 Jun 30 16:47 ./vboxnetflt/Module.symvers
That exported symbol table file is empty!
this is why it fails and now I can reproduce it as well locally with the source code from the regular installed !Virtualbox package:
root@minibox:/usr/src/vboxhost-6.1.10# make DEBUG=1 KBUILD_VERBOSE=1 install ... ERROR: "VBoxHost_RTNetIPv4HdrChecksum" [/usr/share/virtualbox/src/vboxhost/vboxnetflt/vboxnetflt.ko] undefined! scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[3]: *** [__modpost] Error 1 Makefile:1659: recipe for target 'modules' failed make[2]: *** [modules] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-5.3.0-53-generic' /usr/share/virtualbox/src/vboxhost/vboxnetflt/Makefile-footer.gmk:114: recipe for target 'vboxnetflt' failed make[1]: *** [vboxnetflt] Error 2 make[1]: Leaving directory '/usr/share/virtualbox/src/vboxhost/vboxnetflt' Makefile:96: recipe for target 'install' failed make: *** [install] Error 2 ... root@minibox:/usr/src/vboxhost-6.1.10# find . -name Module.symvers -ls 19532982 0 -rw-r--r-- 1 root root 0 Jun 30 20:52 ./vboxnetflt/Module.symvers 19532961 40 -rw-r--r-- 1 root root 36944 Jun 30 20:52 ./vboxdrv/Module.symvers
This does not happen if you run:
# make clean # make DEBUG=1 KBUILD_VERBOSE=1 # make DEBUG=1 KBUILD_VERBOSE=1 install
Can you test this in your environment please?
follow-up: 12 comment:10 by , 5 years ago
Can you test this in your environment please?
Yes, it fails w/ the given error.
comment:11 by , 5 years ago
root@extop〉/usr/src/virtualbox-ose-6.1.10〉 find . -name Module.symvers -ls 39263859 36 -rw-r--r-- 1 root root 35980 Jul 1 06:54 ./vboxnetadp/Module.symvers 39263779 36 -rw-r--r-- 1 root root 35980 Jul 1 06:54 ./vboxdrv/Module.symvers 39263786 0 -rw-r--r-- 1 root root 0 Jul 1 06:54 ./vboxnetflt/Module.symvers
comment:12 by , 5 years ago
Replying to exher:
Can you test this in your environment please?
Yes, it fails w/ the given error.
Just to clarify, you still see the failure when instead of just going "make DEBUG=1 KBUILD_VERBOSE=1 install" you use this 3 step sequence:
# make clean # make DEBUG=1 KBUILD_VERBOSE=1 # make DEBUG=1 KBUILD_VERBOSE=1 install
comment:13 by , 5 years ago
Just to clarify, you still see the failure when instead of just going "make DEBUG=1 KBUILD_VERBOSE=1 install" you use this 3 step sequence
Yes, I do.
comment:14 by , 5 years ago
can you please try applying the following patch to the corresponding Makefile in your /usr/src/virtualbox-ose-6.1.10 location:
root@minibox:/usr/src/vboxhost-6.1.10# diff -c Makefile.orig Makefile *** Makefile.orig 2020-07-01 08:25:18.028584534 +0200 --- Makefile 2020-07-01 17:48:18.808902674 +0200 *************** *** 95,106 **** --- 95,115 ---- install: @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv install @if [ -d vboxnetflt ]; then \ + if [ -f vboxdrv/Module.symvers ]; then \ + cp vboxdrv/Module.symvers vboxnetflt; \ + fi; \ $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetflt install; \ fi @if [ -d vboxnetadp ]; then \ + if [ -f vboxdrv/Module.symvers ]; then \ + cp vboxdrv/Module.symvers vboxnetadp; \ + fi; \ $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetadp install; \ fi @if [ -d vboxpci ]; then \ + if [ -f vboxdrv/Module.symvers ]; then \ + cp vboxdrv/Module.symvers vboxpci; \ + fi; \ $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxpci install; \ fi
then run again in /usr/src/virtualbox-ose-6.1.10:
#make clean #make install
comment:15 by , 5 years ago
It doesn't help. After make install
the vboxnetflt/Module.symvers
become empty... meaning that smth overwrites it during install
...
PS. Please attach any further patches, so I can download 'em easily.
by , 5 years ago
Attachment: | hostdrivers-makefile-diff.txt added |
---|
Trunk hostdrivers makefile diff for: trunk/src/VBox/HostDrivers/linux/Makefile
comment:16 by , 5 years ago
Status: | new → awaitsfeedback |
---|
So with the fix attached I cannot reproduce the failure anymore.
I also checked with OpenSuse Tumbleweed which is at 5.7.5 at the moment and their distro Virtualbox package (which has a similar fix applied as I did) and cannot reproduce the problem there either.
So in order to make any more progress specifically for you I'd suggest:
1) attach the makefile src/VBox/HostDrivers/linux/Makefile
to this bug report to see what state it is in, that is in your case /usr/src/virtualbox-ose-6.1.10/Makefile
2) provide a reproducable test case, at best with the offical
Virtualbox packages installed
3) talk to whoever is building the distro packages for your OSE
version of Virtualbox
comment:17 by , 5 years ago
also remind you, for reproducing the issue use the sequence of:
# make # make install
running "make install" without running the build first is not going to work properly.
comment:18 by , 5 years ago
As I've already reported the patch doesn't help... Yes, I did exactly the specified commands.
comment:19 by , 5 years ago
I'm using Exherbo Linux (and this package https://gitlab.exherbo.org/living-in-exherbo/exform/-/blob/master/packages/app-virtualization/virtualbox-ose/virtualbox-ose.exlib) to build VirtualBox from sources. The executables are built fine. The package also installs the kernel module sources (Exherbo does not have its way to build Linux kernel, it's completely the responsibility of the user to built whatever he needs/wants). And AFAIK there are no modifications to that modules has done (it is exactly that was packed into the official tarball).
Build log