Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 706800

Summary: app-emulation/virtualbox-modules-6.1.2 with kernel 5.5.0 - ERROR: "VBoxHost_RTStrPrintf" [.../work/vboxnetadp/vboxnetadp.ko] undefined!
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) <polynomial-c>
Status: UNCONFIRMED ---    
Severity: normal CC: ab4bd, andrea.nugnes, benjamin.reveille, bugs, captaincrutches, chris, ericb, gentoo, jan, krinpaus, marian.stranecky, mark+gentoobugs, mgorny, mplichta, nexion.hellborn, ostroffjh, pacho, paolo.pedroni, phobosk, poncho, Sander.Sweers, schinkelm, silvio.gerli, sven.eden, tb, tka, todd, toralf, vmatare+gbug, xaviermiller
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
Adapted from OpenSUSE patch and working with gentoo-sources:5.5.0

Description Helmut Jarausch 2020-01-28 12:14:06 UTC
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
Comment 2 Niranjan 2020-01-28 20:13:31 UTC
Created attachment 607172 [details, diff]
Adapted from OpenSUSE patch and working with gentoo-sources:5.5.0
Comment 3 Ian Pickworth 2020-01-29 13:14:22 UTC
+1 for attached patch working on Linux-5.5.0-gentoo-x86_64-AMD_Athlon
Comment 4 Aleksandr K. 2020-01-29 23:04:20 UTC
Can confirm that with provided patch virtualbox-modules compiles w/o error.
Comment 5 Jack 2020-01-31 16:59:01 UTC
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 ~.
Comment 6 Ian Pickworth 2020-02-01 15:09:38 UTC
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)
Comment 7 Silvio 2020-02-04 07:47:31 UTC
it works for me too.
amd64
gentoo-sources-5.5.1
Comment 8 Sven Eden 2020-02-04 09:54:39 UTC
I can confirm that the patch works with gentoo-sources-5.5.0.

Thank you very much Niranjan!
Comment 9 Silvio 2020-02-04 10:02:31 UTC
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
Comment 10 Marco Schinkel 2020-02-04 10:26:55 UTC
There is also a thread here:

https://forums.gentoo.org/viewtopic-t-1107490.html?sid=798a3ceb1e11c4c5b36686c90049c90b
Comment 11 vowstar 2020-02-05 13:53:41 UTC
The attached patch also works for sys-kernel/gentoo-sources-5.5.2
Comment 12 Pacho Ramos gentoo-dev 2020-02-09 23:02:00 UTC
*** Bug 708248 has been marked as a duplicate of this bug. ***
Comment 13 GianpaMX 2020-02-13 05:16:29 UTC
It works on 5.5.3-gentoo too
Comment 14 Aleh K 2020-02-13 09:33:27 UTC
> 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.
Comment 15 Andrew 2020-02-15 11:59:14 UTC
(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.
Comment 16 Pavel Půlpán 2020-02-18 14:21:48 UTC
Works with kernel 5.5.4-gentoo.
Comment 17 jospezial 2020-02-19 03:17:53 UTC
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
Comment 18 Adios Kid 2020-02-19 03:56:43 UTC
Works with kernel 5.5.4-gentoo².
Comment 19 tka 2020-02-21 10:04:24 UTC
Virtualbox 6.1.4 works with kernel 5.5.
Comment 20 Iade Gesso 2020-04-07 12:10:41 UTC
I can confirm this bug, with virtualbox-modules-6.1.4-r1, fresh kernel 5.6.2, and gcc 9.2.0-r2

Iade
Comment 21 Michal Plichta 2020-04-07 12:20:15 UTC
(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
Comment 22 jospezial 2020-04-24 10:35:51 UTC
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 .
Comment 23 Andrea 2021-04-07 14:52:20 UTC
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