You are not logged in.

#1 2019-03-06 10:26:23

magiusche
Member
Registered: 2008-12-05
Posts: 37

[SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

Hi guys, and first of all sorry for my poor english.

I'll go straight to the problem.
I've a Windows 10 host in witch i've installed VirtualBox 6.0 with Archlinux . And it works perfectly included the shared forlder.
One day ago i've upgraded the virtualbox to 6.0.4 and oviously "yaourt -Syu --aur" too :-) in the guest Archlinux

From that updarte i can't enymore access to che shared forlder from Arch.

What i've done:
1) install community/virtualbox-guest-dkms 6.0.4-4, community/virtualbox-guest-iso 6.0.4-1, community/virtualbox-guest-utils-nox 6.0.4-4, community/virtualbox-host-dkms 6.0.4-4
2)

sudo mount -o loop /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso /mnt/iso/

3)

sudo /mnt/iso/VBoxLinuxAdditions.run

but this report an error

Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.4 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.4 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: Building the modules for kernel 5.0.0-arch1-1-ARCH.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the modules for kernel 5.0.0-arch1-1-ARCH.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong

Log file... /var/log/vboxadd-setup.log

Building the main Guest Additions module for kernel 5.0.0-arch1-1-ARCH.
Building the shared folder support module.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/5.0.0-arch1-1-ARCH/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
Makefile:189: ================= WARNING ================
Makefile:190: 'SUBDIRS' will be removed after Linux 5.3
Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:192: ==========================================
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/.vfsmod.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie -I/lib/modules/5.0.0-arch1-1-ARCH/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxsf/ -I/tmp/vbox.0/vboxsf/include -I/tmp/vbox.0/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -DKBUILD_BASENAME='"vfsmod"' -DKBUILD_MODNAME='"vboxsf"' -c -o /tmp/vbox.0/vfsmod.o /tmp/vbox.0/vfsmod.c
/tmp/vbox.0/vfsmod.c: In function ‘sf_read_super_aux’:
/tmp/vbox.0/vfsmod.c:235:14: error: ‘MS_REMOUNT’ undeclared (first use in this function); did you mean ‘DT_RELCOUNT’?
  if (flags & MS_REMOUNT) {
              ^~~~~~~~~~
              DT_RELCOUNT
/tmp/vbox.0/vfsmod.c:235:14: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:277: /tmp/vbox.0/vfsmod.o] Error 1
make[1]: *** [Makefile:1553: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile.include.footer:106: vboxsf] Error 2
Could not find the X.Org or XFree86 Window System, skipping.

Any help or suggestion is appreciated!

Thx in advance.

Last edited by magiusche (2019-03-18 08:42:17)


Hope i help you!
and
VICE.VERSA

Offline

#2 2019-03-18 01:06:08

SajeOne
Member
Registered: 2015-12-20
Posts: 2

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

I don't have a solution but I have the same issue.

Offline

#3 2019-03-18 08:41:51

magiusche
Member
Registered: 2008-12-05
Posts: 37

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

I've solved by uninstall all virtualbox packages and reinstall them.

Last edited by magiusche (2019-03-18 08:42:37)


Hope i help you!
and
VICE.VERSA

Offline

#4 2019-03-19 18:27:54

artynet
Member
Registered: 2019-03-19
Posts: 3

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

Hello folks,

I have solved the issue for the shared folders with this simple patch :

--- /opt/VBoxGuestAdditions-6.0.4/src/vboxguest-6.0.4/vboxsf/vfsmod.c	2019-03-19 16:24:00.759229219 +0100
+++ /opt/VBoxGuestAdditions-6.0.4/src/vboxguest-6.0.4/vboxsf/vfsmod.c	2019-03-19 16:27:29.967294113 +0100
@@ -40,9 +40,13 @@
 #include "revision-generated.h"
 #include "product-generated.h"
 #include "VBoxGuestR0LibInternal.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+# include <uapi/linux/mount.h> /* for MS_REMOUNT */
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
 # include <linux/mount.h>
 #endif
+
 #include <linux/seq_file.h>
 
 MODULE_DESCRIPTION(VBOX_PRODUCT " VFS Module for Host File System Access");

by taking a look at the virtualbox trunk code. Instead, for the vboxvideo driver I have imported all the source code from the official kernel 5.0.2 vanilla tarball :

https://git.kernel.org/pub/scm/linux/ke … o?h=v5.0.2

and replaced its Makefile with the ones from the VBoxGuestAdditions release, in the very specific :

  • Makefile

  • Makefile.include.header

  • Makefile.include.footer

Last edited by artynet (2019-03-19 18:37:54)

Offline

#5 2019-03-19 18:43:05

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

@artynet this thread has already been marked solved.  Also the arch packages do not use vboxsf from guest additions [1] so do not need that patch.
[1] https://git.archlinux.org/svntogit/comm … ee1eca#n59

Online

#6 2019-03-19 18:49:58

artynet
Member
Registered: 2019-03-19
Posts: 3

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

Hello @loqs,

sorry but I beg to differ. I installed the virtualbox GUEST packages from the repository but the shared folder module is not starting as it should since dmesg returns errors about some  missing symbols. The video module seems not working as well since I can't properly resize the screen.

Please double check..

Offline

#7 2019-03-19 19:07:08

loqs
Member
Registered: 2014-03-06
Posts: 17,323

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

$ git clone git://git.archlinux.org/svntogit/community.git --single-branch --branch "packages/virtualbox-modules-arch"
Cloning into 'community'...
remote: Enumerating objects: 2408, done.
remote: Counting objects: 100% (2408/2408), done.
remote: Compressing objects: 100% (1678/1678), done.
remote: Total 2408 (delta 663), reused 2118 (delta 479)
Receiving objects: 100% (2408/2408), 263.11 KiB | 1.37 MiB/s, done.
Resolving deltas: 100% (663/663), done.
$ cd community/repos/community-x86_64/
# extra-x86_64-build 
:: Synchronizing package databases...
 core is up to date
 extra                   1697.0 KiB  6.42M/s 00:00 [######################] 100%
 community                  4.8 MiB  11.6M/s 00:00 [######################] 100%
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [testuser]...done
==> Making package: virtualbox-modules-arch 6.0.4-14 (Tue Mar 19 19:00:27 2019)
==> Retrieving sources...
==> Making package: virtualbox-modules-arch 6.0.4-14 (Tue 19 Mar 2019 07:00:28 PM UTC)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (4) linux-firmware-20190313.efd2c1c-1  mkinitcpio-25-1
             mkinitcpio-busybox-1.30.1-1  linux-5.0.2.arch1-1

Total Download Size:   147.90 MiB
Total Installed Size:  507.04 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 linux-firmware-2019...    77.3 MiB  12.0M/s 00:06 [######################] 100%
 linux-5.0.2.arch1-1...    70.7 MiB  7.75M/s 00:09 [######################] 100%
(4/4) checking keys in keyring                     [######################] 100%
(4/4) checking package integrity                   [######################] 100%
(4/4) loading package files                        [######################] 100%
(4/4) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/4) installing linux-firmware                    [######################] 100%
(2/4) installing mkinitcpio-busybox                [######################] 100%
(3/4) installing mkinitcpio                        [######################] 100%
Optional dependencies for mkinitcpio
    xz: Use lzma or xz compression for the initramfs image [installed]
    bzip2: Use bzip2 compression for the initramfs image [installed]
    lzop: Use lzo compression for the initramfs image
    lz4: Use lz4 compression for the initramfs image [installed]
    mkinitcpio-nfs-utils: Support for root filesystem on NFS
(4/4) installing linux                             [######################] 100%
Optional dependencies for linux
    crda: to set the correct wireless channels of your country
:: Running post-transaction hooks...
(1/5) Updating linux module dependencies...
(2/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.0.2-arch1-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.0.2-arch1-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: aic94xx
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(3/5) Reloading system manager configuration...
  Skipped: Current root is not booted.
(4/5) Creating temporary files...
Failed to open file "/sys/devices/system/cpu/microcode/reload": Read-only file system
error: command failed to execute correctly
(5/5) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (4) dkms-2.5-4  linux-headers-5.0.2.arch1-1
             virtualbox-guest-dkms-6.0.4-4  virtualbox-host-dkms-6.0.4-4

Total Download Size:    18.29 MiB
Total Installed Size:  117.04 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 linux-headers-5.0.2...    17.0 MiB  9.59M/s 00:02 [######################] 100%
 dkms-2.5-4-any            50.9 KiB  16.6M/s 00:00 [######################] 100%
 virtualbox-host-dkm...   680.4 KiB  3.46M/s 00:00 [######################] 100%
 virtualbox-guest-dk...   616.8 KiB  5.28M/s 00:00 [######################] 100%
(4/4) checking keys in keyring                     [######################] 100%
(4/4) checking package integrity                   [######################] 100%
(4/4) loading package files                        [######################] 100%
(4/4) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/4) installing linux-headers                     [######################] 100%
(2/4) installing dkms                              [######################] 100%
Optional dependencies for dkms
    linux-headers: build modules against the Arch kernel [installed]
    linux-lts-headers: build modules against the LTS kernel
    linux-zen-headers: build modules against the ZEN kernel
    linux-hardened-headers: build modules against the HARDENED kernel
(3/4) installing virtualbox-host-dkms              [######################] 100%
Optional dependencies for virtualbox-host-dkms
    linux-headers: build modules against Arch kernel [installed]
    linux-lts-headers: build modules against LTS kernel
    linux-zen-headers: build modules against ZEN kernel
(4/4) installing virtualbox-guest-dkms             [######################] 100%
Optional dependencies for virtualbox-guest-dkms
    linux-headers: build modules against Arch kernel [installed]
    linux-lts-headers: build modules against LTS kernel
    linux-zen-headers: build modules against ZEN kernel
:: Running post-transaction hooks...
(1/3) Updating linux module dependencies...
(2/3) Install DKMS modules
==> dkms install vboxsf/6.0.4_OSE -k 5.0.2-arch1-1-ARCH
==> dkms install vboxhost/6.0.4_OSE -k 5.0.2-arch1-1-ARCH
(3/3) Arming ConditionNeedsUpdate...
==> Retrieving sources...
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package_virtualbox-host-modules-arch()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "virtualbox-host-modules-arch"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Starting package_virtualbox-guest-modules-arch()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "virtualbox-guest-modules-arch"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: virtualbox-modules-arch 6.0.4-14 (Tue 19 Mar 2019 07:01:44 PM UTC)

If you have issues with missing symbols please start your won thread do not hijack someone elses thread that has no mention of missing symbols and is marked solved.
Edit:

pacman -Fo /opt/
opt/ is owned by core/filesystem 2018.12-2
opt/ is owned by extra/bullet 2.88-1
opt/ is owned by extra/postgresql-old-upgrade 10.6-1
opt/ is owned by community/9base 6-6
opt/ is owned by community/aspnet-runtime 2.2.3+105-1
opt/ is owned by community/bazel 0.22.0-1
opt/ is owned by community/cuda 10.0.130-2
opt/ is owned by community/dart 2.2-1
opt/ is owned by community/dietlibc 0.34-1
opt/ is owned by community/dotnet-host 2.2.3+105-1
opt/ is owned by community/dotnet-runtime 2.2.3+105-1
opt/ is owned by community/dotnet-sdk 2.2.3+105-1
opt/ is owned by community/dwarffortress 0.44.12-1
opt/ is owned by community/frogatto 1.3.1-28
opt/ is owned by community/frogatto-data 1.3.1-3
opt/ is owned by community/jruby 9.2.6.0-1
opt/ is owned by community/jython 2.7.1-2
opt/ is owned by community/maven 3.6.0-1
opt/ is owned by community/metasploit 5.0.9-1
opt/ is owned by community/mygui 3.2.2-14
opt/ is owned by community/ppsspp 1.7.4-1
opt/ is owned by community/ppsspp-headless 1.7.4-1
opt/ is owned by community/ppsspp-qt 1.7.4-1
opt/ is owned by community/puppet 6.3.0-1
opt/ is owned by community/puppet5 5.5.10-1
opt/ is owned by community/pypy 7.0.0-1
opt/ is owned by community/pypy3 7.0.0-1
opt/ is owned by community/ruby2.5 2.5.5-1
opt/ is owned by community/ruby2.5-bundler 1.17.1-1
opt/ is owned by community/sauerbraten 2013_02_03_collect_edition-6
opt/ is owned by community/sauerbraten-data 2013_02_03_collect_edition-3
opt/ is owned by community/sqlmap 1.3.2-1
opt/ is owned by community/teamspeak3 3.2.3-2
opt/ is owned by community/tuxpaint-config 0.0.14-1
opt/ is owned by community/uwsgi-plugin-pypy 2.0.18-1
opt/ is owned by community/vagrant 2.2.4-1
opt/ is owned by community/warsow 2.1.2-1
opt/ is owned by community/wpscan 1:3.4.4-1

Note no virtualbox package is listed as using /opt/ but that is where the file you are patching exists.
If you check /usr/src/vboxsf-6.0.4_OSE/vboxsf/ compare the contents to the github link I provided then compare it to the contents of
/opt/VBoxGuestAdditions-6.0.4/src/vboxguest-6.0.4/vboxsf note vfsmod.c is only present in /opt/VBoxGuestAdditions-6.0.4/src/vboxguest-6.0.4/vboxsf

Last edited by loqs (2019-03-19 19:24:20)

Online

#8 2019-03-19 19:35:49

artynet
Member
Registered: 2019-03-19
Posts: 3

Re: [SOLVED] VirtualBox Guest Additions 6.0.4 Unable to build Kernel mods

Oh I see,

I usually don't rely on binary packages inside a repository for the Virtualbox guest additions. I always build them from scratch to have fully control over them. I just wanted to give an helping hand contribution to the topic.

Thanks for the pointers, I'll keep them in mind.

Kind Regards

     Arturo

Last edited by artynet (2019-03-19 19:36:01)

Offline

Board footer

Powered by FluxBB