Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408841 - x11-drivers/nvidia-drivers does not compile with linux 3.3
Summary: x11-drivers/nvidia-drivers does not compile with linux 3.3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
: 409061 409093 413475 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-19 10:41 UTC by Sven
Modified: 2012-05-14 20:59 UTC (History)
21 users (show)

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


Attachments
build log (build.log,3.99 KB, text/plain)
2012-03-19 10:42 UTC, Sven
Details
modified nvidia-drivers-295.20-r1.ebuild open for next xorg-server 1.12.0 + 1.13 (nvidia-drivers-295.20-r1.ebuild,17.12 KB, text/plain)
2012-03-19 12:43 UTC, jospezial
Details
patch for nvidia drivers (linux-3.3.patch,550 bytes, patch)
2012-03-19 21:58 UTC, Sven
Details | Diff
patch for ebuild (ebuild.patch,469 bytes, patch)
2012-03-19 21:58 UTC, Sven
Details | Diff
patch for nvidia drivers (linux-3.3.patch,549 bytes, patch)
2012-03-20 08:11 UTC, Sven
Details | Diff
Patch for nvidia-drivers-173.14.31.ebuild (173.patch,569 bytes, patch)
2012-03-24 00:22 UTC, Ingo Kemper
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2012-03-19 10:41:51 UTC
x11-drivers/nvidia-drivers does not compile with linux 3.3

Reproducible: Always
Comment 1 Sven 2012-03-19 10:42:43 UTC
Created attachment 305857 [details]
build log
Comment 2 Marc Burkhardt 2012-03-19 12:23:15 UTC
As of the final release the "256.35-unified-arch.patch" fails to apply as well...
Comment 3 Marc Burkhardt 2012-03-19 12:29:36 UTC
The initial problem can be prevented with this:

pushd /var/tmp/portage/x11-drivers/nvidia-drivers-295.20-r1/work/;
sed -i  's/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include"/CFLAGS="$CFLAGS -I$SOURCES\/arch\/x86\/include -I$SOURCES\/arch\/x86\/include\/generated"/' kernel/conftest.sh;
popd ;
Comment 4 jospezial 2012-03-19 12:43:39 UTC
Created attachment 305869 [details]
modified nvidia-drivers-295.20-r1.ebuild open for next xorg-server 1.12.0 + 1.13

On latest 3.3-rc* kernels you still have to do this before emerge:

cp -av /usr/src/linux/arch/x86/include/generated/asm/*.h /usr/src/linux/arch/x86/include/asm/

for xorg-server 1.12 use my ebuild with your local overlay and run:
ebuild /usr/local/portage/x11-drivers/nvidia-drivers/nvidia-drivers-295.17.ebuild digest

Happy testing!
Comment 5 jospezial 2012-03-19 12:55:41 UTC
> for xorg-server 1.12 use my ebuild with your local overlay and run:
> ebuild
> /usr/local/portage/x11-drivers/nvidia-drivers/nvidia-drivers-295.17.ebuild
> digest
> 
> Happy testing!

corected version

for xorg-server 1.12 use my ebuild with your local overlay and run:
ebuild /usr/local/portage/x11-drivers/nvidia-drivers/nvidia-drivers-295.20-r1.ebuild digest

Happy testing!
Comment 6 Pryka 2012-03-19 19:42:12 UTC
Confirmed on ~amd64
Comment 7 Sven 2012-03-19 21:17:40 UTC
(In reply to comment #4)
> Created attachment 305869 [details]
> modified nvidia-drivers-295.20-r1.ebuild open for next xorg-server 1.12.0 +
> 1.13
> 
> On latest 3.3-rc* kernels you still have to do this before emerge:
> 
> cp -av /usr/src/linux/arch/x86/include/generated/asm/*.h
> /usr/src/linux/arch/x86/include/asm/

Please stop posting stuff that isn't related to the issue. Report abother bug about the xorg-server incompatibility.
Comment 8 Sven 2012-03-19 21:58:27 UTC
Created attachment 305909 [details, diff]
patch for nvidia drivers
Comment 9 Sven 2012-03-19 21:58:41 UTC
Created attachment 305911 [details, diff]
patch for ebuild
Comment 10 Ingo Kemper 2012-03-19 23:34:21 UTC
(In reply to comment #8)
> Created attachment 305909 [details, diff] [details, diff]
> patch for nvidia drivers

The correct location of the generated .h files is $OUTPUT/arch/x86/include/generated. If you use the O= assignment or $KBUILD_OUTPUT, this is important.
Comment 11 Sven 2012-03-20 08:11:34 UTC
Created attachment 305939 [details, diff]
patch for nvidia drivers
Comment 12 Kelly Doran 2012-03-20 19:34:37 UTC
I had the same problem and came up with a similar patch to Sven's, seems to work fine now.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-20 20:57:35 UTC
*** Bug 409061 has been marked as a duplicate of this bug. ***
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-03-21 07:52:41 UTC
*** Bug 409093 has been marked as a duplicate of this bug. ***
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2012-03-21 08:46:13 UTC
+  21 Mar 2012; Samuli Suominen <ssuominen@gentoo.org>
+  nvidia-drivers-295.20-r1.ebuild:
+  Fix building with Linux 3.3.x wrt #408841

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-295.20-r1.ebuild?r1=1.3&r2=1.4
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2012-03-21 08:51:21 UTC
(In reply to comment #10)
> The correct location of the generated .h files is
> $OUTPUT/arch/x86/include/generated. If you use the O= assignment or
> $KBUILD_OUTPUT, this is important.

Missed this comment. Should be fixed now with:

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-295.20-r1.ebuild?r1=1.4&r2=1.5
Comment 17 Tupone Alfredo gentoo-dev 2012-03-23 07:58:11 UTC
Could you please fix the 173 family too? That is affected, too.
Comment 18 Doug Goldstein (RETIRED) gentoo-dev 2012-03-23 15:34:49 UTC
Use nvidia-drivers-295.33
Comment 19 Tupone Alfredo gentoo-dev 2012-03-23 20:38:54 UTC
(In reply to comment #18)
> Use nvidia-drivers-295.33

I have a GeForce FX 5200 :( and is only supported by that family.
Comment 20 Ingo Kemper 2012-03-24 00:22:00 UTC
Created attachment 306477 [details, diff]
Patch for nvidia-drivers-173.14.31.ebuild
Comment 21 Michael Weber (RETIRED) gentoo-dev 2012-03-26 11:19:06 UTC
(In reply to comment #18)
> Use nvidia-drivers-295.33

not an option for users needing 
x11-drivers/nvidia-drivers-96.43.20 and
x11-drivers/nvidia-drivers-173.14.31
Comment 22 Samuli Suominen (RETIRED) gentoo-dev 2012-03-30 14:45:22 UTC
(In reply to comment #21)
> (In reply to comment #18)
> > Use nvidia-drivers-295.33
> 
> not an option for users needing 
> x11-drivers/nvidia-drivers-96.43.20 and
> x11-drivers/nvidia-drivers-173.14.31

Both of these want to downgrade X.org to:

[ebuild     UD ] x11-base/xorg-server-1.10.6 [1.11.4] USE="ipv6 nptl udev xorg xvfb -dmx -doc -kdrive -minimal -static-libs -tslib -xnest" 0 kB

So no, I don't think it's a good idea to try to fix these drivers. If there won't be any NVidia releases for newer X.org ABIs on the older series, 
it's time for users to upgrade into xf86-video-nouveau.

Cardoe, OK for lastriting the older series for being incompatible with recent X.org servers?
Comment 23 Michael Weber (RETIRED) gentoo-dev 2012-03-30 18:53:56 UTC
(In reply to comment #22)

> So no, I don't think it's a good idea to try to fix these drivers. If there
> won't be any NVidia releases for newer X.org ABIs on the older series, 
> it's time for users to upgrade into xf86-video-nouveau.
nouveau is a very poor choise.
> 
> Cardoe, OK for lastriting the older series for being incompatible with
> recent X.org servers?
please don't. Just keep an old xorg-1.10 and these stabled versions.
Comment 24 Samuli Suominen (RETIRED) gentoo-dev 2012-03-30 18:56:33 UTC
(In reply to comment #23)
> please don't. Just keep an old xorg-1.10 and these stabled versions.

That won't be an option because of:

[blocks B      ] <x11-base/xorg-server-1.11.4 ("<x11-base/xorg-server-1.11.4" is blocking x11-libs/gtk+-3.4.0)

As in, new xorg-server is required for new GTK+
Comment 25 Martin Väth 2012-04-02 20:41:17 UTC
(In reply to comment #24)
> As in, new xorg-server is required for new GTK+

So what? Then gtk+-3 will not be available for these users.
This is better than rendering their machines completely useless by
removing their only working X driver. (Nouveau is not an option since it
usually hangs all machines I tested after 1-2 minutes, and vesa framebuffer
is unusable slow if it works at all.)

And it might be that until gtk+-3 is really needed for basic packets
that nvidia finally upgrades their legacy drivers...
Comment 26 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2012-04-10 09:36:25 UTC
295.33 doesn't seem to include the patch for supporting KBUILD_OUTPUT, that was added to 295.20-r1. It breaks when kernel build output is elsewhere.
Comment 27 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2012-04-12 10:52:55 UTC
(In reply to comment #26)
> 295.33 doesn't seem to include the patch for supporting KBUILD_OUTPUT, that
> was added to 295.20-r1. It breaks when kernel build output is elsewhere.

  11 Apr 2012; Doug Goldstein <cardoe@gentoo.org> nvidia-drivers-295.33.ebuild:
  Fix 295.33 for Linux 3.3.x. bug #408841

Thanks, 295.40 also fine.
Comment 28 Samuli Suominen (RETIRED) gentoo-dev 2012-04-25 11:27:50 UTC
*** Bug 413475 has been marked as a duplicate of this bug. ***
Comment 29 Siim Ainsaar 2012-04-26 18:30:57 UTC
http://weltall.heliohost.org/wordpress/2012/01/20/linux-kernel-3-3-rc1-and-nvidia-drivers/ lists two ways of fixing it. Let me quote it.

[Quote]

The first way is fixing the nvidia installer side.

Extract the nvidia installer package with -x as argument passed to the sh package then go in the folder it was extracted to (should be /tmp)

Then go to the kernel sub folder and open the conftest.sh search for

CFLAGS=”$CFLAGS -I$SOURCES/arch/x86/include”  and replace it with CFLAGS=”$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated”

[...]

The second way is hacking a bit the include folders

Go in /lib/modules/<kernelname>/source/arch/x86/include/ and do cp generated/asm/unistd*.h ./asm/

[End of quote]

I haven't tried the first way (although it is more easily automatable), but the second one worked beautifully.
Comment 30 Norman Back 2012-05-12 16:50:57 UTC
Please also update nvidia-drivers-290.10 for those people wishing to use kernel 3.3.X but are stuck at nvidia-drivers-290.10 due to nvidia bug described in http://www.nvnews.net/vbulletin/showthread.php?p=2551948#post2551948
Comment 31 Doug Goldstein (RETIRED) gentoo-dev 2012-05-13 03:04:09 UTC
(In reply to comment #30)
> Please also update nvidia-drivers-290.10 for those people wishing to use
> kernel 3.3.X but are stuck at nvidia-drivers-290.10 due to nvidia bug
> described in
> http://www.nvnews.net/vbulletin/showthread.php?p=2551948#post2551948

No. This leads to an infinite amount of usable combinations. As I tell everyone, find a kernel and driver release that works well on your hardware and stick to it until you want to find a new combination. I am maintaining this on a volunteer basis and only have so much time to dedicate to it so infinite use cases are not something I am interested in. The nvidia drivers only come in binary form so it's impossible to maintain a stable version. 

For Linux 3.3 or newer use 295.33 or newer. Otherwise you must stay at an older kernel release.
Comment 32 Norman Back 2012-05-14 20:59:50 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > Please also update nvidia-drivers-290.10 for those people wishing to use
> > kernel 3.3.X but are stuck at nvidia-drivers-290.10 due to nvidia bug
> > described in
> > http://www.nvnews.net/vbulletin/showthread.php?p=2551948#post2551948
> 
> No. This leads to an infinite amount of usable combinations. As I tell
> everyone, find a kernel and driver release that works well on your hardware
> and stick to it until you want to find a new combination. I am maintaining
> this on a volunteer basis and only have so much time to dedicate to it so
> infinite use cases are not something I am interested in. The nvidia drivers
> only come in binary form so it's impossible to maintain a stable version. 
> 
> For Linux 3.3 or newer use 295.33 or newer. Otherwise you must stay at an
> older kernel release.

OK. I have placed x11-drivers/nvidia-drivers-290.10-r2 in /usr/local/portage and applied the patch. The patched ebuild seems to work OK with 3.3.5. However I found 3.3.5 has performance issues with virtual machines (https://bugzilla.redhat.com/show_bug.cgi?id=806548) so I have reverted to 3.2.16.