CentOS 8 Stream - vboxdrv wont build
CentOS 8 Stream - vboxdrv wont build
I have a machine which has been updated from CentOS 8 to CentOS 8 Stream, I have installed the latest VirtualBox (6.1.26). But I get an error when building the kernelmodule.
/sbin/vboxconfig fails building the file alloc-r0drv-linux.c saying:
error: implicit declaration of function 'map_vm_area'; did you mean 'get_vm_area'
From what I have seen googling the problem it is related to kernel versions 5.8+.
CentOS 8 Stream is runnign 4.18.0-326 (with a lot of backports I guess...)
Any ideas how to solve the problem?
/sbin/vboxconfig fails building the file alloc-r0drv-linux.c saying:
error: implicit declaration of function 'map_vm_area'; did you mean 'get_vm_area'
From what I have seen googling the problem it is related to kernel versions 5.8+.
CentOS 8 Stream is runnign 4.18.0-326 (with a lot of backports I guess...)
Any ideas how to solve the problem?
Re: CentOS 8 Stream - vboxdrv wont build
I have the same issue.
Guest Additions build failed on kernel-4.18.0-326.el8.x86_64
It builds OK on previous kernel 4.18.0-315.el8.x86_64
Guest Additions build failed on kernel-4.18.0-326.el8.x86_64
It builds OK on previous kernel 4.18.0-315.el8.x86_64
Re: CentOS 8 Stream - vboxdrv wont build
I confirm the same problem is in my case.
the same version of OS, kernel and VBox
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtR0MemAllocExecVmArea’:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:204:14: error: implicit declaration of function ‘map_vm_area’; did you mean ‘get_vm_area’? [-Werror=implicit-function-declaration]
if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
^~~~~~~~~~~
get_vm_area
./tools/objtool/objtool orc generate --module --no-fp --retpoline "/tmp/vbox.0/r0drv/linux/.tmp_assert-r0drv-linux.o";
gcc -Wp,-MD,/tmp/vbox.0/r0drv/linux/.mpnotification-r0drv-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include/drm-backport -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -DCONFIG_TPAUSE=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-omit-frame-pointer -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV -DIPRT_WITHOUT_EFLAGS_AC_PRESERVING -DVBOX_WITH_64_BITS_GUESTS -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DMODULE -DKBUILD_BASENAME='"mpnotification_r0drv_linux"' -DKBUILD_MODNAME='"vboxdrv"' -c -o /tmp/vbox.0/r0drv/linux/.tmp_mpnotification-r0drv-linux.o /tmp/vbox.0/r0drv/linux/mpnotification-r0drv-linux.c
cc1: some warnings being treated as errors
./tools/objtool/objtool orc generate --module --no-fp --retpoline "/tmp/vbox.0/r0drv/linux/.tmp_initterm-r0drv-linux.o";
make[2]: *** [scripts/Makefile.build:316: /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Error 1
the same version of OS, kernel and VBox
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtR0MemAllocExecVmArea’:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:204:14: error: implicit declaration of function ‘map_vm_area’; did you mean ‘get_vm_area’? [-Werror=implicit-function-declaration]
if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
^~~~~~~~~~~
get_vm_area
./tools/objtool/objtool orc generate --module --no-fp --retpoline "/tmp/vbox.0/r0drv/linux/.tmp_assert-r0drv-linux.o";
gcc -Wp,-MD,/tmp/vbox.0/r0drv/linux/.mpnotification-r0drv-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include/drm-backport -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -DCONFIG_TPAUSE=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-omit-frame-pointer -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV -DIPRT_WITHOUT_EFLAGS_AC_PRESERVING -DVBOX_WITH_64_BITS_GUESTS -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DMODULE -DKBUILD_BASENAME='"mpnotification_r0drv_linux"' -DKBUILD_MODNAME='"vboxdrv"' -c -o /tmp/vbox.0/r0drv/linux/.tmp_mpnotification-r0drv-linux.o /tmp/vbox.0/r0drv/linux/mpnotification-r0drv-linux.c
cc1: some warnings being treated as errors
./tools/objtool/objtool orc generate --module --no-fp --retpoline "/tmp/vbox.0/r0drv/linux/.tmp_initterm-r0drv-linux.o";
make[2]: *** [scripts/Makefile.build:316: /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Error 1
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: CentOS 8 Stream - vboxdrv wont build
Could you all please try a roll-back to 6.1.24 or 6.1.22? Maybe a bug creeped in.
Re: CentOS 8 Stream - vboxdrv wont build
it's rather tricky
I uninstalled 6.1.26 but was not able to install 6.1.24
sudo dnf install VirtualBox-6.1-6.1.24_145767_el6-1.x86_64.rpm
Error:
Problem: conflicting requests
- nothing provides python(abi) = 2.6 needed by VirtualBox-6.1-6.1.24_145767_el6-1.x86_64
- nothing provides libpython2.6.so.1.0()(64bit) needed by VirtualBox-6.1-6.1.24_145767_el6-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I uninstalled 6.1.26 but was not able to install 6.1.24
sudo dnf install VirtualBox-6.1-6.1.24_145767_el6-1.x86_64.rpm
Error:
Problem: conflicting requests
- nothing provides python(abi) = 2.6 needed by VirtualBox-6.1-6.1.24_145767_el6-1.x86_64
- nothing provides libpython2.6.so.1.0()(64bit) needed by VirtualBox-6.1-6.1.24_145767_el6-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Re: CentOS 8 Stream - vboxdrv wont build
I think its related to a backported 5.x feature in the CentOS kernel..
-
- Posts: 1
- Joined: 1. Aug 2021, 16:46
Re: CentOS 8 Stream - vboxdrv wont build
It seems so... The following dirty workaround makes vbox working again on CentOS Stream:
------
--- /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c.orig 2021-08-01 16:28:12.124816773 +0200
+++ /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c 2021-08-01 16:28:51.783892753 +0200
@@ -38,7 +38,7 @@
#if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
-# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
+# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(4,17,0)
/**
* Starting with 2.6.23 we can use __get_vm_area and map_vm_area to allocate
* memory in the moduel range. This is preferrable to the exec heap below.
------
------
--- /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c.orig 2021-08-01 16:28:12.124816773 +0200
+++ /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c 2021-08-01 16:28:51.783892753 +0200
@@ -38,7 +38,7 @@
#if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
-# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
+# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(4,17,0)
/**
* Starting with 2.6.23 we can use __get_vm_area and map_vm_area to allocate
* memory in the moduel range. This is preferrable to the exec heap below.
------
Re: CentOS 8 Stream - vboxdrv wont build
It works.
Thanks a lot
Thanks a lot
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: CentOS 8 Stream - vboxdrv wont build
Thanks for trying the downgrade. The devs may need to know about this backport. Please post this problem and the solution you found on the Bugtracker, so the devs can be made aware of it.
Thanks for the solution!
Thanks for the solution!
Re: CentOS 8 Stream - vboxdrv wont build
dowgrading to 6.1.20 wont help solve the issue
-
- Posts: 1
- Joined: 4. Aug 2021, 23:24
Re: CentOS 8 Stream - vboxdrv wont build
I struggled with this for some time, but was able to get VirtualBox to work by booting into an older kernel (4.18.0-240.el8.x86_64) and installing VirtualBox from the virtualbox repository.
Interestingly, I also have to use this kernel to run VMWare's vmplayer. It doesn't work with the newer kernels.
Interestingly, I also have to use this kernel to run VMWare's vmplayer. It doesn't work with the newer kernels.
-
- Posts: 4
- Joined: 29. Dec 2011, 17:05
- Primary OS: Ubuntu other
- VBox Version: OSE Debian
- Guest OSses: Windows XP, Windows 7
Re: CentOS 8 Stream - vboxdrv wont build
Here is a direct link to the bug:
https://www.virtualbox.org/ticket/20488
I'll try to fill in some relevant info.
https://www.virtualbox.org/ticket/20488
I'll try to fill in some relevant info.
Re: CentOS 8 Stream - vboxdrv wont build
also version 4.18.0-315.el8.x86_64 of kernel worksEthan Brown wrote:I struggled with this for some time, but was able to get VirtualBox to work by booting into an older kernel (4.18.0-240.el8.x86_64) and installing VirtualBox from the virtualbox repository.
Interestingly, I also have to use this kernel to run VMWare's vmplayer. It doesn't work with the newer kernels.
Re: CentOS 8 Stream - vboxdrv wont build
the post by willnix1155 » 1. Aug 2021, 16:59 seems to work for me, so far... Thanks
I edited the file /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linuxalloc-r0drv-linux.c and changed the line 41
from # if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
to # if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(4,17,0)
then run # /sbin/vboxconfig
Though all my host adapters that was setup previously was gone. I had to set that up again.
I edited the file /usr/share/virtualbox/src/vboxhost/vboxdrv/r0drv/linuxalloc-r0drv-linux.c and changed the line 41
from # if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
to # if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(4,17,0)
then run # /sbin/vboxconfig
Though all my host adapters that was setup previously was gone. I had to set that up again.
-
- Volunteer
- Posts: 5690
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: CentOS 8 Stream - vboxdrv wont build
@all: Please try the test builds offered in 20488#comment:4 and report back.