VirtualBox

Ticket #16298 (closed defect: fixed)

Opened 3 months ago

Last modified 3 weeks ago

guest additions do not build with 4.10 kernel -> fixed in 5.1.x and later releases after 19 Dec 2016

Reported by: robatino Owned by:
Priority: major Component: other
Version: VirtualBox 5.1.10 Keywords:
Cc: Guest type: Linux
Host type: other

Description

Got an error message while attempting to install guest additions in a Fedora Rawhide guest for the 4.10.0-0.rc0.git2.1.fc26.x86_64 kernel.

vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.

Attachments

vboxadd-install.log Download (231.9 KB) - added by robatino 3 months ago.
/var/log/vboxadd-install.log
VBox.log Download (121.2 KB) - added by robatino 3 months ago.
vboxadd-install.2.log Download (6.1 KB) - added by robatino 3 months ago.
/var/log/vboxadd-install.log
vboxadd-install.3.log Download (6.1 KB) - added by robatino 3 months ago.
/var/log/vboxadd-install.log
4.9_patches Download (3.3 KB) - added by Larry998 2 months ago.
Crude hack to allow VB to build on kernel 4.10-rc2 and later

Change History

Changed 3 months ago by robatino

/var/log/vboxadd-install.log

Changed 3 months ago by robatino

comment:1 Changed 3 months ago by michael

This should fix it. Will commit later. See this kernel commit:

 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=683aa14

Index: src/VBox/Additions/linux/drm/vbox_fb.c
===================================================================
--- src/VBox/Additions/linux/drm/vbox_fb.c	(revision 112216)
+++ src/VBox/Additions/linux/drm/vbox_fb.c	(working copy)
@@ -216,7 +216,6 @@
                    struct drm_gem_object **gobj_p)
 {
     struct drm_device *dev = fbdev->helper.dev;
-    u32 bpp, depth;
     u32 size;
     struct drm_gem_object *gobj;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
@@ -226,7 +225,6 @@
 #endif
 
     int ret = 0;
-    drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp);
 
     size = pitch * mode_cmd->height;
     ret = vbox_gem_create(dev, size, true, &gobj);

comment:2 Changed 3 months ago by michael

  • Summary changed from guest additions do not build with 4.10 kernel to guest additions do not build with 4.10 kernel -> fixed in 5.1.x and later releases after 19 Dec 2016

The fix should be available in 5.1 and higher Guest Additions builds<1> as of revision 112422.

  1. https://www.virtualbox.org/wiki/Testbuilds

comment:3 Changed 3 months ago by robatino

Thanks. I want to test the 112428 GA, but unfortunately neither of my installed 4.10 kernels are bootable. I can boot into a 4.9 kernel. Is it possible to boot into one kernel and install the Guest Additions for another? (This used to be possible via a "dkms install" command, when the GA used DKMS.)

comment:4 Changed 3 months ago by robatino

Installed the 112428 Guest additions, then installed the newest 4.10 kernel. The GA build still fails. Attaching vboxadd-install.log.

Changed 3 months ago by robatino

/var/log/vboxadd-install.log

comment:5 Changed 3 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.1.12.

comment:6 Changed 3 months ago by robatino

Still broken with 5.1.12, after installing the new GA, restarting the guest, and installing a new 4.10 kernel. Attaching vboxadd-install.log.

comment:7 Changed 3 months ago by robatino

  • Status changed from closed to reopened
  • Resolution fixed deleted

Changed 3 months ago by robatino

/var/log/vboxadd-install.log

comment:8 Changed 3 months ago by robatino

Also please update the Version to "VirtualBox 5.1.12", since I don't have permission. Thanks.

comment:9 follow-up: ↓ 10 Changed 3 months ago by Lieven Tytgat

Dear

The compile error refers to kernel.h from the linux kernel. The following changes to kernel.h introduced the compile error.

 https://github.com/torvalds/linux/commit/4d98ead183a2be77bfea425d5243e32629eaaeb1

It seems the vars 'true' and 'false' in the taint_flag struct are overwritten by the macro defined in vboxdrv/include/iprt/types.h lines 264 - 270

Not so well picked var names in kernel.h I would assume...

comment:10 in reply to: ↑ 9 Changed 3 months ago by frank

Replying to Lieven Tytgat:

Not so well picked var names in kernel.h I would assume...

Exactly. I hope that  this patch gets merged into the vanilla kernel before 4.10 is released.

comment:11 Changed 2 months ago by Larry998

That patch changing those badly chosen names has been accepted, but it is not yet merged into mainline. Be aware that that change is not sufficient for VB to build under kernel 4.10-rc2 and later as register_cpu_notifier() and unregister_cpu_notifier() are removed. Code must now use the hotplug state machine to register cpu on- and off-line events. This change is not trivial, and I have not yet come up with a fix. Larry

Changed 2 months ago by Larry998

Crude hack to allow VB to build on kernel 4.10-rc2 and later

comment:12 Changed 2 months ago by Larry998

The attachment posted above will allow a successful build once my patch to fix the "true" and "false" redefinition problem has been applied.

comment:13 Changed 2 months ago by Lieven Tytgat

Linux 4.10-rc5 will rename the true and false chars in c_true and c_false, fixing this issue. Commit:  https://github.com/torvalds/linux/commit/5eb7c0d04f04a667c049fe090a95494a8de2955c

comment:14 Changed 2 months ago by sergiomb

I think we have new compile error with Linux 4.10-rc5.git1.1.fc26.x86_64 I made this fix:  https://github.com/rpmfusion/VirtualBox-kmod/blob/master/kernel-4.10.0-0.rc5.lnkops.patch

seems to me trivial when we read  https://patchwork.kernel.org/patch/9327855/

comment:15 follow-up: ↓ 16 Changed 2 months ago by frank

I think the correct patch is in r65409 and this change is part of the most recent 5.1 Guest Additions which can be found here (5.1 Guest Additions .iso image).

comment:16 in reply to: ↑ 15 Changed 2 months ago by sergiomb

Replying to frank:

I think the correct patch is in r65409 and this change is part of the most recent 5.1 Guest Additions which can be found here (5.1 Guest Additions .iso image).

Thanks

comment:17 Changed 7 weeks ago by robatino

Confirming that guest additions build for kernel-4.10.0-0.rc7.git0.1.fc26.x86_64 when using VB 5.1.14 and VBoxGuestAdditions_5.1.15-113104.iso.

comment:18 Changed 5 weeks ago by robatino

Filed https://www.virtualbox.org/ticket/16506 for guest additions not building with the 4.11 kernel (while using the latest VBoxGuestAdditions_5.1.15-113518.iso guest additions).

comment:19 Changed 3 weeks ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in VBox 5.1.16.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use