Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558028 - x11-drivers/nvidia-drivers-340.76 does not build on sys-kernel/gentoo-sources-3.18.19; build on 3.18.16-gentoo
Summary: x11-drivers/nvidia-drivers-340.76 does not build on sys-kernel/gentoo-sources...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-17 16:59 UTC by Roman Gruber
Modified: 2017-09-23 05:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Gruber 2015-08-17 16:59:54 UTC
Last known gentoo-sources which work with this legacy supported nvidia-binary-driver blob. Box is up to date, synced today!

Linux localhost 3.18.16-gentoo_2015_07_08 #3 SMP PREEMPT Wed Jul 8 17:07:05 CEST 2015 x86_64 Intel(R) Core(TM)2 Duo CPU T9500 @ 2.60GHz GenuineIntel GNU/Linux

 Kernel.org long term supported kernel is 3.18. others run out of support quite recently according kernel.org. so please support 3.18

Not working kernel: qlist -Iv gentoo-sourc
sys-kernel/gentoo-sources-3.18.19

wgetpaste /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/temp/build.log 
Your paste can be seen here: https://bpaste.net/show/ac66ea61f1b8

wgetpaste /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/temp/environment
Your paste can be seen here: https://bpaste.net/show/1c6dcea31a5c

emerge --info '=x11-drivers/nvidia-drivers-340.76::gentoo'
Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 3.18.16-gentoo_2015_07_08 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.16-gentoo_2015_07_08-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9500_@_2.60GHz-with-gentoo-2.2
KiB Mem:     4045392 total,   1932852 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 17 Aug 2015 14:15:01 +0000
sh bash 4.3_p39
ld GNU gold (Gentoo 2.25.1 p1.0 2.25.1) 1.11
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1::gentoo
sys-devel/gcc:            4.4.7::gentoo, 4.5.4::gentoo, 4.6.4::gentoo, 4.7.4::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/mnt/sdb2/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://ftp.first-world.info/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://mirror.netcologne.de/gentoo/  ftp://ftp.vectranet.pl/gentoo/ http://distfiles.gentoo.org/   ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://distro.ibiblio.org/pub/Linux/distributions/gentoo/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://mirror.switch.ch/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo"
LANG="en"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="64bit 7zip S3TC X X509 a52 aac aacplus aalib acpi aimodules alsa amd64 amr amrnb amrwb ao apm apng archive ares aspell assistant atmo audacious audiofile automount autotrace avx bash-completion battstat berkdb bidi binfilter bittorrent bl blender-game boo btrfs bzip2 cairo caja cdda cddax cddb cdio cdparanoia cdr cdrom chm cilk cli clutter clvm consolekit contrast coverage cpufreq_bench cpuload cracklib crypt cryptsetup ctypes-python cups curl custom-optimization cxx dane dbus dc1394 declarative device-mapper devil dga dhcpcd dia dirac directfb djvu dmraid dos dri dts dv dvd dvdr edd emboss emf emovix enca encode epiphany equalizer ewf exif expat extras faac faad fam fat fbcon ffmpeg fftw firefox fits flac flash flickr flite floppy fluidsynth fontconfig fortran fpx ftp fts3 g3dvl gadu gcj gconf gd gdbm gdk-pixbuf gdm ggi gif gimp git gjs glade gles2 glut gmp gmplayer gnutls gold gost gpg gpm graphite graphviz grilo groovy groupwise gs gsm gtk gtk3 gucharmap guile gzip-el hddtemp hdri hfs hotpixels http iconv icu id3 id3tag idn ieee1394 imagemagick imlib imlib2 inkjar inotify introspection ipp ipv6 irrlicht jabber jack java javascript jbig jfs jit joystick jpeg jpeg2k krb4 ladspa lame lapack lasi lcdfilter lcms lensfun libass libcaca libev libevent libffi libkms libnl libssh2 libsysfs libv4l libv4l2 libvisual live lm_sensors lqr lua lvm lvm2 lxde lximage lzma lzo mad mapimg matroska md5sum md5sum-external mdadm mdev meanwhile mercurial midi mikmod minizip mjpeg mms mmx mmxext mng mod modpack modplug modules mono moonlight motif mp3 mp4 mpd mpeg mpeg2 mpeg3 mpfi mplayer mtp multicore multilib multimedia musepack mxit mysql nas nautilus ncurses networking nntp nptl nsplugin ntfs ntfsdecrypt ntfsprogs nut nuv nvcontrol nvidia ogg ogre ois openal opencore-amr openexr opengl openmp openrc openssl optimisememory optimized-qmake opus orbit osc osmesa oss pam pango pcre pdf pdfimport perl pipelight pkcs11 plotutils png pnm policykit postproc postscript ppds pptx prediction pulseaudio pvr python quicktime quvi radio rar raw rdoc readline realtime redland reiser4 reiserfs resolvconf rle rrdcgi rtmp rtsp ruby sasl schroedinger script sdl sdl-image sdlgfx secure-delete sensors session sha1 shine shout silc sip skype smi smp smpeg sndfile sound soundex soundtouch sox speex spell spoof-source sql sqlite sse sse2 sse2_4way sse2check sse3 sse4 sse4_1 ssl ssse3 staging startup-notification stream subversion svg sync-plugin-portage sysstat system-sqlite systemtap taglib tcl tcpd templates theora threads tiff tk tonal toolkit-scroll-bars truetype twolame udev udisks unicode unlock-notify upcall upower usb uvm v4l v4l2 vaapi vamp vcd vcdinfo vcdx vdpau vhook vlc vlm vorbis vpx wacom wav wavpack weather-metar weather-xoap webp websockets wifi wikipedia winbind wireshark wma wma-fixed wmf x264 x265 xanim xattr xcb xcomposite xfs xft xinerama xml xmlpatterns xmp xnest xosd xpm xps xpsmall xscreensaver xv xvfb xvid yuv4mpeg yv12 zephyr zlib zsh-completion zvbi" ABI_X86="32 64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics keyboard mouse wacom joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

x11-drivers/nvidia-drivers-340.76::gentoo was built with the following:
USE="X acpi multilib tools uvm -pax_kernel" ABI_X86="64"


emerge -pqv '=x11-drivers/nvidia-drivers-340.76::gentoo'
[ebuild   R   ] x11-drivers/nvidia-drivers-340.76  USE="X acpi multilib tools uvm -pax_kernel" 



Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2015-08-19 21:20:48 UTC
Please attach your build log; we don't accept pastebin links. Thanks!
Comment 2 Roman Gruber 2015-08-22 21:35:43 UTC
Solved

Knight roman # glxinfo |grep Yes
direct rendering: Yes
Knight roman # uname -a
Linux Knight 4.1.6-gentoo_08_22_2015 #1 SMP PREEMPT Sat Aug 22 23:18:22 CEST 2015 x86_64 Intel(R) Core(TM)2 Duo CPU T9500 @ 2.60GHz GenuineIntel GNU/Linux
Knight roman # cat /etc/portage/patches/x11-drivers/nvidia-drivers-340.76/nvidia-drivers-340-76-kernel-4.0.patch 
--- a/kernel/nv-pat.c.orig     2015-02-20 02:49:40.000000000 +0100
+++ b/kernel/nv-pat.c  2015-02-25 07:56:40.000000000 +0100
@@ -35,8 +35,13 @@
     unsigned long cr0 = read_cr0();
     write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
     wbinvd();
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
     *cr4 = read_cr4();
     if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
+#else
+    *cr4 = __read_cr4();
+    if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
+#endif
     __flush_tlb();
 }
 
@@ -46,7 +51,11 @@
     wbinvd();
     __flush_tlb();
     write_cr0((cr0 & 0x9fffffff));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
     if (cr4 & 0x80) write_cr4(cr4);
+#else
+    if (cr4 & 0x80) __write_cr4(cr4);
+#endif   
 }

 static int nv_determine_pat_mode(void)


According to: https://forums.gentoo.org/viewtopic-p-7802832.html#7802832

genius kernel devs have renamed function write_cr4 to __write_cr4 which happens starting with gentoo-sources 3.18.19. (old behaviour till 3.18.16 gentoo-sources ...)

As longterm supported kernels are afaik 4.1 now I upgraded to it.

It is worth bumping the ebuild for x11-drivers/nvidia-drivers-340.76.
It is for legacy gpus like my 9800m gts.
longterm supported kernels are now afaik 4.1 (kernel 4.0 seems to work accoridng to above forum link)
So anyone can use his legacy gpu with latest gentoo-sources.
Comment 3 Roman Gruber 2015-10-28 12:25:20 UTC
Please reopen bugs, some peeps run into this, and do not find the bug.

The ebuild seems to be not fixed. 

And please tell me which information is needed. 

You got emerge -info, build.log. and suggested fix. and there is a hole forum topic about it. whihc clearly states it is an issue, and how to fix it. and i used that for quite some weeks until i upgraded my box.

as this is a legacy driver, you may

add a text with my proposal at the end of the ebuild, so guys can apply it manually.
or fix the ebuild.

340.xx will be only used by guys which legacy gpus, so the others will use newer hardware and they do not need this fix anyway, because the have recent gpus.

Recent post of a user with a legacy gpu: https://forums.gentoo.org/viewtopic-t-1031488-highlight-.html

and this bug was not visible anymore, becuase someone set it invisible, does not show up when you search for it anymore. fix the ebuild, or at least add some text to the ebuild, when you doubt everyone needs it, which is the case. ty