- Code: Select all Expand viewCollapse view
[root@moon ~]# /sbin/rcvboxadd setup
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 2.6.32-754.el6.x86_64.
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: modprobe vboxsf failed
[root@moon ~]# cat /var/log/vboxadd-setup.log
Building the main Guest Additions module for kernel 2.6.32-754.el6.x86_64.
Building the shared folder support module.
Error building the module. Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/2.6.32-754.el6.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/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-redhat-linux/4.4.7/include -Iinclude -I/usr/src/kernels/2.6.32-754.el6.x86_64/include/uapi -I/usr/src/kernels/2.6.32-754.el6.x86_64/arch/x86/include -Iarch/include/generated -Iinclude -include /usr/src/kernels/2.6.32-754.el6.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie -I/lib/modules/2.6.32-754.el6.x86_64/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_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 -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vfsmod)" -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -D"DEBUG_HASH=41" -D"DEBUG_HASH2=24" -c -o /tmp/vbox.0/.tmp_vfsmod.o /tmp/vbox.0/vfsmod.c
/tmp/vbox.0/vfsmod.c: In function ‘sf_show_options’:
/tmp/vbox.0/vfsmod.c:509: error: dereferencing pointer to incomplete type
/tmp/vbox.0/vfsmod.c:515: error: implicit declaration of function ‘seq_printf’
/tmp/vbox.0/vfsmod.c:518: error: implicit declaration of function ‘seq_puts’
/tmp/vbox.0/vfsmod.c:519: error: implicit declaration of function ‘seq_escape’
make[2]: *** [/tmp/vbox.0/vfsmod.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxsf] Error 2
Could not find the X.Org or XFree86 Window System, skipping.
[root@moon ~]# rpm -qa | grep kernel-devel
kernel-devel-2.6.32-754.el6.x86_64
kernel-devel-2.6.32-754.9.1.el6.x86_64
/tmp/vbox.0/vfsmod.c: In function ‘sf_show_options’:
/tmp/vbox.0/vfsmod.c:509: error: dereferencing pointer to incomplete type
/tmp/vbox.0/vfsmod.c:515: error: implicit declaration of function ‘seq_printf’
/tmp/vbox.0/vfsmod.c:518: error: implicit declaration of function ‘seq_puts’
/tmp/vbox.0/vfsmod.c:519: error: implicit declaration of function ‘seq_escape’
stes wrote:I usually like to install "minimal" operating systems instead of "full complete all software" installations, maybe some other components are somehow missing ...
[root@moon ~]# rpm -qa | grep kernel
libreport-plugin-kerneloops-2.0.9-34.0.1.el6.x86_64
abrt-addon-kerneloops-2.0.8-44.0.1.el6.x86_64
kernel-2.6.32-754.el6.x86_64
kernel-devel-2.6.32-754.el6.x86_64
dracut-kernel-004-411.0.1.el6.noarch
kernel-headers-2.6.32-754.el6.x86_64
kernel-firmware-2.6.32-754.el6.noarch
[root@moon ~]# rpm -q gcc make perl
gcc-4.4.7-23.0.1.el6.x86_64
make-3.81-23.el6.x86_64
perl-5.10.1-144.el6.x86_64
[root@moon vboxsf]# /sbin/rcvboxadd setup
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 2.6.32-754.el6.x86_64.
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: modprobe vboxsf failed
[root@moon vboxsf]# cat /var/log/vboxadd-setup.log
Building the main Guest Additions module for kernel 2.6.32-754.el6.x86_64.
Building the shared folder support module.
Error building the module. Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/2.6.32-754.el6.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/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-redhat-linux/4.4.7/include -Iinclude -I/usr/src/kernels/2.6.32-754.el6.x86_64/include/uapi -I/usr/src/kernels/2.6.32-754.el6.x86_64/arch/x86/include -Iarch/include/generated -Iinclude -include /usr/src/kernels/2.6.32-754.el6.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -save-temps -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie -I/lib/modules/2.6.32-754.el6.x86_64/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_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 -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vfsmod)" -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -D"DEBUG_HASH=41" -D"DEBUG_HASH2=24" -c -o /tmp/vbox.0/.tmp_vfsmod.o /tmp/vbox.0/vfsmod.c
gcc: warning: -pipe ignored because -save-temps specified
/tmp/vbox.0/vfsmod.c: In function ‘sf_show_options’:
/tmp/vbox.0/vfsmod.c:509: error: dereferencing pointer to incomplete type
/tmp/vbox.0/vfsmod.c:515: error: implicit declaration of function ‘seq_printf’
/tmp/vbox.0/vfsmod.c:518: error: implicit declaration of function ‘seq_puts’
/tmp/vbox.0/vfsmod.c:519: error: implicit declaration of function ‘seq_escape’
make[2]: *** [/tmp/vbox.0/vfsmod.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxsf] Error 2
Installing X.Org Server 1.17 modules
You may need to restart the Window System (or just restart the guest system)
to enable the Guest Additions.
[root@europa ~]# rpm -qa | grep kernel
kernel-firmware-2.6.32-754.el6.noarch
libreport-plugin-kerneloops-2.0.9-34.0.1.el6.i686
kernel-headers-2.6.32-754.el6.i686
dracut-kernel-004-411.0.1.el6.noarch
kernel-2.6.32-754.el6.i686
kernel-devel-2.6.32-754.el6.i686
abrt-addon-kerneloops-2.0.8-44.0.1.el6.i686
[root@europa ~]# rpm -q gcc make perl
gcc-4.4.7-23.0.1.el6.i686
make-3.81-23.el6.i686
perl-5.10.1-144.el6.i686
Building the main Guest Additions module for kernel 2.6.32-754.el6.i686.
Building the shared folder support module.
Error building the module. Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/2.6.32-754.el6.i686/build SUBDIRS=/t
mp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (
\
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are
missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix
it."; \
echo; \
/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/i686-redh
at-linux/4.4.7/include -Iinclude -I/usr/src/kernels/2.6.32-754.el6.i686/include
/uapi -I/usr/src/kernels/2.6.32-754.el6.i686/arch/x86/include -Iarch/include/gen
erated -Iinclude -include /usr/src/kernels/2.6.32-754.el6.i686/include/linux/kco
nfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict
-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-
return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generi
c32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FR
AME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-
asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mindirect-bra
nch=thunk-extern -mindirect-branch-register -DRETPOLINE -Wframe-larger-than=1024
-Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statem
ent -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack
-Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox
/VBoxGuestMangling.h -fno-pie -I/lib/modules/2.6.32-754.el6.i686/build/include -
I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vbox
sf/ -I/tmp/vbox.0/vboxsf/include -I/tmp/vbox.0/vboxsf/r0drv/linux -D__KERNEL__ -
DMODULE -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_X86 -DMODULE -D"KBUIL
D_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vfsmod)" -D"KBUILD_MODNAME=KBUILD_ST
R(vboxsf)" -D"DEBUG_HASH=41" -D"DEBUG_HASH2=24" -c -o /tmp/vbox.0/.tmp_vfsmod.o
/tmp/vbox.0/vfsmod.c
/tmp/vbox.0/vfsmod.c: In function ‘sf_show_options’:
/tmp/vbox.0/vfsmod.c:509: error: dereferencing pointer to incomplete type
/tmp/vbox.0/vfsmod.c:515: error: implicit declaration of function ‘seq_printf’
/tmp/vbox.0/vfsmod.c:518: error: implicit declaration of function ‘seq_puts’
/tmp/vbox.0/vfsmod.c:519: error: implicit declaration of function ‘seq_escape’
make[2]: *** [/tmp/vbox.0/vfsmod.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxsf] Error 2
Could not find the X.Org or XFree86 Window System, skipping.
thebell wrote:As @stes said, install "kernel-devel" package on RHEL 7.6 solved the problem, vboxsf now works fine on my RHEL 7.6 guest without modify GA's code.
But my RHEL 6.10 guest already installed "kernel-devel" package before, and still can't compile "vboxsf.ko", looks like gcc didn't include "seq_file.h" and "mount.h" automatically on RHEL 6, I don't know why but add following lines to "vfsmod.h" make it works on RHEL 6 guest without my previous patch.
- Code: Select all Expand viewCollapse view
#include <linux/seq_file.h>
#include <linux/mount.h>
Users browsing this forum: No registered users and 0 guests