Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] VBox Guest Additions Installation Errors  (Read 300 times)

Offline onepiece

  • User
  • Posts: 7
[EN] VBox Guest Additions Installation Errors
« on: 2025/01/02, 05:13:15 »
Hoping the community can help me get VBox Guest Additions installed without an error.

Tried to install VBox Guest addtions in the normal way (see below).  Got some errors but because of my limited knowledge of Linux, not exactly sure next steps from here.  Forum and web search showed similar issues but just couldn't apply the solutions to my situation.  I'm aware I'm using VBox Version 6 and not 7 but that shouldn't be a problem to my knowledge.  The Guest Additions iso is proper for my verion of VBox.  Thank you in advance for help and Happy New Year!

Here is what I entered and then the error log:

@d-virtualbox:/media/d/VBox_GAs_6.1.48$ sudo sh ./VBoxLinuxAdditions.run
[sudo] password for d:
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.48 Guest Additions for Linux........
VirtualBox Guest Additions installer
Building the main Guest Additions 6.1.48 module for kernel 6.12.7-1-siduction-amd64.

The error log contents:

Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/6.12.7-1-siduction-amd64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -j2 forced in submake: resetting jobserver mode.
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-14 (Debian 14.2.0-11) 14.2.0
  You are using:           gcc-14 (Debian 14.2.0-12) 14.2.0
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 need-builtin=1 need-modorder=1
# cmd_mod /tmp/vbox.0/vboxguest.mod
  printf '%s
'   VBoxGuest-linux.o VBoxGuest.o common/string/strformatrt.o combined-agnostic.o combined-os-specific.o | awk '!x[$0]++ { print("/tmp/vbox.0/"$0) }' > /tmp/vbox.0/vboxguest.mod
# CC [M]  /tmp/vbox.0/VBoxGuest-linux.o
   gcc-14 -Wp,-MMD,/tmp/vbox.0/.VBoxGuest-linux.o.d -nostdinc -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/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -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 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fomit-frame-pointer -fno-stack-clash-protection -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -Wno-declaration-after-statement -fno-pie -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='"VBoxGuest_linux"' -DKBUILD_MODNAME='"vboxguest"' -D__KBUILD_MODNAME=kmod_vboxguest -c -o /tmp/vbox.0/VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c   ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16   --module /tmp/vbox.0/VBoxGuest-linux.o
# CC [M]  /tmp/vbox.0/VBoxGuest.o
   gcc-14 -Wp,-MMD,/tmp/vbox.0/.VBoxGuest.o.d -nostdinc -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/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -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 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fomit-frame-pointer -fno-stack-clash-protection -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -Wno-declaration-after-statement -fno-pie -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='"VBoxGuest"' -DKBUILD_MODNAME='"vboxguest"' -D__KBUILD_MODNAME=kmod_vboxguest -c -o /tmp/vbox.0/VBoxGuest.o /tmp/vbox.0/VBoxGuest.c   ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16   --module /tmp/vbox.0/VBoxGuest.o
/tmp/vbox.0/VBoxGuest-linux.c:186:21: error: ‘no_llseek’ undeclared here (not in a function); did you mean ‘noop_llseek’?
  186 |     llseek:         no_llseek,
      |                     ^~~~~~~~~
      |                     noop_llseek
/tmp/vbox.0/VBoxGuest-linux.c: In function ‘vgdrvLinuxParamLogGrpSet’:
/tmp/vbox.0/VBoxGuest-linux.c:1354:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
 1354 |         strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
      |         ^~~~~~~
      |         strncpy
make[2]: *** [scripts/Makefile.build:234: /tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
# cmd_gen_objtooldep /tmp/vbox.0/VBoxGuest.o
   { echo ; echo '/tmp/vbox.0/VBoxGuest.o: $(wildcard ./tools/objtool/objtool)' ; } >> /tmp/vbox.0/.VBoxGuest.o.cmd
make[1]: *** [Makefile:1962: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxguest] Error 2

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 3.017
Re: VBox Guest Additions Installation Errors
« Reply #1 on: 2025/01/02, 09:03:54 »
Code: [Select]
Guest Additions 6.1.48

Are you kidding us? VBox 6.1.48 is ancient old and will never work on recent kernels!
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline der_bud

  • User
  • Posts: 1.100
  • member
Re: VBox Guest Additions Installation Errors
« Reply #2 on: 2025/01/02, 10:55:25 »
The changelog for 6.48 (https://www.virtualbox.org/wiki/Changelog-6.1#v48) states:
Code: [Select]
Linux Guest Additions: Added initial support for kernels 6.5 and 6.6So they cannot run with newer kernels.
I have a machine with old Windows and Virtualbox Version 6.50 on that Host. The Linux Guests inside are working more or less ok with recent 7.x guestadditions installed, so it could perhaps work for you to have 7.x additions in a VM running with 6.x VBox on the host, but not the other way round.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline onepiece

  • User
  • Posts: 7
Re: VBox Guest Additions Installation Errors
« Reply #3 on: 2025/01/08, 19:46:37 »
Thank you to all for your thoughts.

I have so many VMs running so smoothly under VBox 6.x I'm afraid to rock the boat with an "upgrade".  That said, I might try the suggestion to load Guest Additions 7.x in the guest version of Siduction I'm running.  Thanks again to all.

Offline DeepDayze

  • User
  • Posts: 476
Re: VBox Guest Additions Installation Errors
« Reply #4 on: 2025/01/13, 18:03:59 »
Thank you to all for your thoughts.

I have so many VMs running so smoothly under VBox 6.x I'm afraid to rock the boat with an "upgrade".  That said, I might try the suggestion to load Guest Additions 7.x in the guest version of Siduction I'm running.  Thanks again to all.
You would also have to upgrade your VBox 6.x on the host as well as you just cannot upgrade the guest additions in the guest alone.

Offline Rienniev

  • Newbie
  • Posts: 3
Re: VBox Guest Additions Installation Errors
« Reply #5 on: Yesterday at 17:06:26 »
Ugh, that's a compiler mismatch.  The Guest Additions are trying to use a slightly different GCC version than what built your kernel.  Happens more often than you'd think.  Try this:  see if you can find a package for the exact GCC version your kernel was compiled with (gcc-14 (Debian 14.2.0-11) in your case) and install it before trying the Guest Additions again.  That might fix the incompatibility.  If not, you might need to rebuild your kernel (not fun, but sometimes necessary).