I'm using Xubuntu 18.04 LTS as VM Guest (VirtualBox 6.1.28, I've tried with 6.1.30 also).
If I'm using standard Linux kernels, I'm able to install VirtualBox Guest Addition using the sudo ./autorun.sh command from the ISO mounted folder. No issue, working perfectly.
But If I'm using Linux Preempt RT Kernel, impossible to install VirtualBox Guest Addition. I've tried with Kernel 4.16.12-RT5, 5.14-RT19, 5.15.2-RT9. As a result, no shared folder, no mouse...
I've correctly compiled and installed linux-headers and linux-image corresponding to each Prempt RT kernel which are working correctly in standard PC.
The linux distribution is up to date using the sudo apt-get update, sudo apt-get upgrade, sudo apt-get dist-upgrade commands.
I've tried also to install virtualbox-dkms, dkms and virtualbox-guest-utils without any better result
Is anybody able to reproduce this ?
Is anybody being able to help me to fix this ?
Best regards,
for example in the case of 4.16.12-RT5, here is the result of the vboxadd-setup.log:
Building the main Guest Additions 6.1.28 module for kernel 4.16.12-rt5.
Error building the module. Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/4.16.12-rt5/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
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/.VBoxGuest-linux.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/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 -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -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 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -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 -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME='"VBoxGuest_linux"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/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 -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -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 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -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 -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME='"VBoxGuest"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/VBoxGuest.o /tmp/vbox.0/VBoxGuest.c
if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VBoxGuest.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/VBoxGuest.o"; fi; fi;
gcc -Wp,-MD,/tmp/vbox.0/common/string/.strformatrt.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/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 -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -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 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -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 -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME='"strformatrt"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/common/string/strformatrt.o /tmp/vbox.0/common/string/strformatrt.c
if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VBoxGuest-linux.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/VBoxGuest-linux.o"; fi; fi;
gcc -Wp,-MD,/tmp/vbox.0/.combined-agnostic.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/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 -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -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 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -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 -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME='"combined_agnostic"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/combined-agnostic.o /tmp/vbox.0/combined-agnostic.c
if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/common/string/strformatrt.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/common/string/strformatrt.o"; fi; fi;
gcc -Wp,-MD,/tmp/vbox.0/.combined-os-specific.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/7/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 -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -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 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -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 -DRT_ARCH_X86 -DMODULE -DKBUILD_BASENAME='"combined_os_specific"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/combined-os-specific.o /tmp/vbox.0/combined-os-specific.c
In file included from /tmp/vbox.0/r0drv/linux/thread2-r0drv-linux.c:40:0,
from /tmp/vbox.0/combined-os-specific.c:44:
./include/uapi/linux/sched/types.h:7:8: error: redefinition of ‘struct sched_param’
struct sched_param {
^~~~~~~~~~~
In file included from ./include/linux/uaccess.h:5:0,
from ./include/linux/highmem.h:9,
from ./include/linux/pagemap.h:11,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:103,
from /tmp/vbox.0/combined-os-specific.c:28:
./include/linux/sched.h:51:8: note: originally defined here
struct sched_param;
^~~~~~~~~~~
In file included from /tmp/vbox.0/r0drv/linux/thread2-r0drv-linux.c:40:0,
from /tmp/vbox.0/combined-os-specific.c:44:
./include/uapi/linux/sched/types.h:57:8: error: redefinition of ‘struct sched_attr’
struct sched_attr {
^~~~~~~~~~
In file included from ./include/linux/uaccess.h:5:0,
from ./include/linux/highmem.h:9,
from ./include/linux/pagemap.h:11,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:103,
from /tmp/vbox.0/combined-os-specific.c:28:
./include/linux/sched.h:50:8: note: originally defined here
struct sched_attr;
^~~~~~~~~~
In file included from /tmp/vbox.0/combined-os-specific.c:44:0:
/tmp/vbox.0/r0drv/linux/thread2-r0drv-linux.c: In function ‘rtThreadNativeSetPriority’:
/tmp/vbox.0/r0drv/linux/thread2-r0drv-linux.c:149:51: error: passing argument 3 of ‘sched_setscheduler’ from incompatible pointer type [-Werror=incompatible-pointer-types]
rc = sched_setscheduler(current, iSchedClass, &Param);
^
In file included from ./include/linux/uaccess.h:5:0,
from ./include/linux/highmem.h:9,
from ./include/linux/pagemap.h:11,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:103,
from /tmp/vbox.0/combined-os-specific.c:28:
./include/linux/sched.h12: note: expected ‘const struct sched_param *’ but argument is of type ‘struct sched_param *’
extern int sched_setscheduler(struct task_struct *, int, const struct sched_param *);
^~~~~~~~~~~~~~~~~~
In file included from /tmp/vbox.0/combined-os-specific.c:44:0:
/tmp/vbox.0/r0drv/linux/thread2-r0drv-linux.c:154:55: error: passing argument 3 of ‘sched_setscheduler’ from incompatible pointer type [-Werror=incompatible-pointer-types]
rc = sched_setscheduler(current, iSchedClass, &Param);
^
In file included from ./include/linux/uaccess.h:5:0,
from ./include/linux/highmem.h:9,
from ./include/linux/pagemap.h:11,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:103,
from /tmp/vbox.0/combined-os-specific.c:28:
./include/linux/sched.h12: note: expected ‘const struct sched_param *’ but argument is of type ‘struct sched_param *’
extern int sched_setscheduler(struct task_struct *, int, const struct sched_param *);
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:324: recipe for target '/tmp/vbox.0/combined-os-specific.o' failed
make[2]: *** [/tmp/vbox.0/combined-os-specific.o] Error 1
make[2]: *** Waiting for unfinished jobs....
if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/combined-agnostic.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/combined-agnostic.o"; fi; fi;
Makefile recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile-footer.gmk:117: recipe for target 'vboxguest' failed
make: *** [vboxguest] Error 2
VBoxClient: info: Try 'VBoxClient --help' for more information
modprobe vboxguest failed