Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2133 - nvidia-kernel.ebuild is broken
Summary: nvidia-kernel.ebuild is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Peter W. Michaleas (RETIRED)
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
: 2261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-26 14:31 UTC by aj
Modified: 2004-01-16 17:27 UTC (History)
4 users (show)

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


Attachments
Gentoo Linux (gentoo-source-2.4.19) Kernel Config (ajslater-kernel-config,25.59 KB, text/plain)
2002-04-29 13:16 UTC, aj
Details
Another config file from someone else having the same problem. (.config,23.70 KB, text/plain)
2002-04-29 16:45 UTC, Donald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aj 2002-04-26 14:31:09 UTC
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
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-04-29 01:41:11 UTC
This works for me.  It may be due to another bug in the nvidia-kernel ebuild,
however.  Try this again in the morning
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2002-04-29 01:48:51 UTC
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.
Comment 3 aj 2002-04-29 10:18:57 UTC
% 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?
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-04-29 10:29:35 UTC
No, that's not it.  Go ahead and attach your /usr/src/linux/.config and I'll
look into it.
Comment 5 aj 2002-04-29 13:16:08 UTC
Created attachment 716 [details]
Gentoo Linux (gentoo-source-2.4.19) Kernel Config 

Kernel config from bug reporter.
Comment 6 Donald 2002-04-29 16:45:01 UTC
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.
Comment 7 Daniel Robbins (RETIRED) gentoo-dev 2002-04-30 01:10:15 UTC
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?
Comment 8 Daniel Robbins (RETIRED) gentoo-dev 2002-04-30 09:34:46 UTC
*** Bug 2261 has been marked as a duplicate of this bug. ***
Comment 9 Daniel Robbins (RETIRED) gentoo-dev 2002-04-30 11:56:04 UTC
OK, I already talked to spender.  This'll be fixed in gentoo-sources-2.4.19-r1
Comment 10 Daniel Robbins (RETIRED) gentoo-dev 2002-04-30 12:01:08 UTC
Will be fixed in gentoo-sources-2.4.19-r1 (rolling it up now)