Skip to main content
Topic: Virtualbox broken on LTS Kernel using DKMS (Read 1474 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Virtualbox broken on LTS Kernel using DKMS

I am using LTS kernel for stability reasons, and also because docker doesn't work properly on the  last kernel 4.19.
(current version  4.14.88-1-lts).

Virtualbox works on Kernel 4.19, because there is a package for vbox kernel modules.
But on LTS kernel it seems we have to use DKMS, which would be fine for me, except it does not build.
It was working before.
As you know, DMKS requires to build, so it requires C compiler.
It is the package virtualbox-host-dkms.

Pamac logs:
 
==> dkms install vboxhost/5.2.22_OSE -k 4.14.88-1-lts
Error! Bad return status for module build on kernel: 4.14.88-1-lts (x86_64)
Consult /var/lib/dkms/vboxhost/5.2.22_OSE/build/make.log for more information.
 
that file:

$ cat /var/lib/dkms/vboxhost/5.2.22_OSE/build/make.log
DKMS make.log for vboxhost-5.2.22_OSE for kernel 4.14.88-1-lts (x86_64)
Mon Dec 17 00:00:35 CET 2018                                                                                                                                                                           
make: Entering directory '/usr/lib/modules/4.14.88-1-lts/build'                                                                                                                                        
arch/x86/Makefile:245: *** You are building kernel with non-retpoline compiler, please update your compiler..  Stop.                                                                                   
make: Leaving directory '/usr/lib/modules/4.14.88-1-lts/build'                                                                                                                                         


So now I end up with this retpoline compiler mess, for which it seems nothing right now comes out of the box?
(retpoline exists to prevent Spectre)

Is there a solution that doesn't require patching source codes, plus reading tons of articles about that complier feature?

Right now, I just have to reboot on kernel 4.19 each time I want to use Vbox.
A bit annoying ;-)   


Re: Virtualbox broken on LTS Kernel using DKMS

Reply #1
versions number have changed, but still the same: virtual box host DMKS does not build with LTS kernel.

Re: Virtualbox broken on LTS Kernel using DKMS

Reply #2
Isn't linux-lts 4.19.13  ?
It seems that vb moved from 5 to 6, linux from 4.19 to 4.20 and lts from 4.14 to 4.19 all in a matter of a week and things seem to be out of sync a little bit.  I was holding back on vb to keep it working with 4.19 and artix modules, and all of a sudden I let it burst into current (gremlins).  It works fine with linux-4.20-artix1

Re: Virtualbox broken on LTS Kernel using DKMS

Reply #3
Yes LTS is 4.19.14-1-lts
But package  virtualbox-host-modules-artix depends on >  linux  4.20.artix1-1

So if I want to say with LTS, I am forced to use DKMS
And virtualbox-host-dkms does not build on 4.19.14-1-lts

Errors during build in pamac:
 
Code: [Select]
Install DKMS modules
==> dkms install vboxhost/6.0.0_OSE -k 4.19.14-1-lts
Error! Bad return status for module build on kernel: 4.19.14-1-lts (x86_64)
Consult /var/lib/dkms/vboxhost/6.0.0_OSE/build/make.log for more information.
==> dkms install vboxhost/6.0.0_OSE -k 4.20.0-artix1-1-ARTIX
Error! Bad return status for module build on kernel: 4.20.0-artix1-1-ARTIX (x86_64)
Consult /var/lib/dkms/vboxhost/6.0.0_OSE/build/make.log for more information.

and that file says:

Code: [Select]
DKMS make.log for vboxhost-6.0.0_OSE for kernel 4.20.0-artix1-1-ARTIX (x86_64)
Sat Jan 12 00:48:23 CET 2019
make: Entering directory '/usr/lib/modules/4.20.0-artix1-1-ARTIX/build'
gcc: error trying to exec 'cc1': execvp: No such file or directory
gcc: error trying to exec 'cc1': execvp: No such file or directory
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:291: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [scripts/Makefile.build:516: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetflt] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetadp/VBoxNetAdp.o
make[2]: *** [scripts/Makefile.build:292: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:292: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetadp/VBoxNetAdp.o] Error 1
make[1]: *** [scripts/Makefile.build:516: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxnetadp] Error 2
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxpci/linux/VBoxPci-linux.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:291: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrv.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:291: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxpci/linux/VBoxPci-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:291: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrv.o] Error 1
make[1]: *** [scripts/Makefile.build:516: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv] Error 2
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxpci/VBoxPci.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [scripts/Makefile.build:291: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxpci/VBoxPci.o] Error 1
make[1]: *** [scripts/Makefile.build:516: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxpci] Error 2
make: *** [Makefile:1563: _module_/var/lib/dkms/vboxhost/6.0.0_OSE/build] Error 2
make: Leaving directory '/usr/lib/modules/4.20.0-artix1-1-ARTIX/build'

I found that cc1 what not in PATH: sudo ln -s  /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/cc1  /usr/bin/cc1  
When I execute make again:

Code: [Select]
sudo make
=== Building 'vboxdrv' module ===
make[1]: Entering directory '/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv'
make V= CONFIG_MODULE_SIG= -C /lib/modules/4.19.14-1-lts/build SUBDIRS=/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv SRCROOT=/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv -j4 modules
make[2]: Entering directory '/usr/lib/modules/4.19.14-1-lts/build'
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrvSem.o
cc1: fatal error: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/vboxdrv/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
make[3]: *** [scripts/Makefile.build:303: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
cc1: fatal error: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/vboxdrv/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
make[3]: *** [scripts/Makefile.build:303: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrvGip.o] Error 1
cc1: fatal error: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/vboxdrv/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
cc1: fatal error: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/vboxdrv/include/VBox/SUPDrvMangling.h: No such file or directory
compilation terminated.
make[3]: *** [scripts/Makefile.build:303: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[3]: *** [scripts/Makefile.build:303: /var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/SUPDrvSem.o] Error 1
make[2]: *** [Makefile:1517: _module_/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv] Error 2
make[2]: Leaving directory '/usr/lib/modules/4.19.14-1-lts/build'
make[1]: *** [/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv/Makefile.include.footer:106: vboxdrv] Error 2
make[1]: Leaving directory '/var/lib/dkms/vboxhost/6.0.0_OSE/build/vboxdrv'
make: *** [Makefile:58: vboxdrv] Error 2



Re: Virtualbox broken on LTS Kernel using DKMS

Reply #4
FS#57720 : [virtualbox] [virtualbox-host-dkms] incorrectly repeating directory in kernel module Makefile.
https://bugs.archlinux.org/task/57720

Ok, the DKMS build now is fixed in the regular package.
Sometimes you just have to wait (for a long time)