VirtualBox

Ticket #20488 (closed defect: fixed)

Opened 3 months ago

Last modified 2 weeks ago

Guest Additions do not build on CentOS Stream kernel-4.18.0-326.el8.x86_64 => fixed in SVN

Reported by: linuxuser Owned by:
Component: guest additions Version: VirtualBox 6.1.26
Keywords: CentOS Stream Guest Additions Cc:
Guest type: Linux Host type: all

Description

Guest Additions are not building for the latest CentOS Stream kernel.

In file included from /tmp/vbox.0/combined-os-specific.c:30:
/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
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:316: /tmp/vbox.0/combined-os-specific.o] Error 1
make[2]: *** Waiting for unfinished jobs....
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/tmp/vbox.0/.tmp_combined-agnostic.o";
make[1]: *** [Makefile:1571: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxguest] Error 2

Attachments

vboxadd-setup.log.4 Download (14.0 KB) - added by linuxuser 3 months ago.
Build Log

Change History

Changed 3 months ago by linuxuser

Build Log

comment:1 Changed 3 months ago by DustWolf

user willnix1155 posted this patch in the forums:

------
--- /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.
------

comment:2 Changed 3 months ago by galitsyn

Hi DustWolf,

This patch will only work for CentOS kernel. It will break build for some others though. We are currently working on a solution and will post a test build here once it is ready.

comment:3 Changed 3 months ago by davidallen

Exactly the same problem for me, and I am running VBox (Version 6.1.24 r145767 (Qt5.6.2)) on Windows 10 Host for CentOS8 guest (with same kernel version 4.18.0-326).

comment:4 follow-up: ↓ 10 Changed 3 months ago by galitsyn

Hi Guys,

Could you please give it a try to the following test builds:

comment:5 Changed 3 months ago by galitsyn

  • Status changed from new to awaitsfeedback

comment:6 Changed 3 months ago by linuxuser

For me VBoxGuestAdditions_6.1.27-146191.iso fixed the build problem on kernel-4.18.0-326.el8.x86_64. The guest additions also work with VirtualBox 6.1.26 release version as the host side (both on a Windows and a Linux host).

I am not sure if this is a VirtualBox issue, or some weirdness at my end (although if the latter I have it on two CentOS VMs) but initramfs images ended up being built for kernels I no longer have installed (ie ordinary system upgrades rolled them off the system). On one of my VMs this pushed the /boot partition to almost 100%.

I didn't test VirtualBox-6.1.27-146191-Linux_amd64.run yet.

comment:7 Changed 3 months ago by galitsyn

  • Status changed from awaitsfeedback to closed
  • Resolution set to fixed
  • Summary changed from Guest Additions do not build on CentOS Stream kernel-4.18.0-326.el8.x86_64 to Guest Additions do not build on CentOS Stream kernel-4.18.0-326.el8.x86_64 => fixed in SVN

Thanks for checking. We will include the fix into the next release.

Regarding to the second issue, I do not think it is related to VBox. Please consider either purge unused kernel packages or cleanup /boot directory manually.

comment:8 Changed 3 months ago by andy_pagin

The fix also worked for me.

comment:9 Changed 2 months ago by gordonplay

https://www.virtualbox.org/ticket/20488#comment:4

The fix also worked for me.

Thanks

comment:10 in reply to: ↑ 4 Changed 3 weeks ago by VirtualEvan

Replying to galitsyn:

Hi Guys,

Could you please give it a try to the following test builds:

Hello @galitsyn

The links seem to be broken now. As v6.1.27 is not available for download yet could you please update them or indicate a new location from which we can download these files?

Thanks

comment:11 Changed 3 weeks ago by galitsyn

Hi VirtualEvan,

Please feel free to pick up one of the Latest 6.1.x test builds from https://www.virtualbox.org/wiki/Testbuilds.

comment:12 Changed 3 weeks ago by VirtualEvan

Hi galitsyn,

That worked flawlessly. Thank you!

comment:13 Changed 2 weeks ago by sergiomb

instead

RTLNX_VER_MAX(4,17,0)

should be

|| RTLNX_RHEL_MIN(8,4)

( I have to check if it is 8.4 or 8.5 or other number )

Last edited 2 weeks ago by sergiomb (previous) (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use