Page 1 of 1

3.5-rc1 do_mmap implicit-function-declaration error

Posted: 6. Jun 2012, 23:22
by sboyce
I applied vbox_kernel3.2.0_patch then hit this error.
gcc -Wp,-MD,/tmp/vbox.1/r0drv/linux/.memobj-r0drv-linux.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.7/include -I/usr/src/linux-3.5-rc1/arch/x86/include -Iarch/x86/include/generated -Iinclude -include /usr/src/linux-3.5-rc1/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 -march=k8 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -femit-struct-debug-baseonly -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.1/include/VBox/SUPDrvMangling.h -I/lib/modules/3.5.0-rc1-smp+/build/include -I/tmp/vbox.1/ -I/tmp/vbox.1/include -I/tmp/vbox.1/r0drv/linux -I/tmp/vbox.1/vboxdrv/ -I/tmp/vbox.1/vboxdrv/include -I/tmp/vbox.1/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(memobj_r0drv_linux)" -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.1/r0drv/linux/memobj-r0drv-linux.o /tmp/vbox.1/r0drv/linux/memobj-r0drv-linux.c
/tmp/vbox.1/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjLinuxDoMmap’:
/tmp/vbox.1/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function ‘do_mmap’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vbox.1/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.1] Error 2
make: *** [vboxdrv] Error 2

Re: 3.5-rc1 do_mmap implicit-function-declaration error

Posted: 6. Jun 2012, 23:27
by Perryg
How does a 3.2 patch fix a 3.5rc error?

Re: 3.5-rc1 do_mmap implicit-function-declaration error

Posted: 7. Jun 2012, 16:58
by sboyce
I am not saying it should fix the error, I am just providing information on what I did.
This is an error that cropped up late in 3.4.0-git and in 3.5-rc1 as a result of a change in the kernel.

Re: 3.5-rc1 do_mmap implicit-function-declaration error

Posted: 12. Jun 2012, 15:50
by frank
r41660 contains a changeset which should allow it to compile VirtualBox against Linux 3.5. Apply the same change to the files in /usr/src/vboxhost-*/.