Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26812 - nvidia-kernel will fail with 2.6.0-test3-bk5 or newer sources
Summary: nvidia-kernel will fail with 2.6.0-test3-bk5 or newer sources
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High blocker
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-17 09:43 UTC by Narada Sage
Modified: 2003-08-22 06:33 UTC (History)
2 users (show)

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


Attachments
nvidia-kernel.log (nvidia-kernel.log,2.21 KB, text/plain)
2003-08-17 09:45 UTC, Narada Sage
Details
nvidia-kernel.log (nvidia-kernel.log,1.63 KB, text/plain)
2003-08-17 10:01 UTC, Narada Sage
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Narada Sage 2003-08-17 09:43:49 UTC
$ emerge nvidia-kernel &> nvidia-kernel.log
Comment 1 Narada Sage 2003-08-17 09:45:42 UTC
Created attachment 16214 [details]
nvidia-kernel.log
Comment 2 Narada Sage 2003-08-17 10:01:21 UTC
Created attachment 16215 [details]
nvidia-kernel.log
Comment 3 Narada Sage 2003-08-17 10:13:51 UTC
$ emerge info
Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.6.0-test3-bk5 i686 Intel(R) Pentium(R) III Mobile CPU      1200MHz
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ http://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.linux.no/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow avi crypt encode foomaticdb gif jpeg mad mmx mpeg ncurses pdflib png quicktime truetype xml2 xmms xv zlib directfb alsa berkdb slang readline aalib bonobo svga tcltk java mysql X sdl gpm tcpd pam libwww ssl perl python imlib oggvorbis gtk motif opengl cdr acpi acpi4linux apache2 dvd faad fax fbcon imap kerberos maildir md5sum nptl pcmcia php pnp sse tiff usb xml -apm -arts -cups -kde -gnome -libg++ -mikmod -nls -qt -spell -gtkhtml -gdbm -guile -esd"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="-march=pentium3 -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j3"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache buildpkg"
Comment 4 Narada Sage 2003-08-17 10:15:55 UTC
Comment on attachment 16215 [details]
nvidia-kernel.log

>>> Unpacking source...
Creating directory NVIDIA-Linux-x86-1.0-4496-pkg0
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86
1.0-4496.........................................................
 * Linux kernel 2.6.0
 * Applying tasklet patch for kernel 2.[56]...				       
					  [ ok ]
 * Applying NVIDIA_kernel-1.0-4496-tail.diff... 			       
					  [ ok ]
 * Applying NVIDIA_kernel-1.0-4496-Makefile.diff...			       
					  [ ok ]
>>> Source unpacked.
rm -f nv.o os-agp.o os-interface.o os-registry.o  nv-linux.o nv_compiler.h *.d
NVdriver nvidia.o
echo \#define NV_COMPILER \"`gcc -v 2>&1 | tail -n 1`\" > nv_compiler.h
gcc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts
-Wparentheses -Wcast-qual -Wno-multichar  -O -MD -D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DKBUILD_MODNAME="nvidia" -DNTRM -D_GNU_SOURCE
-D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1
-DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=4348  -DNV_UNIX   -DNV_LINUX  
-DNV_INT64_OK	-DNVCPU_X86	 -DREMAP_PAGE_RANGE_5  -I.
-I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default
-Wno-cast-qual nv.c
nv.c: In function `nv_kern_read_agpinfo':
nv.c:1964: structure has no member named `name'
make: *** [nv.o] Error 1

!!! ERROR: media-video/nvidia-kernel-1.0.4496 failed.
!!! Function src_compile, Line 121, Exitcode 2
!!! (no error message)

Calculating dependencies  ...done!
>>> emerge (1 of 1) media-video/nvidia-kernel-1.0.4496 to /
>>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-4496-pkg0.run
Comment 5 Narada Sage 2003-08-17 10:17:42 UTC
Sorry about so many edits.  Since nvidia-kernel failed I wasn't able to get X running so had to use lynx and links2 which made an utter mess of posting this bug report.
Comment 6 John Mylchreest (RETIRED) gentoo-dev 2003-08-17 14:07:30 UTC
this is a well known issue with bk5, and im looking into a solution for it
it isnt only nvidia-kernel effected.

NVIDIA kernel drivers afaik will require changing to work with the new API.
I will look into this asap unless azarah is able to find a fix before i do.
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2003-08-17 14:13:06 UTC
I just looked at the source and it has every right to give that error: It's including from /usr/src/linux/include ! /usr/include/linux, and if we're using 2.6.0-test1+ [the copy I checked] there is indeed no member "name" of a pci_dev C structure which the item asks for.

The code is designed to bypass this [ and usually does in 99.9% of cases ] but bk5- defines CONFIG_PCI_NAMES somewhere.

One line solution: add: #undef CONFIG_PCI_NAMES
                   after: #include "os-agp.h" 
                   in: nv.c

... which should work

Please wait while I merge -bk5
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2003-08-17 14:49:29 UTC
Confimed. This is because of the "Bus Options => PCI Name Database" feature which was dropped sometime in the dev process because of structure changes which is now back. Problem: Instead of using "name", they use "pretty_name" in the source. Because CONFIG_PCI_NAMES is defined, that failsafe part of the NV code thinks to do what it would do to 2.4 [use "name"]. "name" does not exist as this isn't 2.4

Solution #2:

Don't enable that kernel option

Solution #3:

[ Patch the ebuild, I've tested this and it compiles OK ]

--- /home/plasmaroo/backup      2003-08-17 22:44:51.000000000 +0100
+++ nvidia-kernel-1.0.4496.ebuild       2003-08-17 22:49:21.000000000 +0100
@@ -106,6 +106,12 @@
 
                # Kbuild have issues currently (sandbox related).
                ln -snf Makefile.nvidia Makefile
+
+               # Fix 2.6.0-mm5 PCI Name Database problem [plasmaroo]
+               echo /usr/src/linux/.config | grep CONFIG_PCI_NAMES=y > /dev/null
+               if [ $? == 1 ]; then
+                       sed -i 's/NV_PCI_DEVICE_NAME(dev)/dev->pretty_name/' nv.c
+               fi
        fi
 }
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2003-08-22 06:33:13 UTC
In portage