# PEBCAK - kernel-3.8.2 doesn't like nvidia-driver 313.26

## ShadowHawkBV

I'm not sure if it's my set-up or something more generalized.  I'm running gentoo-sources kernel 3.8.2.  I've discovered that nvidia-driver-313.26 will not work with the 3.8 kernel versions.  Ironically, nvidia-drivers-313.18 works fine.

Here is the error that appears when I try to use the newest unstable nvidia-driver.

```
sudo emerge ="x11-drivers/nvidia-drivers-313.26"

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Running pre-merge checks for x11-drivers/nvidia-drivers-313.26

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.8.2-gentoo/build

 * Found sources for kernel version:

 *     3.8.2-gentoo

 * Checking for suitable kernel configuration options...                                                                                                                       [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-313.26

 * NVIDIA-Linux-x86_64-313.26.run SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                         [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.8.2-gentoo/build

 * Found sources for kernel version:

 *     3.8.2-gentoo

>>> Unpacking source...

>>> Unpacking NVIDIA-Linux-x86_64-313.26.run to /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work

>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work

>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work ...

 * Converting /kernel/Makefile.kbuild to use M= instead of SUBDIRS= ...                                                                                                        [ ok ]

 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers ...

 *   nvidia-drivers-313.18-linux-3.8+.patch ...

 * Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch !

 *  ( /etc/portage/patches//x11-drivers/nvidia-drivers/nvidia-drivers-313.18-linux-3.8+.patch )

 * 

 * Include in your bugreport the contents of:

 * 

 *   /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/nvidia-drivers-313.18-linux-3.8+.patch.out

 * ERROR: x11-drivers/nvidia-drivers-313.26 failed (prepare phase):

 *   Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch!

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_prepare

 *   environment, line 3976:  Called epatch_user

 *   environment, line 1514:  Called epatch

 *   environment, line 1487:  Called die

 * The specific snippet of code:

 *               die "Failed Patch: ${patchname}!";

 * 

 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-313.26'`,

 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-313.26'`.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/environment'.

 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work'

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-313.26, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-313.26:

 * Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch !

 *  ( /etc/portage/patches//x11-drivers/nvidia-drivers/nvidia-drivers-313.18-linux-3.8+.patch )

 * 

 * Include in your bugreport the contents of:

 * 

 *   /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/nvidia-drivers-313.18-linux-3.8+.patch.out

 * ERROR: x11-drivers/nvidia-drivers-313.26 failed (prepare phase):

 *   Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch!

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_prepare

 *   environment, line 3976:  Called epatch_user

 *   environment, line 1514:  Called epatch

 *   environment, line 1487:  Called die

 * The specific snippet of code:

 *               die "Failed Patch: ${patchname}!";

 * 

 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-313.26'`,

 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-313.26'`.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/environment'.

 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work'

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work/'
```

For those that are curious, here is the build log. 

```
sudo cat /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/build.log

Password: 

 * Package:    x11-drivers/nvidia-drivers-313.26

 * Repository: gentoo

 * Maintainer: jer@gentoo.org xarthisius@gentoo.org

 * USE:        X acpi amd64 elibc_glibc kernel_linux multilib tools userland_GNU

 * FEATURES:   sandbox

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.8.2-gentoo/build

 * Found sources for kernel version:

 *     3.8.2-gentoo

>>> Unpacking source...

>>> Unpacking NVIDIA-Linux-x86_64-313.26.run to /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work

>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work

>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work ...

 * Converting /kernel/Makefile.kbuild to use M= instead of SUBDIRS= ...                                                                                                        [ ok ]

 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers ...

 *   nvidia-drivers-313.18-linux-3.8+.patch ...

 * Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch !

 *  ( /etc/portage/patches//x11-drivers/nvidia-drivers/nvidia-drivers-313.18-linux-3.8+.patch )

 * 

 * Include in your bugreport the contents of:

 * 

 *   /var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/nvidia-drivers-313.18-linux-3.8+.patch.out

 * ERROR: x11-drivers/nvidia-drivers-313.26 failed (prepare phase):

 *   Failed Patch: nvidia-drivers-313.18-linux-3.8+.patch!

 * 

 * Call stack:

 *     ebuild.sh, line   93:  Called src_prepare

 *   environment, line 3976:  Called epatch_user

 *   environment, line 1514:  Called epatch

 *   environment, line 1487:  Called die

 * The specific snippet of code:

 *               die "Failed Patch: ${patchname}!";

 * 

 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-313.26'`,

 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-313.26'`.

 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/temp/environment'.

 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work'

 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-313.26/work/'
```

Since the slightly older unstable version from Nvidia works fine, this is more for peoples information then anything else.

```
sudo emerge --info

Portage 2.1.11.55 (default/linux/amd64/13.0/desktop/gnome, gcc-4.7.2, glibc-2.15-r3, 3.8.1-gentoo x86_64)

=================================================================

System uname: Linux-3.8.1-gentoo-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.2

KiB Mem:    16408824 total,   5326548 free

KiB Swap:    2097148 total,   2097148 free

Timestamp of tree: Sat, 09 Mar 2013 12:30:01 +0000

ld GNU ld (GNU Binutils) 2.22

app-shells/bash:          4.2_p37

dev-java/java-config:     2.1.12-r1

dev-lang/python:          2.7.3-r2, 3.2.3

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.9.6-r3, 1.11.6

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.7.2-r1

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.6 (virtual/os-headers)

sys-libs/glibc:           2.15-r3

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=native"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="* /etc /usr/share/config /usr/share/gnupg/qualified.txt"

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="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

EMERGE_DEFAULT_OPTS="--autounmask=n"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.arcticnetwork.ca/ http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ "

LANG="C"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 apm avahi berkdb bluetooth branding bzip2 cairo cdda cdinstall cdr cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran ftp gdbm gif gimp gnome gnome-keyring gnome-online-accounts gphoto2 gpm gstreamer gtk iconv ieee1394 ipv6 java6 jpeg jpeg2k kerberos lcms ldap libnotify lm_sensors mad mime mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib nautilus ncurses networkmanager nls nocd nptl offensive ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline samba sdl session smp socialweb spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vnc vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="snd-atiixp" 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="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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
```

----------

## SamuliSuominen

I'm afraid you caused the failure yourself:

 * Applying user patches from /etc/portage/patches//x11-drivers/nvidia-drivers ...

 *   nvidia-drivers-313.18-linux-3.8+.patch ... 

This patch shouldn't be used for 313.26.

----------

## ShadowHawkBV

 :Embarassed:  Doh.  I forgot all about needing that for an earlier kernel.  :Embarassed: 

Thank you for setting me straight.

----------

