Skip to content

[Bug]: Linux Guest Additions 7.2.16 fail to build vboxguest on RHEL 9.8 kernel 5.14.0-687.5.3.el9_8 — implicit declaration of function kernel_file_open #830

Description

@spitkogit

Version

7.2.16

Host OS Type

Linux

Host OS name + version

AlmaLinux 9 kernel 5.14.0-611-49.2.el9_7.x86_64

Host Architecture

x86

Guest OS Type

Linux

Guest Architecture

x86

Guest OS name + version

AlmaLinux 9 kernel 5.14.0-687.5.3.el9_8.x86_64

Component

Guest Additions/Installer

What happened?

Unpatched AlmaLinux 9.8 (kernel 5.14.0-687.5.3.el9_8.x86_64) fails to compile VirtualBox guest additions:

In file included from /tmp/vbox.0/combined-os-specific.c:43:
/tmp/vbox.0/r0drv/linux/fileio-r0drv-linux.c: In function ‘VBoxGuest_RTFileOpen’:
/tmp/vbox.0/r0drv/linux/fileio-r0drv-linux.c:160:30: error: implicit declaration of function ‘kernel_file_open’; did you mean ‘generic_file_open’? [-Werror=implicit-function-declaration]
160 | struct file *pFile = kernel_file_open(&Path, fOpenMode, d_inode(Path.dentry), current_cred());
| ^~~~~~~~~~~~~~~~
| generic_file_open
/tmp/vbox.0/r0drv/linux/fileio-r0drv-linux.c:160:30: warning: initialization of ‘struct file *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:250: /tmp/vbox.0/combined-os-specific.o] Error 1

Similar as #732, but with a different error message due to older kernel.

vboxadd-setup.log

How can we reproduce this?

  1. Create AlmaLinux 9.8 guest VM from offline 9.8 ISO to VirtualBox 7.2.16
  2. Ensure kernel-devel matching running kernel is installed
  3. Mount Guest Additions CD 7.2.16
  4. Run: sudo sh ./VBoxLinuxAdditions.run
  5. Check /var/log/vboxadd-setup.log — vboxguest build fails

Did you upload all of your necessary log files, screenshots, etc.?

  • Yes, I've uploaded all pertinent files to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions