Created attachment 605882 [details] build log I get sed 's/ko$/o/' /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxnetflt/modules.order | scripts/mod/modpost -i ./Module.symvers -o /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxnetflt/Module.symvers -s -T - ERROR: "VBoxHost_RTErrConvertToErrno" [/var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxnetflt/vboxnetflt.ko] undefined! and many more such error messages. A very similar problem arises when compiling virtualbox-guest-additions-6.1.2
OpenSuse patch: https://build.opensuse.org/package/view_file/Virtualization/virtualbox/fixes_for_5.5.patch?expand=1
Created attachment 607172 [details, diff] Adapted from OpenSUSE patch and working with gentoo-sources:5.5.0
+1 for attached patch working on Linux-5.5.0-gentoo-x86_64-AMD_Athlon
Can confirm that with provided patch virtualbox-modules compiles w/o error.
With the patch, I get ok compile, but error in install phase "FileNotFoundError: [Errno 2] No such file or directory: b'vboxpci.ko'". The work directory contains folders vboxdrv, vboxnetadp, vboxnetflt, and vboxpci, but .ko files only for the first three. If I cd into vboxpci and type "make" I get a bunch of the same "undefined" errors that started this bug. I'm quite willing to believe there is something odd in my configuration or setup, but I'd appreciate any hints as to where to start looking. Ah - the difference is that I am trying virtualbox-modules-6.0.14. I suppose there is no reason for me not to go to 6.1.2, as everything above 5.2.32 is still marked ~.
Confirm that the attached patch works for sys-kernel/gentoo-sources-5.5.1 as well. (patched version is app-emulation/virtualbox-modules-6.1.2)
it works for me too. amd64 gentoo-sources-5.5.1
I can confirm that the patch works with gentoo-sources-5.5.0. Thank you very much Niranjan!
To test: 1) mkdir -p /etc/portage/patches/app-emulation/virtualbox-modules-6.1.2 2) cd /etc/portage/patches/app-emulation/virtualbox-modules-6.1.2 3) wget -O fixes_for_5.5.patch https://bugs.gentoo.org/attachment.cgi?id=607172 4) emerge -1v virtualbox-modules
There is also a thread here: https://forums.gentoo.org/viewtopic-t-1107490.html?sid=798a3ceb1e11c4c5b36686c90049c90b
The attached patch also works for sys-kernel/gentoo-sources-5.5.2
*** Bug 708248 has been marked as a duplicate of this bug. ***
It works on 5.5.3-gentoo too
> Confirm that the attached patch works for sys-kernel/gentoo-sources-5.5.1 as > well. > (patched version is app-emulation/virtualbox-modules-6.1.2) It works for me too.
(In reply to Jack from comment #5) > With the patch, I get ok compile, but error in install phase > "FileNotFoundError: [Errno 2] No such file or directory: b'vboxpci.ko'". > The work directory contains folders vboxdrv, vboxnetadp, vboxnetflt, and > vboxpci, but .ko files only for the first three. If I cd into vboxpci and > type "make" I get a bunch of the same "undefined" errors that started this > bug. I'm quite willing to believe there is something odd in my > configuration or setup, but I'd appreciate any hints as to where to start > looking. > > Ah - the difference is that I am trying virtualbox-modules-6.0.14. I > suppose there is no reason for me not to go to 6.1.2, as everything above > 5.2.32 is still marked ~. I have exactly the same problem. virtualbox-modules version 6.0.16, platform ~ x86.
Works with kernel 5.5.4-gentoo.
with that patch and linux-5.6 I get: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapKernel’: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1465:32: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration] 1465 | ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub) | ^~~~~~~~~~~~~~~ | ioremap_cache /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1466:30: warning: pointer/integer type mismatch in conditional expression 1466 | : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub); | ^ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:268: /var/tmp/portage/app-emulation/virtualbox-modules-6.1.2/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
Works with kernel 5.5.4-gentoo².
Virtualbox 6.1.4 works with kernel 5.5.
I can confirm this bug, with virtualbox-modules-6.1.4-r1, fresh kernel 5.6.2, and gcc 9.2.0-r2 Iade
(In reply to Iade Gesso from comment #20) > I can confirm this bug, with virtualbox-modules-6.1.4-r1, fresh kernel > 5.6.2, and gcc 9.2.0-r2 > > Iade https://bugs.gentoo.org/715726
Latest release in gentoo tree virtualbox-modules-6.1.6 fixes all these issues. Compiles against linux-5.7_rc. My only problem is that virtualbox is not ready for qt-5.15 .
Hi I'm trying to recompile vbox-guest modules6.1.18 with kernel 5.10.27 and I've the same problems apparently. The strange thing thet I've noticed is: Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK. Checking for kBuild: found, OK. Checking for Open Watcom: ** Open Watcom was not found, using alternative BIOS sources! Checking for iasl: found version 20200326, OK. Checking for xslt: found, OK. Checking for pthread: found, OK. Checking for libxml2: found version 2.9.10, OK. Checking for libIDL: ** libIDL-config (variable libIDL-config) not found! Checking for liblzf: not found -- builing liblzf from in-tree code. Checking for ssl: found version OpenSSL 1.1.1k 25 Mar 2021, OK. Checking for libcurl: found version 7.74.0, OK. Checking for libvpx: found version 1.9.0, OK. Checking for libopus: found, OK. Checking for zlib: found version 1.2.11, OK. Checking for libpng: found version 1.6.37+apng, OK. Checking for Python support: found version 3.7.10, OK. Checking for Java support: OK. Checking for static stc++ library: found, OK. Checking for Linux kernel sources: found version 5.10.27, OK. Checking for libdevmapper: found version 1.02.170 (2020-03-24), OK. Checking for libcap library: found, OK. Checking for compiler.h: compiler.h not found, OK. Checking for 32-bit support: OK. And: To compile the kernel modules, do: cd ./out/linux.amd64/release/bin/src make +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ Hardening is enabled which means that the VBox binaries will not run from the binary directory. The binaries have to be installed suid root and some more prerequisites have to be fulfilled which is normally done by installing the final package. For development, the hardening feature can be disabled by specifying the --disable-hardening parameter. Please never disable that feature for the final distribution! +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ But I've not compiled my kernel with hardening support. Maybe something that has been activated / deactivated during last kernel update? Thanks
Does this bug still happen with current versions of virtualbox and kernel?
(In reply to Viorel from comment #24) > Does this bug still happen with current versions of virtualbox and kernel? No.