Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 48030

Summary: nVidia module breaks in 2.6.6_rc1 requires linked patch
Product: Gentoo Linux Reporter: Andrew Bevitt <andrewbevitt>
Component: New packagesAssignee: x86-kernel (DEPRECATED) <x86-kernel>
Status: VERIFIED TEST-REQUEST    
Severity: major CC: aalmenar, carlos, centic, dick, dsd, greg_g, pez, radek, x11
Priority: High    
Version: unspecified   
Hardware: x86   
OS: All   
URL: http://forums.gentoo.org/viewtopic.php?t=161788
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: nvidia-kernel-1.0.5336-r3.ebuild
nvidia-kernel-1.0.5336-r3.diff
nvidia-kernel-1.0.5336-r3.ebuild #2 (using addwrite)
nvidia-kernel-1.0.5336-r3.ebuild #2 (using M="${S}")
nvidia-kernel-1.0.5336-r3.ebuild #3 (using addwrite)
nvidia-kernel-1.0.5336-r3.ebuild #3 (using M="${S}")

Description Andrew Bevitt 2004-04-16 04:03:27 UTC
nvidia-kernels' nvidia.o module will not load into development-sources-2.6.6_rc1 can the following patch be applied to these sources so this works. Have tested, patch applies cleanly and solution works.

__this-module breaks because it was moved out of modules in this kernel sometime.

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm4/broken-out/move-__this_module-to-modpost.patch

See http://forums.gentoo.org/viewtopic.php?t=161788 for thread on solution.
Comment 1 Tony Murray 2004-04-16 13:29:05 UTC
This patch made it into 2.6.6-rc1.  It breaks the nvidia kernel module.

So the solution is to reverse this patch, not apply it. 

Or fix nvidia-kernel...
Comment 2 BonezTheGoon 2004-04-19 09:10:37 UTC
It looks like from this thread http://www.nvnews.net/vbulletin/showthread.php?s=9291d46e52a2029dc894b20084892899&t=27557
that the 1.0-5341 drivers from nVidia fix this issue.  I will attempt to test this evening and will post results here.  Also I will file a bug report to have an ebuild made for the new driver.

Regards,
BonezTheGoon
Comment 3 Derk W te Bokkel 2004-04-23 11:40:50 UTC
I've mucked with version 5341 of the drivers (modified ebuild and patches from 5336-r2) it works with 2.6.6-r1 provided you revert the 

move-__this_module-to-modpost.patch

it does not work with 2.6.6-r2 no matter what I do .. reverting the patch on it fails using 4K or 8K makes no difference and the use register parameters are not set. 

although I've seen BonezTheGoon report it works .. I'm wondering what he did to make it so..
Comment 4 Adrian Almenar 2004-04-23 11:52:58 UTC
Today this raised on lkml:
From: Antony Suter <suterant@users.sourceforge.net
-----------------------------
By default, my distro was using the make file "makefile" and it
stopped working. I switched to using "Makefile.kbuild", which is
oriented to 2.6 kernels, and it works again. Comments within
Makefile.kbuild touch on changes to module handling in 2.6 compared to
2.4.
-----------------------------
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2004-04-28 11:12:39 UTC
Created attachment 30261 [details]
nvidia-kernel-1.0.5336-r3.ebuild

Ok. This ebuild now uses the .kbuild file supplied with the nvidia driver
rather than our own from files/. It apparently no longer has sandbox issues.

Also had to make a few other changes to make it work. I'll post a diff in a
second.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2004-04-28 11:13:40 UTC
Oops. I should add that the purpose of this whole thing is that you don't need to revert out the move-__this_module patch, this ebuild works out of the box. At least it does for me :)
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2004-04-28 11:15:43 UTC
Created attachment 30262 [details, diff]
nvidia-kernel-1.0.5336-r3.diff

Here's the damage which I've caused over the -r2 ebuild :)
Comment 8 Jason Cox (RETIRED) gentoo-dev 2004-04-28 11:44:59 UTC
I just tested this ebuild. I had to put revert the move-__this_module-to-modpost patch again.
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2004-04-28 15:21:49 UTC
Another tester reports sandbox errors on compile... Seems like the kbuild wanted to read/write to /usr/src/linux/.__modpost.cmd
Does anyone know of any modules that by default want to compile themselves in the kernel tree (like this kbuild does) - and if so, how have they got around the sandboxing issues?
Comment 10 Derk W te Bokkel 2004-04-28 18:04:18 UTC
yup sand box errors and one other thing it wants the correct kernel version running too .. I built the  '2.6.6-rc2' and had /usr/src/linux pointing to it. but the ebuild looked at the running version for the source  2.6.6-rc1 a reboot fixed that then using FEATURES="-sandbox -userpriv -usersandbox" allowed the compile to finish and install .. runs fine now with 2.6.6_rc2 now.

by the way this was done not with 5336-r3 but the build renamed to nvidia-kernel-5341-r3 as I already had that running. I suspect it should work as advertised for 5336-r3 with the same issues.
Comment 11 Derk W te Bokkel 2004-04-28 23:58:20 UTC
also move_.. etc. patch reversing was not required.
Comment 12 Andrew Bevitt 2004-04-29 02:29:21 UTC
The sandbox issue is totally related to the idea that Modules should be built outside the kernel source directory (even the kernel build should not write to /usr/src/linux, but some other location). Latexer and johnm were working on this before, it actually works in the most recent development sources.

However you cannot just call make module, you need to do something like
make IGNORE_CC_MISMATCH="yes" K="/usr/src/linux" M="/path/to/build/under"

M in our case should really be ${S}, well most of the time anyway.

I havent had too much time to test the 5431 release or 2.6.6-rc2 but I shall be doing so over the course of this evening. Progress to follow.
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2004-04-29 02:56:05 UTC
Thanks for the compiling tips. I did suspect sandboxing problems, but as it worked for me without having to take off sandbox, I decided to post it.

I have spoken to latexer, and his koutput work seems to combat this exact problem. The thing is, I see the problem in the short time: 2.6.6 will be out today or tomorrow, and we don't currently provide an nvidia module which will work with it.

If you download the nvidia package and run it independantly, apparently it will install a working module (I say apparently because I haven't tried it, this is just what a user told me). If we turn off sandboxing, the ebuild I posted appears to work (just not for Jason!). So we are close.

I also tested with 5341, with exactly the same results. Bumping the existing -r2 ebuild brings up the same problem (Invalid module format), using an ebuild like the -r3 one I posted works.

Are you saying that using these additional make parameters, we will avoid all sandboxing problems? If so, I think that is the short term solution we are looking for.
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2004-04-29 03:57:03 UTC
Hmm - take a look in /usr/portage/net-fs/shfs/shfs-0.32-e1.ebuild

They seem to have a similar scenario - they have to fixup $ARCH, but they also have to do some building in the kernel directory.

That ebuild simply uses "addwrite" on the kernel source directory, a quick grep through /usr/portage shows other ebuilds are using that approach too. Shall we settle for this?
Comment 15 Andrew Bevitt 2004-04-29 06:04:00 UTC
Allright, seen as though the patch has entered into linus' tree we have very few options at the moment. With the new 2.6.6 kernels comes the ability to specify M="/path" which builds all objects under /path, however it is unrealistic to expect users to upgrade to 2.6.6 when released just to use nvidia drivers.

Further more the M= feature requires some kmod eclass changes, and hence kernel ebuild modifications, to interact with sys-kernel/config-kernel more correctly. However this is not going to be ready for 2.6.6.

XFree devs basically the thinking goes that unless you strongly object we are going to migrate over to using the kbuild makefile (as it works without the kernel patch being reversed), and add addwrite /usr/src/linux so sandbox does not kill the build process.

I would really love a better way to do this, short of blocking nvidia-kernel with 2.6.6, or similar restrictive measures, however I do not have one.
Comment 16 Andrew Bevitt 2004-04-29 06:22:58 UTC
Sorry one extra possibility would be to provide a extra check specifically for 2.6.6 and then use the M= fucntionality where M="${S}" (This _should_ work but would need to be tested, im dubious about using an unproven system in the live tree).
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2004-04-29 08:20:05 UTC
If you're going to add /usr/src/linux to sandbox, you need to print an ewarn about that before the build starts.
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2004-04-29 10:03:34 UTC
Created attachment 30322 [details]
nvidia-kernel-1.0.5336-r3.ebuild #2 (using addwrite)

Ok, this ebuild is like the first but a little cleaner. It uses addwrite to
avoid sandbox issues, and prints a warning first (thanks spyderous).
I'll take cyfreds idea from #16 and produce another ebuild for that in a few
minutes.
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2004-04-29 10:59:36 UTC
Created attachment 30331 [details]
nvidia-kernel-1.0.5336-r3.ebuild #2 (using M="${S}")

This ebuild is the alternative approach - it will build as it used to, unless 
built on 2.6.6 or newer. In this case, it will use the new M="..." parameter to
make, in order to build the module in the workdir (this kills any sandboxing
issues).

Either of these last ebuilds 2 will solve the problem.
To reiterate, the problem is: 2.6.6 contains a patch which breaks the nvidia
drivers (build is ok, but the module doesnt load), unless they are built using
the newer Makefiles. As 2.6.6 is coming out probably tomorrow, we should get
this fixed up ASAP.

Personally, I think the M="{S}" is the *better* solution (until koutput is
ready), but it would require more testing. Given the very short timeframe that
we have here, I'd push for going for the more simplistic "addwrite" ebuild for
now.

Please choose and commit ASAP :)
Comment 20 Derk W te Bokkel 2004-05-03 10:52:34 UTC
OK ebuild in comment # 19 works provided you have rebooted into your new kernel .. same issues for the one in comment #18 needs to be running in the new kernel .. this is not how it has worked in the past .. both ebuild styles fail until after a reboot into a new kernel..  

The current ebuilds allow you to just change where /usr/src/linux points and it picks off the correct location .. these new ebuilds don't do that and thus require the reboot ..

Either change the build to work the old way with respect to finding the correct source tree using /usr/src/linux or warn the user to reboot into the new kernel prior to emergeing the nvidia-kernel drivers

Comment 21 Derk W te Bokkel 2004-05-03 11:31:04 UTC
additional weirdness .. if you have two very closely related kernels such as 
development-sources-2.6.6_rc3 (running) and mm-sources-2.6.6_rc3-r1 (new kernel pointed at by /usr/src/linux) 
then  the nvidia-kernel module will seem to compile but .. it will load on reboot but X will fail to run .. 
because it got compiled against the running kernel instead of where you thought it did .. 
with the ebuild version used in Comment # 18 .. 
you have to modprobe -r nvidia and then re-emerge nvidia-kernel with the desired kernel running ..
Comment 22 Daniel Drake (RETIRED) gentoo-dev 2004-05-03 11:54:56 UTC
Created attachment 30627 [details]
nvidia-kernel-1.0.5336-r3.ebuild #3 (using addwrite)

Updated addwrite ebuild, solves the issue described in comment #20 by using the
SYSSRC parameter with make (the nvidia kbuild makefile listens to this)
Comment 23 Daniel Drake (RETIRED) gentoo-dev 2004-05-03 11:58:59 UTC
Created attachment 30628 [details]
nvidia-kernel-1.0.5336-r3.ebuild #3 (using M="${S}")

Updated M="${S}" ebuild, solves the issue described in comment #20 by using the

SYSSRC parameter with make (the nvidia kbuild makefile listens to this)
Comment 24 Derk W te Bokkel 2004-05-03 12:54:09 UTC
works fine now .. both versions
Comment 25 John Earl 2004-05-03 15:38:41 UTC
I ran into this problem and have tried the ebuild in comment number 20, it errors out for me with

open_wr:   /usr/src/linux-2.6.6-rc1/.__modpost.cmd

Should I be doing something special in order to get the "M=${S}" trick to work?
Comment 26 John Earl 2004-05-03 15:40:31 UTC
Sorry meant to say comment #23
Comment 27 Daniel Drake (RETIRED) gentoo-dev 2004-05-04 01:45:54 UTC
Hmm.. It looks like the newer kbuild stuff was not present in 2.6.6-rc1
If you retest using -rc2 or -rc3 you should not have this problem. And you don't need to do anything special to get the M= bit to take effect.

Xfree guys, are you happy to accept the driver like this, or should I add in the extra check for -rc1 with the M="${S}" ebuild?
Comment 28 Andrew Bevitt 2004-05-04 03:38:59 UTC
Um 2.6.6_rc1 here has the kbuild support.

Can we wait until 2.6.6 final is released before adding this support?

Id like to also consolidate the processes so there is only one ebuild.
Comment 29 Derk W te Bokkel 2004-05-06 13:53:37 UTC
note / fyi dispite all claims to the contrary nividia driver verison 5341 does not appear to be a 4K stack driver .. as I found out when trying to use it with mm-sources-2.6.6_rc3-r2  (cobbled together my own ebuild) which has the 4K stack permanently selected .. hard patched no toggle in the make file .. nvidia 5341 module seg faults and will not load  .. 5336 nvidia module loads and  hard locks the machine when starting X ..

you have been warned .. now will nvidia now release a working 4K stack driver or will all us nvidia users have to stay at mm-sources-2.6.6_rc3-r1 or below
Comment 30 Derk W te Bokkel 2004-05-10 12:31:52 UTC
okay my converted 5336 to 5341 version of these drivers works with development-sources-2.6.6 and win4lin-sources-2.6.6 (my own modified ebuild) provided 8k kernel stack is selected.

Does not work with mm-sources-2.6.6-mm1, compiles okay but does not load seg faults .. you see the turtle .. oh dear me .. ;^)
Comment 31 Norberto Bensa 2004-05-10 12:45:57 UTC
same here with 5341. I don't care, it's not official. Kill it.

5336 works ok with 2.6.6-mm1 (4k-stacks reverted.)
Comment 32 Alexander Jenisch 2004-05-10 15:37:57 UTC
i've recently tried 2.6.6-mm1 + 5336. it doesn't work. wether with 8k nor with 4k stack size.
Comment 33 Alexander Jenisch 2004-05-10 16:04:20 UTC
sorry, just found out, that i used the wrong kernel. i had no luck switching 4k-stacks in 2.6.6-mm1, is there no option? the nvidia module will work ok, but starting X will result in a deadlock.
Comment 34 Andrew Bevitt 2004-05-10 19:15:23 UTC
Allright 2.6.6 has been released, so im going to update my kernel to that system and test the ebuild I have cobled together out of the two posted here AND the kmod.eclass.

I'm not putting into the mirrors though until I have tested all permutations of usage.. that is
1) 2.6.6 Kernel -> Kouput
2) 2.6.6 Kernel with SYSSRC_OUPUT set -> Koutput 
3) 2.6.5 Kernel -> addwrite

2.4 Kernels should still work as they use the .nvidia makefile and a working unmodified build process.

Please be patient this should go into the tree in a few hours.
Comment 35 Andrew Bevitt 2004-05-10 20:33:46 UTC
OK the ebuild just went into CVS as nvidia-kernel-5336-r3

Changing to TEST REQUEST Please test this ebuild with your kernel and comment. If no one has any problems then we can close the bug.
Comment 36 Alexander Jenisch 2004-05-11 02:29:58 UTC
i guess it will not work with 2.6.6-mm1, because there's no way to set the 4k/8k-stacks.
Comment 37 Andrew Bevitt 2004-05-11 02:43:10 UTC
Not if 4K stacks are selected and non-configurable no.

I understand Andrews' point in forcing this issue, but I dont feel nVidia is going to roll out a driver just because the kernel team decided it didnt want an option. Big business doesnt quite work that way.
Comment 38 younker 2004-05-11 05:05:21 UTC
emerge nvidia-kernel-1.0.5336-r3 on linux 2.6.6 with gcc 3.4, failed,here is the error message:

rm -f -f nv.o os-agp.o os-interface.o os-registry.o nv.o os-agp.o os-interface.o os-registry.o nvidia.mod.o
rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
make[1]: Entering directory `/usr/src/linux-2.6.6'
echo \#define NV_COMPILER \"`gcc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv_compiler.h
  CC [M]  /var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.o
In file included from include/linux/list.h:7,
                 from include/linux/wait.h:14,
                 from include/asm/semaphore.h:41,
                 from include/linux/sched.h:18,
                 from include/linux/module.h:10,
                 from /var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv-linux.h:52,
                 from /var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:14:
include/linux/prefetch.h: In function `prefetch_range':
include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithmetic
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: In function `nvos_malloc_pages':
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:389: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: In function `nvos_create_alloc':
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:517: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:527: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: At top level:
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:1207: warning: initialization from incompatible pointer type
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: In function `nv_alloc_file_private':
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:1215: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:1226: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: In function `nv_kern_open':
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:1287: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: In function `nv_kern_ctl_open':
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:1936: warning: use of cast expressions as lvalues is deprecated
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c: At top level:
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2032: error: conflicting types for 'nv_set_hotkey_occurred_flag'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:350: error: previous declaration of 'nv_set_hotkey_occurred_flag' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2032: error: conflicting types for 'nv_set_hotkey_occurred_flag'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:350: error: previous declaration of 'nv_set_hotkey_occurred_flag' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2219: error: conflicting types for 'nv_find_nv_mapping'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:339: error: previous declaration of 'nv_find_nv_mapping' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2219: error: conflicting types for 'nv_find_nv_mapping'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:339: error: previous declaration of 'nv_find_nv_mapping' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2291: error: conflicting types for 'nv_find_agp_kernel_mapping'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:341: error: previous declaration of 'nv_find_agp_kernel_mapping' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2291: error: conflicting types for 'nv_find_agp_kernel_mapping'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:341: error: previous declaration of 'nv_find_agp_kernel_mapping' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2367: error: conflicting types for 'nv_get_kern_phys_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:342: error: previous declaration of 'nv_get_kern_phys_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2367: error: conflicting types for 'nv_get_kern_phys_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:342: error: previous declaration of 'nv_get_kern_phys_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2397: error: conflicting types for 'nv_get_user_phys_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:343: error: previous declaration of 'nv_get_user_phys_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2397: error: conflicting types for 'nv_get_user_phys_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:343: error: previous declaration of 'nv_get_user_phys_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2428: error: conflicting types for 'nv_alloc_pages'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:353: error: previous declaration of 'nv_alloc_pages' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2428: error: conflicting types for 'nv_alloc_pages'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:353: error: previous declaration of 'nv_alloc_pages' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2616: error: conflicting types for 'nv_free_pages'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:354: error: previous declaration of 'nv_free_pages' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2616: error: conflicting types for 'nv_free_pages'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:354: error: previous declaration of 'nv_free_pages' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2714: error: conflicting types for 'nv_lock_rm'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:345: error: previous declaration of 'nv_lock_rm' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2714: error: conflicting types for 'nv_lock_rm'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:345: error: previous declaration of 'nv_lock_rm' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2734: error: conflicting types for 'nv_unlock_rm'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:346: error: previous declaration of 'nv_unlock_rm' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2734: error: conflicting types for 'nv_unlock_rm'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:346: error: previous declaration of 'nv_unlock_rm' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2748: error: conflicting types for 'nv_lock_heap'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:347: error: previous declaration of 'nv_lock_heap' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2748: error: conflicting types for 'nv_lock_heap'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:347: error: previous declaration of 'nv_lock_heap' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2758: error: conflicting types for 'nv_unlock_heap'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:348: error: previous declaration of 'nv_unlock_heap' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2758: error: conflicting types for 'nv_unlock_heap'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:348: error: previous declaration of 'nv_unlock_heap' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2774: error: conflicting types for 'nv_post_event'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:363: error: previous declaration of 'nv_post_event' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2774: error: conflicting types for 'nv_post_event'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:363: error: previous declaration of 'nv_post_event' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2812: error: conflicting types for 'nv_get_event'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:364: error: previous declaration of 'nv_get_event' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2812: error: conflicting types for 'nv_get_event'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:364: error: previous declaration of 'nv_get_event' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2855: error: conflicting types for 'nv_agp_init'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:356: error: previous declaration of 'nv_agp_init' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2855: error: conflicting types for 'nv_agp_init'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:356: error: previous declaration of 'nv_agp_init' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2917: error: conflicting types for 'nv_agp_teardown'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:357: error: previous declaration of 'nv_agp_teardown' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2917: error: conflicting types for 'nv_agp_teardown'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:357: error: previous declaration of 'nv_agp_teardown' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2958: error: conflicting types for 'nv_agp_translate_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:358: error: previous declaration of 'nv_agp_translate_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2958: error: conflicting types for 'nv_agp_translate_address'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:358: error: previous declaration of 'nv_agp_translate_address' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2990: error: conflicting types for 'nv_int10h_call'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:351: error: previous declaration of 'nv_int10h_call' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2990: error: conflicting types for 'nv_int10h_call'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:351: error: previous declaration of 'nv_int10h_call' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2999: error: conflicting types for 'nv_start_rc_timer'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:360: error: previous declaration of 'nv_start_rc_timer' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:2999: error: conflicting types for 'nv_start_rc_timer'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:360: error: previous declaration of 'nv_start_rc_timer' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:3020: error: conflicting types for 'nv_stop_rc_timer'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:361: error: previous declaration of 'nv_stop_rc_timer' was here
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c:3020: error: conflicting types for 'nv_stop_rc_timer'
/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.h:361: error: previous declaration of 'nv_stop_rc_timer' was here
make[2]: *** [/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.o] ?? 1
make[1]: *** [/var/tmp/portage/nvidia-kernel-1.0.5336-r3/work/NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.6'
nvidia.ko failed to build!
make: *** [module] Error 1
Comment 39 Andrew Bevitt 2004-05-11 17:58:31 UTC
I cant reproduce that with gcc-3.4.0-r1 are you using this version or the gcc-3.4.0 version. Please try -r1 if you are not using it.

If thats the build you're using please open a different bug. I specifically want this one for testing with GCC 3.3.3 (or lower as 3.4 is still masked).
Comment 40 Daniel Drake (RETIRED) gentoo-dev 2004-05-16 06:57:15 UTC
Ebuild works fine with 2.6.6 and 2.6.6-mm2 for me.
Comment 41 Norberto Bensa 2004-05-18 10:08:30 UTC
-r3 as it is in portage, fixes it. I'm removing myself from this bug.
Comment 42 Zack Pearsall 2004-05-20 13:24:02 UTC
nvidia-kernel-1.0.5336-r3 ebuild works for me with kernel 2.6.6 and gcc-3.3.2-r5
Comment 43 Andrew Bevitt 2004-05-21 07:20:37 UTC
Closing.

Solution appears feasible.