Vboxhost — DKMS build fails on 5.10

I’ve just installed the latest linux510 (via mhwd-kernel).
During the post-install configuration, there is an error building the virtualbox host modules:

(2/2) Install DKMS modules
==> dkms install --no-depmod -m vboxhost -v 6.1.16_OSE -k 4.19.163-1-MANJARO
==> dkms install --no-depmod -m vboxhost -v 6.1.16_OSE -k 5.4.85-1-MANJARO
==> dkms install --no-depmod -m vboxhost -v 6.1.16_OSE -k 5.10.2-2-MANJARO
Error! Bad return status for module build on kernel: 5.10.2-2-MANJARO (x86_64)
Consult /var/lib/dkms/vboxhost/6.1.16_OSE/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m vboxhost -v 6.1.16_OSE -k 5.10.2-2-MANJARO' returned 10

From examining the log file mentioned, I see that there is what appears to be a missing function header:

/var/lib/dkms/vboxhost/6.1.16_OSE/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:560:34: error: implicit declaration of function ‘alloc_vm_area’ [-Werror=implicit-function-declaration]
  560 |                 pMemLnx->pArea = alloc_vm_area(pMemLnx->Core.cb, papPtes); /* Note! pArea->nr_pages is not set. */
      |                                  ^~~~~~~~~~~~~

Is there a headers package that should be (re)installed, or is this an error that will need to be fixed for the next update?

Normally, mhwd-kernel should also install the headers etc. if you used headers with the existing, old kernel, but better double-check by

sudo pacman -Syu --needed dkms linux510-headers linux510-extramodules linux510-virtualbox-host-modules

What is wrong with the Manjaro provided kernel module for it?

That added some assorted and not (apparently) relevant modules via extramodules, but had no effect on the result.

That is installed, but the kernel installs always run a dkms install that builds virtualbox-host-dkms modules – is that an obsolete or redundant approach?

DKMS is required when there are no modules provided and need to be build.

I guess it’s one of those things that had been hanging around for aeons (or at least since this machine was initially set up with Manjaro which was probably late 2012 or early 2013).

I met this problem using DKMS on stable too and solved it by installing virtualbox-host-dkms version 6.1.16-4 from testing repository.

1 Like

Yep, that solution worked for me. Here is what I did:

pacman-mirrors --api --set-branch testing
pacman-mirrors --fasttrack 5

you should then see the correct version in pacman -S virtualbox-host-dkms

The dkms install did not fail but unfortunately I was not able to load the module. However I just installed virtualbox-bin from AUR, which worked.

Faced similar issue. I’m using custom surface 5.10 kernel (it’s possible to use it with additional repo: Update Arch packages to make it Manjaro compatible by a-andreyev · Pull Request #343 · linux-surface/linux-surface · GitHub))

For the package community/virtualbox-host-dkms 6.1.16-3 error was something like:

... vboxhost/6.1.16_OSE memobj-r0drv-linux.c:560:34 ... error: implicit declaration of function ‘alloc_vm_area’

Downloaded manually virtualbox-host-dkms 6.1.16-4 and installed locally. It worked, virtualbox module loaded, virtual machines are working.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.