Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236605 - x11-drivers/nvidia-drivers-173.14.12 fails to build against 2.6.27_rc5
Summary: x11-drivers/nvidia-drivers-173.14.12 fails to build against 2.6.27_rc5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ricardo Mendoza (RETIRED)
URL:
Whiteboard:
Keywords:
: 242156 250345 (view as bug list)
Depends on:
Blocks: 242708
  Show dependency tree
 
Reported: 2008-09-03 19:20 UTC by Andrew Gaffney (RETIRED)
Modified: 2009-01-15 17:22 UTC (History)
13 users (show)

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


Attachments
nvidia-drivers-173.14.12-r1.ebuild (nvidia-drivers-173.14.12-r1.ebuild,14.79 KB, text/plain)
2008-09-04 20:40 UTC, Attila Fazekas
Details
Build Log (build.log,17.62 KB, text/plain)
2008-11-01 18:09 UTC, Andreas Duering
Details
emerge --info (emerge.info,4.82 KB, text/plain)
2008-11-01 18:18 UTC, Andreas Duering
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaffney (RETIRED) gentoo-dev 2008-09-03 19:20:45 UTC
I'm running a 2.6.27_rc5 kernel on my laptop for the latest ath5k for the wireless chip. The laptop also has nvidia video, so I wanted to use nvidia-drivers. It had other ideas:

In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv.c:14:
/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86_64-173.14.12-pkg2/usr/src/nv/nv-linux.h:107:27: error: asm/semaphore.h: No such file or directory

The only semaphore.h file I found was /usr/src/linux/include/linux/semaphore.h, but the build failed in a more spectacular way when I symlinked that into include/asm/.

You'd said on bug 235736 that you were able to build against a .27 kernel, so I know I'm not in completely uncharted territory :P
Comment 1 Ricardo Mendoza (RETIRED) gentoo-dev 2008-09-04 01:57:41 UTC
The more terrible failure is probably similar to the problems with argument count of on_each_cpu() and it's siblings. This is a known issue because 173.* doesn't explicitly support 2.6.27. For the latest kernel use the beta nvidia drivers ! 177.* branch.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-09-04 02:21:56 UTC
Yes, that was the failure. I unmasked 177.70, and it built fine against my kernel.
Comment 3 Attila Fazekas 2008-09-04 20:40:40 UTC
Created attachment 164614 [details]
nvidia-drivers-173.14.12-r1.ebuild

Use this patch: http://kanotix.com/files/173.14.12/NVIDIA_173.14.12_2.6.27.patch

I have an old NVIDIA card , and I cannot use newer driver.
Comment 4 Attila Fazekas 2008-09-04 20:46:51 UTC
In kernel .config the 
CONFIG_UNUSED_SYMBOLS=y is necessary,

because:
arch/x86/kernel/init_task.c: EXPORT_UNUSED_SYMBOL(init_mm); 
Comment 5 Kevin Bowling 2008-10-14 03:55:34 UTC
The patch and kernel option seem to compile for me, but X still does not find the card.  173.x.x is another legacy release, I cannot use the newer 177.x drivers with this card.
Comment 6 Sven Müller 2008-10-14 21:59:36 UTC
(In reply to comment #3)
> Created an attachment (id=164614) [edit]
> nvidia-drivers-173.14.12-r1.ebuild
> I have an old NVIDIA card , and I cannot use newer driver.
> 
Confirmed. Same here. My Geforce5200fx doesn't work with driver 177 or higher. For me the patch worked. Thx
Comment 7 Kevin Bowling 2008-10-15 16:34:51 UTC
The patch works here as well after recompiling once booting with the changed kernel.
Comment 8 Maciej Blizinski 2008-10-16 06:20:44 UTC
Patch is working with GeForce 9600M GT and vanilla 2.6.27 kernel. Thanks!
Comment 9 Craig Andrews gentoo-dev 2008-10-27 20:21:46 UTC
The patch at least allows the driver to compile. I'll find out if it works later tonight.
Comment 10 Denys Duchier 2008-10-29 00:01:25 UTC
works for me too (GeForce 7900 GTX).  please, please commit this fix.  I actually worked out pretty much the same fix myself before I thought to check here (except for kill_proc, which I wasn't sure how to fix).
Comment 11 Andreas Duering 2008-11-01 18:09:52 UTC
Created attachment 170471 [details]
Build Log

It doesn't really work for me for some strange reason.
It's positive that it compiles (before I used this ebuild the nvidia-drivers couldn't be built against linux-2.6.27-gentoo-r2 kernel).

Build log is attached, do you also need emerge --info?
Comment 12 Andreas Duering 2008-11-01 18:18:52 UTC
Created attachment 170472 [details]
emerge --info

emerge --info

BTW:
I am using a Geforce FX52000
The 177*-drivers doesn't work here, too....
Comment 13 Andreas Duering 2008-11-01 19:05:13 UTC
Error was: I copied the ebuild in the local overlay and copied all NVIDIA*.patch - files from portage-tree into the local overlay.
Seems there was a missing file:

[ -f "${FILESDIR}/nvidia" ] || die "nvidia missing in FILESDIR";
Comment 14 Maciej Blizinski 2008-11-01 19:14:29 UTC
Andreas, it seems to me as if you haven't actually downloaded the patch from kanotix.com.
Comment 15 slynn@granite-mtn.net 2008-11-03 00:36:08 UTC
This patch works for me with GeForce FX Go5200 on laptop for 2.6.27-r2.  Thanks for the work.
Comment 16 Dan Coats 2008-11-06 18:48:46 UTC
works fine, thanks, please commit. 
Comment 17 soya 2008-11-13 22:38:41 UTC
(In reply to comment #16)
> works fine, thanks, please commit. 
> 

Hi, how should the patch be applied? Is it a patch for nvidia drivers or for kernel source? I'm having the samem issue
Comment 18 Maciej Blizinski 2008-11-14 07:08:29 UTC
The patch (NVIDIA_173.14.12_2.6.27.patch) should be put in the 'files' directory, like: ${your_overlay}/x11-drivers/nvidia-drivers/files/
Comment 19 soya 2008-11-14 10:14:36 UTC
(In reply to comment #18)
> The patch (NVIDIA_173.14.12_2.6.27.patch) should be put in the 'files'
> directory, like: ${your_overlay}/x11-drivers/nvidia-drivers/files/
> 
Thanks a lot for the answer. ;)
Comment 20 fuzion 2008-11-25 02:40:27 UTC
I vote for this one as well. Gentoo is ideal for older hardware (like Geforce FX 5200 that I'm using). Having to patch nvidia-drivers manually is becoming a pain in the neck. It's almost worth switching distributions for. The patch works perfectly, why not make it mainstream? 

Now I'm using this patch:
http://kanotix.com/files/173.14.12/NVIDIA_173.14.12_2.6.27.patch

I followed these steps hoping to make it stick:
http://74.125.95.132/search?q=cache:LCU2bSpQaNgJ:da.gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild+howto+patch+ebuild&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a
Thank heavens for Google Cache! It used to be here:
http://da.gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild
but that URL is no longer working.
Comment 21 Daniel Drake (RETIRED) gentoo-dev 2008-12-02 20:22:03 UTC
Patch looks OK except for the very last hunk

@@ -704,7 +708,9 @@
     U032 sig
 )
 {
+    #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
     return kill_proc(pid, sig, 1) ? RM_ERR_OPERATING_SYSTEM : RM_OK;
+    #endif
 }

I haven't looked at the actual source file, but from the context available it looks like the whole function is being removed, resulting in an undefined value being returned. This would probably cause problems down the line.
Comment 22 Daniel Drake (RETIRED) gentoo-dev 2008-12-09 21:14:17 UTC
Reminder to maintainers: 2.6.27 is planned to go stable on December 15th, it would be great if you could work on this before then
Comment 23 Kevin Bowling 2008-12-10 04:54:42 UTC
*** Bug 250345 has been marked as a duplicate of this bug. ***
Comment 24 Michele Schiavo 2008-12-10 19:41:02 UTC
it's works good on me.
emerge nvidia-drivers -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-drivers/nvidia-drivers-173.14.12-r1  USE="acpi gtk (multilib) -custom-cflags" 16,402 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 16,402 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage
speriment ~ # emerge --info
Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.7-r2, 2.6.27-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.27-gentoo-r5 x86_64 Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz
Timestamp of tree: Wed, 10 Dec 2008 19:02:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -mtune=core2 -march=core2 -pipe -fomit-frame-pointer -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=core2 -march=core2 -pipe -fomit-frame-pointer -msse4.1"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg_ collision-protect distcc distlocks maketest metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it it_IT en en_US en_GB es es_ES"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="16bit 64bit X X509 a52 aac aalib acl acpi aiglx aim alsa amd64 amr amrnb amrwb apache2 apm applet audiofile avi bash-completion berkdb bidi bitmap-fonts bittorrent bluetooth bonobo branding browserplugin bzip2 cairo caps cdda cddb cdio cdparanoia cdr cgi chroot cli cracklib crypt css ctype cups curl dbus dc1394 deskbar divx dlloader dri dts dv dvb dvd dvdr dvdread dvi dynamic eds em emboss emovix enca encode esd ethereal evo evolution exif expat faillog fam fame fbsplash ffmpeg firefox flac flash fontconfig foomaticdb fortran fping freetds freetype ftp gaim gcc4 gd gdbm gdm gedit gencertdaily geoip gif gimp gimpprint glitz glut gmail gmedia gmp gno gnome gnome-keyring gnutls gpac gphoto2 gpm gsf gsm gstreamer gtk gtk2 gtkhtml guile hal hash hddtemp howl iconv id3tag idea idn ieee1394 imagemagick imap imlib ipod isdnlog ithreads java jpeg kerberos lame lcms libcaca libclamav libedit libnotify libwww live lm_sensors logrotate logwatch lzo lzw lzw-tiff mad maildir maildrop matroska md5sum mhash midi mikmod mime ming mjpeg mmx mmxext mng mono motif mozilla mozsvg mp2 mp3 mpeg mplayer mpm-prefork msn mudflap multilib musepack musicbrainz mysql nautilus ncurses nemesei network networking new-login nfs ng nls nptl nptlonly nsplugin nvidia obex offensive ogg oggvorbis openal opengl openmp opensslcrypt optimisememory pam pcre pdf pdflib perl php pidgin png pnm pop posix ppds pppd prediction python qmail qt3support quicktime quotas radio readline realmedia recode reflection regex remote rtc samba scanner sdl sensord server session simplexml skins slang smp sms sndfile sni sound sox spamassassin speex spell spl sqlite srt sse sse2 sse3 ssl ssse2 ssse3 startup-notification stream subtitles svg symlink sysfs syslog tcltk tcpd teletext templates tetex theora threads threadsafe tiff tivo toolbar tools tracker truetype truetype-fonts twolame type1-fonts udev unicode upnp usb v4l v4l2 vcd vhosts vim-syntax vlm vorbis wavpack wifi wmf wmp wxgtk1 wxwindows x264 xanim xcomposite xml xml2 xmlreader xmlwriter xorg xpm xscreensaver xv xvid xvmc zip zlib" ALSA_CARDS="intel8x0 usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="spca50x" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="it it_IT en en_US en_GB es es_ES" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 25 Doug Goldstein (RETIRED) gentoo-dev 2008-12-18 21:03:24 UTC
*** Bug 242156 has been marked as a duplicate of this bug. ***
Comment 26 Ricardo Mendoza (RETIRED) gentoo-dev 2008-12-19 01:47:38 UTC
173.14.15 has been added to the tree, sorry for the delays, mad busy.
Comment 27 Kevin Bowling 2009-01-15 14:48:52 UTC
The bump is working fine here, shouldn't this bug be closed, or are you waiting for x86/amd64 teams to stabilize?  [they should probably be notified in that case..]