Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269982 - app-emulation/virtualbox-modules-1.6.6-r1 fails to compile on kernel 2.6.28-gentoo-r5
Summary: app-emulation/virtualbox-modules-1.6.6-r1 fails to compile on kernel 2.6.28-g...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Markus Ullmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-15 19:01 UTC by skelter
Modified: 2009-11-10 01:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skelter 2009-05-15 19:01:35 UTC
Compile fails because _PAGE_KERNEL_EXEC is undelcared in alloc-r0drv-linux.c:138

There are several bugs which mention virtualbox-modules-1.6.6-r1 not compiling, but I did not see any mentioning this particular kernel.  For instance, bug 266468 mentions a slightly later kernel linux-2.6.29-gentoo.  That bug was marked resolved/fixed, though it was fixed by the user moving on to a modern version of VirtualBox, not by a patch, as far as I can tell.  

I was hesitant to unmask ~x86 of VirtualBox.  I'm running a lesser OS prone to disease on it and I'm concerned it'll have to reauthenticate...again.  Yeah, I know, forgive me; its for testing.


Reproducible: Always

Steps to Reproduce:
1. emerge virtualbox-modules 1.6.6-r1 while /usr/src/linux points to /usr/src/linux-2.6.28-gentoo-r8


Actual Results:  
Compile fails because _PAGE_KERNEL_EXEC is undelcared in alloc-r0drv-linux.c:138

i686-pc-linux-gnu-gcc -Wp,-MD,/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/.alloc-r0drv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude  -I/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=core2 -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iarch/x86/include/asm/mach-generic -Iarch/x86/include/asm/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -I/usr/src/linux/include -I/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/ -I/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/include -I/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_X86 -DUSE_NEW_OS_INTERFACE_FOR_MM -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(alloc_r0drv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)"  -c -o /home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.o /home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c
/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c: In function 'rtMemAlloc':
/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: '_PAGE_KERNEL_EXEC' undeclared (first use in this function)
/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: (Each undeclared identifier is reported only once
/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.c:138: error: for each function it appears in.)
make[2]: *** [/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv/r0drv/linux/alloc-r0drv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/home/portagetmp/portage/app-emulation/virtualbox-modules-1.6.6-r1/work/vboxdrv] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.28-gentoo-r5'
make: *** [vboxdrv] Error 2
 * 
 * ERROR: app-emulation/virtualbox-modules-1.6.6-r1 failed.


Expected Results:  
Successful emerge of virtualbox-modules 1.6.6-r1

The following might be of interest:
di79suehs ~ # grep -r PAGE_KERNEL_EXEC /usr/src/linux-2.6.28-gentoo-r5/*
/usr/src/linux-2.6.28-gentoo-r5/arch/arm/kernel/module.c:	return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
/usr/src/linux-2.6.28-gentoo-r5/arch/arm/include/asm/pgtable.h:#define PAGE_KERNEL_EXEC	_MOD_PROT(pgprot_kernel, L_PTE_EXEC)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/mm/init_32.c:					prot = PAGE_KERNEL_EXEC;
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/xen/enlighten.c:			pte = pfn_pte(pfn, PAGE_KERNEL_EXEC);
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/power/hibernate_32.c:					set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC));
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/kernel/module_64.c:	return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define __PAGE_KERNEL_EXEC						\
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define __PAGE_KERNEL		(__PAGE_KERNEL_EXEC | _PAGE_NX)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define __PAGE_KERNEL_RX		(__PAGE_KERNEL_EXEC & ~_PAGE_RW)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define __PAGE_KERNEL_EXEC_NOCACHE	(__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define __PAGE_KERNEL_LARGE_EXEC	(__PAGE_KERNEL_EXEC | _PAGE_PSE)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define PAGE_KERNEL_EXEC		__pgprot(__PAGE_KERNEL_EXEC)
/usr/src/linux-2.6.28-gentoo-r5/arch/x86/include/asm/pgtable.h:#define PAGE_KERNEL_EXEC_NOCACHE	__pgprot(__PAGE_KERNEL_EXEC_NOCACHE)
/usr/src/linux-2.6.28-gentoo-r5/arch/cris/include/arch-v32/arch/mmu.h:#define PAGE_KERNEL_EXEC __pgprot(_PAGE_GLOBAL | _PAGE_KERNEL | _PAGE_EXECUTE | \
/usr/src/linux-2.6.28-gentoo-r5/arch/xtensa/mm/misc.S:	addi	a6, a3, (PAGE_KERNEL_EXEC | _PAGE_HW_WRITE)
/usr/src/linux-2.6.28-gentoo-r5/arch/powerpc/include/asm/pgtable-ppc64.h:#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_EXEC)
/usr/src/linux-2.6.28-gentoo-r5/include/asm-xtensa/pgtable.h:#define PAGE_KERNEL_EXEC   __pgprot(_PAGE_PRESENT|_PAGE_HW_WRITE|_PAGE_HW_EXEC)
/usr/src/linux-2.6.28-gentoo-r5/include/asm-mn10300/pgtable.h:#define __PAGE_KERNEL_EXEC	(__PAGE_KERNEL & ~_PAGE_NX)
/usr/src/linux-2.6.28-gentoo-r5/include/asm-mn10300/pgtable.h:#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
/usr/src/linux-2.6.28-gentoo-r5/include/asm-mn10300/pgtable.h:#define PAGE_KERNEL_EXEC	__pgprot(__PAGE_KERNEL_EXEC)
/usr/src/linux-2.6.28-gentoo-r5/mm/vmalloc.c:#ifndef PAGE_KERNEL_EXEC
/usr/src/linux-2.6.28-gentoo-r5/mm/vmalloc.c:# define PAGE_KERNEL_EXEC PAGE_KERNEL
/usr/src/linux-2.6.28-gentoo-r5/mm/vmalloc.c:	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
/usr/src/linux-2.6.28-gentoo-r5/mm/nommu.c:#ifndef PAGE_KERNEL_EXEC
/usr/src/linux-2.6.28-gentoo-r5/mm/nommu.c:# define PAGE_KERNEL_EXEC PAGE_KERNEL
/usr/src/linux-2.6.28-gentoo-r5/mm/nommu.c:	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
di79suehs ~ # grep -r PAGE_KERNEL_EXEC /usr/src/linux-2.6.27-gentoo-r8/*
di79suehs ~ #
Comment 1 Juan Pablo Lopez Bergero 2009-08-03 21:02:54 UTC
Hi, did u solve it. I have the same problem, thanks.
Comment 2 Patrick Lauer gentoo-dev 2009-11-10 01:39:00 UTC
3.0 stable everywhere.