VirtualBox

Opened 5 years ago

Closed 5 years ago

Last modified 13 months ago

#18697 closed defect (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (4)

by thehunmonkgroup, 5 years ago

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

comment:1 by paulson, 5 years ago

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 5 years ago by paulson (previous) (diff)

comment:2 by Michael Thayer, 5 years ago

Resolution: fixed
Status: newclosed
Summary: Guest additions 6.0.6+ build error, Debian JessieGuest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.8 and 5.2.32

comment:3 by paulson, 5 years ago

Summary: Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.8 and 5.2.32Guest additions 6.0.6+ build error, Debian Jessie -> fixed in 6.0.10
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