You are not logged in.

#1 2021-02-08 01:40:28

ooo
Member
Registered: 2013-04-10
Posts: 1,638

[SOLVED] Building virtualbox-host-dkms for custom kernel fails

Building virtualbox-host-dkms-6.1.18-1 module for my custom kernel fails with compilation error. I just noticed the problem after updating to 5.10.14, and can reproduce on 5.10.13 as well. Building the module for 5.10.13 worked before, and based on the error message I'm guessing this resuls from the recent glibc/binutils updates.

Looks like virtualbox-host-modules-arch has been updated for linux-5.10.14.arch1-1, and supposedly built with the same toolchain, so this seems somehow specific either to my kernel .config, or system.

Any suggestions are greatly appreciated.

Logs:

# dkms install vboxhost/6.1.18_OSE -k 5.10.13-ooo

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.13-ooo -C /usr/lib/modules/5.10.13-ooo/build M=/var/lib/dkms/vboxhost/6.1.18_OSE/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.13-ooo (x86_64)
Consult /var/lib/dkms/vboxhost/6.1.18_OSE/build/make.log for more information.
# cat /var/lib/dkms/vboxhost/6.1.18_OSE/build/make.log
DKMS make.log for vboxhost-6.1.18_OSE for kernel 5.10.13-ooo (x86_64)
Mon  8 Feb 03:18:29 EET 2021
make: Entering directory '/usr/src/linux-5.10'
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetadp/VBoxNetAdp.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrv.o
  LD [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetadp/vboxnetadp.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvSem.o
  LD [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxnetflt/vboxnetflt.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPLibAll.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/r0drv/initterm-r0drv.o
/var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvTracer.o: warning: objtool: supdrvTracerProbeFireStub() is missing an ELF size annotation
/var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvTracer.o: warning: objtool: missing symbol for insn at offset 0x0

make[2]: *** [scripts/Makefile.build:279: /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvTracer.o] Error 255
make[2]: *** Deleting file '/var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv/SUPDrvTracer.o'
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:496: /var/lib/dkms/vboxhost/6.1.18_OSE/build/vboxdrv] Error 2
make: *** [Makefile:1805: /var/lib/dkms/vboxhost/6.1.18_OSE/build] Error 2
make: Leaving directory '/usr/src/linux-5.10'

Last edited by ooo (2021-04-20 20:52:21)

Offline

#2 2021-02-08 02:15:37

loqs
Member
Registered: 2014-03-06
Posts: 17,337

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

Can you reproduce the issue using virtualbox-host-dkms-6.1.18-1 and linux-5.10.14.arch1-1?  Which as you noted has been built succesfully.

Offline

#3 2021-02-08 02:44:28

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

@loqs Thanks for the suggestion, didn't think of trying that.
Building the dkms module for 5.10.13-arch1-2 kernel worked, which should rule out any system specific causes.

I suppose I'll just have to go trough the two kernel configs for any differences that could be related.

Offline

#4 2021-02-08 14:18:50

Best_
Member
From: Oslo, Norway
Registered: 2011-04-09
Posts: 20

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

Same error here. plz report back if you find fix.

Offline

#5 2021-02-09 00:46:10

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

I have confirmed that there should be a kernel config that works around the error, as I'm able to build the virtualbox modules after building my custom kernel with the 5.10.14.arch1-1 kernel's config. However I still haven't found a config option that would solve this.

I figured most obvious location would be in 'Compile-time checks and compiler option' section, but the problem persists with that part of the config being identical to the arch kernel config.

Also I'm suspecting this is the commit in binutils 2.36 that results in this issue (the suspicion is based on this kernel commit that fixes similar build error).

Offline

#6 2021-02-09 04:28:57

loqs
Member
Registered: 2014-03-06
Posts: 17,337

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

@ooo would you be willing to share your kernel config?

Offline

#7 2021-02-09 04:48:32

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

Offline

#8 2021-02-09 23:41:06

michaudg
Member
Registered: 2009-12-11
Posts: 11

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

ooo wrote:

Also I'm suspecting this is the commit in binutils 2.36 that results in this issue (the suspicion is based on this kernel commit that fixes similar build error).

Nice deduction! Downgrading binutils to 2.35.1 solved the vbox modules build error with xanmod-5.10.14 kernel in my case.

Offline

#9 2021-02-10 01:13:42

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

Offline

#10 2021-02-17 18:34:16

figue
Member
Registered: 2007-12-16
Posts: 59

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

Quick workaround for now:

edit /usr/src/vboxhost-6.1.18_OSE/vboxnetflt/linux/VBoxNetFlt-linux.c
and add

#include <linux/ethtool.h>

directly after

#include <linux/netdevice.h>

https://github.com/xanmod/linux/issues/ … -779822943

Offline

#11 2021-02-18 05:18:17

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

figue wrote:

Quick workaround for now:

edit /usr/src/vboxhost-6.1.18_OSE/vboxnetflt/linux/VBoxNetFlt-linux.c
and add

#include <linux/ethtool.h>

directly after

#include <linux/netdevice.h>

https://github.com/xanmod/linux/issues/ … -779822943

This doesn't fix the issue when compiling with binutils 2.36, which is the problem discussed here.

The workaround you suggested should fix compilation against linux 5.11, and it is already included in the virtualbox-host-dkms-6.1.18-2 package.

Offline

#12 2021-02-18 07:29:24

figue
Member
Registered: 2007-12-16
Posts: 59

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

ooo wrote:
figue wrote:

Quick workaround for now:

edit /usr/src/vboxhost-6.1.18_OSE/vboxnetflt/linux/VBoxNetFlt-linux.c
and add

#include <linux/ethtool.h>

directly after

#include <linux/netdevice.h>

https://github.com/xanmod/linux/issues/ … -779822943

This doesn't fix the issue when compiling with binutils 2.36, which is the problem discussed here.

The workaround you suggested should fix compilation against linux 5.11, and it is already included in the virtualbox-host-dkms-6.1.18-2 package.

Yeah, it was merged yesterday. And you are right, you need to downgrade binutils to 2.35 in any case.

Offline

#13 2021-03-08 18:23:51

dreieck
Member
Registered: 2012-10-08
Posts: 56

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

figue wrote:

Quick workaround for now:
you need to downgrade binutils to 2.35 in any case.

I made an AUR-package "binutils-2.35.2" for this purpose.

Last edited by dreieck (2021-03-08 18:25:31)

Offline

#14 2021-04-20 20:52:02

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Building virtualbox-host-dkms for custom kernel fails

This seems to be fixed in VirtualBox 6.1.20

Offline

Board footer

Powered by FluxBB