VirtualBox

Ticket #18697 (closed defect: fixed)

Opened 3 months ago

Last modified 5 weeks ago

Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.10

Reported by: thehunmonkgroup Owned by:
Component: guest additions Version: VirtualBox 6.0.8
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Guest additions after 6.0.4 do not build correctly on Debian Jessie guests.

I've tried building 6.0.6, 6.0.8, and the latest test build, all fail.

I can build the 6.0.4 guest additions successfully in this environment.

Attaching log output from my last attempt to build on 6.0.8.

Attachments

guest-additions-6.0.8-build-error.log Download (13.3 KB) - added by thehunmonkgroup 3 months ago.
Log file for build failure of Guest Additions 6.0.8 on Debian Jessie guest

Change History

Changed 3 months ago by thehunmonkgroup

Log file for build failure of Guest Additions 6.0.8 on Debian Jessie guest

comment:1 Changed 2 months ago by paulson

The error message:

[...]  -o /tmp/vbox.0/.tmp_utils.o /tmp/vbox.0/utils.c
/tmp/vbox.0/utils.c: In function ‘vbsf_inode_setattr’:
/tmp/vbox.0/utils.c:808:5: error: implicit declaration of function ‘inode_change_ok’ [-Werror=implicit-function-declaration]
     rc = inode_change_ok(pInode, iattr);
     ^

shows that the function declaration of inode_change_ok() is not found when compiling utils.c. This function was removed in Linux kernel version 3.16.39 via the following changeset:

fs: Give dentry to inode_change_ok() instead of inode  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=50b070e8224f7bf86622ede1abee9fa3d3dc2f10

The inode_change_ok() function was replaced with setattr_prepare() which has a different function prototype in addition to a different name:

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 545837db9468..3b69a82bbdd9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2627,7 +2627,7 @@ extern int buffer_migrate_page(struct address_space *,
 #define buffer_migrate_page NULL
 #endif
 
-extern int inode_change_ok(const struct inode *, struct iattr *);
+extern int setattr_prepare(struct dentry *, struct iattr *);
 extern int inode_newsize_ok(const struct inode *, loff_t offset);
 extern void setattr_copy(struct inode *inode, const struct iattr *attr);
 

The VirtualBox Guest Additions code appears to only call inode_change_ok() in this one place (utils.c:vbsf_inode_setattr()) and there is an applicable #ifdef already in place:

https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/linux/sharedfolders/utils.c

809     #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
810         rc = setattr_prepare(dentry, iattr);
811     #else
812         rc = inode_change_ok(pInode, iattr);
813     #endif

It looks like the fix is probably to change line 809 to check for KERNEL_VERSION(3, 16, 39).

Note also that a google search will show that this changeset has caused breakage for other consumers of this exported interface such as OpenAFS, ZFS on Linux, Yocto, and others.

Last edited 2 months ago by paulson (previous) (diff)

comment:2 Changed 5 weeks ago by michael

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from Guest additions 6.0.6+ build error, Debian Jessie to Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.8 and 5.2.32

comment:3 Changed 5 weeks ago by paulson

  • Summary changed from Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.8 and 5.2.32 to Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.10
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use