VirtualBox

Opened 8 years ago

Closed 8 years ago

#16298 closed defect (fixed)

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

Reported by: Andre Robatino Owned by:
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 (5)

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

Download all attachments as: .zip

Change History (24)

by Andre Robatino, 8 years ago

Attachment: vboxadd-install.log added

/var/log/vboxadd-install.log

by Andre Robatino, 8 years ago

Attachment: VBox.log added

comment:1 by Michael Thayer, 8 years ago

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 by Michael Thayer, 8 years ago

Summary: guest additions do not build with 4.10 kernelguest 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 by Andre Robatino, 8 years ago

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 by Andre Robatino, 8 years ago

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

by Andre Robatino, 8 years ago

Attachment: vboxadd-install.2.log added

/var/log/vboxadd-install.log

comment:5 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 5.1.12.

comment:6 by Andre Robatino, 8 years ago

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 by Andre Robatino, 8 years ago

Resolution: fixed
Status: closedreopened

by Andre Robatino, 8 years ago

Attachment: vboxadd-install.3.log added

/var/log/vboxadd-install.log

comment:8 by Andre Robatino, 8 years ago

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

comment:9 by Lieven Tytgat, 8 years ago

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

in reply to:  9 comment:10 by Frank Mehnert, 8 years ago

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 by Larry998, 8 years ago

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

by Larry998, 8 years ago

Attachment: 4.9_patches added

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

comment:12 by Larry998, 8 years ago

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 by Lieven Tytgat, 8 years ago

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 by sergiomb, 8 years ago

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 by Frank Mehnert, 8 years ago

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

in reply to:  15 comment:16 by sergiomb, 8 years ago

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 by Andre Robatino, 8 years ago

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 by Andre Robatino, 8 years ago

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 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in VBox 5.1.16.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette