Using gentoo-source-2.4.19: # emerge nvidia-kernel Calculating dependencies ...done! >>> emerge media-video/nvidia-kernel-1.0.2880 to / >>> md5 icon_wink.gif NVIDIA_kernel-1.0-2880.tar.gz >>> Unpacking source... >>> Unpacking NVIDIA_kernel-1.0-2880.tar.gz >>> Source unpacked. rm -f nv.o os-interface.o os-registry.o Module-linux nv_compiler.h *.d NVdriver cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -D_X86=1 -Di386=1 -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=2880 -I. -I/usr/src/linux/include -Wno-cast-qual nv.c nv.c: In function `nv_kern_mmap': nv.c:1438: `PAGE_SHARED' undeclared (first use in this function) nv.c:1438: (Each undeclared identifier is reported only once nv.c:1438: for each function it appears in.) make: *** [nv.o] Error 1 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 2, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/media-video/nvidia-kernel/nvidia-kernel-1.0.2880.ebuild . # bummer
This works for me. It may be due to another bug in the nvidia-kernel ebuild, however. Try this again in the morning
Try nvidia-kernel-1.0.2880-r1.ebuild when it shows up. Make sure /usr/src/linux is a *relative* symlink to the dir nvidia-kernel should compile for.
% pwd /usr/src % ls -l total 2 lrwxrwxrwx 1 root root 19 Apr 24 10:56 linux -> linux-2.4.19- gentoo drwxr-xr-x 15 root root 686 Apr 25 10:50 linux-2.4.19-gentoo drwxr-xr-x 7 root root 141 Apr 24 22:43 pc % su Password: # emerge nvidia-kernel Calculating dependencies ...done! >>> emerge media-video/nvidia-kernel-1.0.2880-r1 to / >>> md5 ;-) NVIDIA_kernel-1.0-2880.tar.gz >>> Unpacking source... >>> Unpacking NVIDIA_kernel-1.0-2880.tar.gz >>> Source unpacked. rm -f nv.o os-interface.o os-registry.o Module-linux nv_compiler.h *.d NVdriver cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts - Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ - DMODULE -D_LOOSE_KERNEL_NAMES -D_X86=1 -Di386=1 -DUNIX -DLINUX -DNV4_HW -DNTRM - DRM20 -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE - DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=2880 -I. - I/usr/src/linux/include -Wno-cast-qual nv.c nv.c: In function `nv_kern_mmap': nv.c:1438: `PAGE_SHARED' undeclared (first use in this function) nv.c:1438: (Each undeclared identifier is reported only once nv.c:1438: for each function it appears in.) make: *** [nv.o] Error 1 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 2, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/media-video/nvidia-kernel/nvidia-kernel- 1.0.2880-r1.ebuild . # The tarball the ebuild dowloads and uses is NVIDIA_kernel-1.0-2880.tar.gz *not* NVIDIA_kernel-1.0-2880-r1.tar.gz is that the problem?
No, that's not it. Go ahead and attach your /usr/src/linux/.config and I'll look into it.
Created attachment 716 [details] Gentoo Linux (gentoo-source-2.4.19) Kernel Config Kernel config from bug reporter.
Created attachment 717 [details] Another config file from someone else having the same problem. Mine gives me the exact same error when I try to ebuild the nvidia drivers, as per the instructions on the "desktop setup" page.
OK, this problem is due to an (easily fixable) incompatibility with grsecurity. in /usr/src/linux/include/asm/pgtable.h, change these lines: #if defined(CONFIG_GRKERNSEC_PAX) || defined(CONFIG_GRKERNSEC_PAX_RANDMMAP) #define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW |_PAGE_USER |_PAGE_ACCESSED) #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #else #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #endif to (just remove the else and move those lines outside the ifdef): #if defined(CONFIG_GRKERNSEC_PAX) || defined(CONFIG_GRKERNSEC_PAX_RANDMMAP) #define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW |_PAGE_USER |_PAGE_ACCESSED) #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #endif #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) I'm assigning this to tutor. tutor, could you let the author of grsecurity know about this issue?
*** Bug 2261 has been marked as a duplicate of this bug. ***
OK, I already talked to spender. This'll be fixed in gentoo-sources-2.4.19-r1
Will be fixed in gentoo-sources-2.4.19-r1 (rolling it up now)