Page 1 of 1

Cannot build guest additions on SLES 15SP3

Posted: 23. Jun 2021, 19:28
by dkaelbling
I have a clean SLES 15SP3 client (real SLES, not OpenSUSE) running in VirtualBox 6.1.22 on a macOS Big Sur host. Attempts to install the guest additions fail. I randomly tried using the VBoxVGA graphics controller too, but that didn't make a difference. Does anyone have any suggestions?
Building the main Guest Additions 6.1.22 module for kernel 5.3.18-57-default.
...
  gcc -Wp,-MD,/tmp/vbox.0/.combined-agnostic.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/7/include -I/usr/src/linux-5.3.18-57/arch/x86/include -I./arch/x86/include/generated -I/usr/src/linux-5.3.18-57/include -I./include -I/usr/src/linux-5.3.18-57/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/usr/src/linux-5.3.18-57/include/uapi -I./include/generated/uapi -include /usr/src/linux-5.3.18-57/include/linux/kconfig.h -include /usr/src/linux-5.3.18-57/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 -Werror=return-type -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_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -DCONFIG_AS_ADX=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fno-var-tracking-assignments -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -flive-patching=inline-clone -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -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/usr/src/linux-5.3.18-57/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='"combined_agnostic"' -DKBUILD_MODNAME='"vboxguest"' -c -o /tmp/vbox.0/combined-agnostic.o /tmp/vbox.0/combined-agnostic.c
/tmp/vbox.0/VBoxGuest-linux.c:177:5: error: ‘struct file_operations’ has no member named ‘ioctl’; did you mean ‘iopoll’?
     ioctl:          vgdrvLinuxIOCtl,
     ^~~~~
     iopoll
/tmp/vbox.0/VBoxGuest-linux.c:177:21: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
     ioctl:          vgdrvLinuxIOCtl,
                     ^~~~~~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:177:21: note: (near initialization for ‘g_FileOps’)
/tmp/vbox.0/VBoxGuest-linux.c:177:21: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
/tmp/vbox.0/VBoxGuest-linux.c:177:21: note: (near initialization for ‘g_FileOps.fsync’)
/tmp/vbox.0/VBoxGuest-linux.c:204:5: error: ‘struct file_operations’ has no member named ‘ioctl’; did you mean ‘iopoll’?
     ioctl:          vgdrvLinuxIOCtl,
     ^~~~~
     iopoll
/tmp/vbox.0/VBoxGuest-linux.c:204:21: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
     ioctl:          vgdrvLinuxIOCtl,
                     ^~~~~~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:204:21: note: (near initialization for ‘g_FileOpsUser’)
/tmp/vbox.0/VBoxGuest-linux.c:204:21: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
/tmp/vbox.0/VBoxGuest-linux.c:204:21: note: (near initialization for ‘g_FileOpsUser.fsync’)
/tmp/vbox.0/VBoxGuest-linux.c: In function ‘vgdrvLinuxIOCtl’:
/tmp/vbox.0/VBoxGuest-linux.c:908:5: error: implicit declaration of function ‘unlock_kernel’; did you mean ‘unlock_page’? [-Werror=implicit-function-declaration]
     unlock_kernel();
     ^~~~~~~~~~~~~
     unlock_page
/tmp/vbox.0/VBoxGuest-linux.c:922:5: error: implicit declaration of function ‘lock_kernel’; did you mean ‘__kernel’? [-Werror=implicit-function-declaration]
     lock_kernel();
     ^~~~~~~~~~~
     __kernel
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-5.3.18-57/scripts/Makefile.build:288: /tmp/vbox.0/VBoxGuest-linux.o] Error 1
...

Re: Cannot build guest additions on SLES 15SP3

Posted: 23. Jun 2021, 19:31
by scottgus1

Re: Cannot build guest additions on SLES 15SP3

Posted: 23. Jun 2021, 19:54
by dkaelbling
I installed gcc, make, and the kernel header files (kernel-devel package). I don't see any other guest prereqs -- did I miss something? I have many other VMs for other operating systems where the additions install successfully, so I don't think it's a host issue.

Re: Cannot build guest additions on SLES 15SP3

Posted: 23. Jun 2021, 19:59
by scottgus1
I'm no Linux guru, regrettably. All I know is there's prerequisites. We'll have to wait for a Linux expert to come along.

Re: Cannot build guest additions on SLES 15SP3

Posted: 23. Jun 2021, 21:59
by Martin
SLES 15 SP3 is just 5 days old.
VirtualBox 6.1.22 was released almost two months ago.
Your Linux is probably a very new kernel which is not compatbile with Vbox 6.1.22.