# Error emerging nvidia-drivers

## ddvlad

Hi,

just got tuxonice-sources-2.6.24-r2 working (after a few foolish errors on my part). Now, trying to re-emerge nvidia-drivers, during compiling, I get the following:

```
Calculating dependencies  ...done!

>>> Verifying ebuild Manifests...

>>> Emerging (1 of 2) x11-drivers/nvidia-drivers-100.14.19 to /

 * NVIDIA-Linux-x86-100.14.19-pkg0.run RMD160 SHA1 SHA256 size ;-) ...    [ ok ]

 * checking ebuild checksums ;-) ...                                      [ ok ]

 * checking auxfile checksums ;-) ...                                     [ ok ]

 * checking miscfile checksums ;-) ...                                    [ ok ]

 * checking NVIDIA-Linux-x86-100.14.19-pkg0.run ;-) ...                   [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.24-tuxonice-r2/build

 * Found sources for kernel version:

 *     2.6.24-tuxonice-r2

 * Checking for MTRR support ...

  [ ok ]

>>> Unpacking source...

Creating directory NVIDIA-Linux-x86-100.14.19-pkg0

Verifying archive integrity... OK

Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 100.14.19.............................................................................................................................

 * Applying NVIDIA_glx-defines.patch ...

  [ ok ]

 * Applying NVIDIA_glx-glheader.patch ...

  [ ok ]

 * Applying NVIDIA_i2c-hwmon.patch ...

  [ ok ]

 * Converting Makefile.kbuild to use M= instead of SUBDIRS= ...

  [ ok ]

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-100.14.19/work/NVIDIA-Linux-x86-100.14.19-pkg0/usr/src/nv ...

 * Preparing nvidia module

sh ./conftest.sh "i686-pc-linux-gnu-gcc" "i686-pc-linux-gnu-gcc" /usr/src/linux /lib/modules/2.6.24-tuxonice-r2/build cc_sanity_check full_output

rm -f Makefile

sh ./conftest.sh "i686-pc-linux-gnu-gcc" "i686-pc-linux-gnu-gcc" /usr/src/linux /lib/modules/2.6.24-tuxonice-r2/build select_makefile full_output

If you are using a Linux 2.4 kernel, please make sure

you either have configured kernel sources matching your

kernel or the correct set of kernel headers installed

on your system.

If you are using a Linux 2.6 kernel, please make sure

you have configured kernel sources matching your kernel

installed on your system. If you specified a separate

output directory using either the "KBUILD_OUTPUT" or

the "O" KBUILD parameter, make sure to specify this

directory with the SYSOUT environment variable or with

the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the

kernel headers) were installed, you may need to specify

their location with the SYSSRC environment variable or

the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1

 * 

 * ERROR: x11-drivers/nvidia-drivers-100.14.19 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3563:  Called linux-mod_src_compile

 *             environment, line 2633:  Called die

 * The specific snippet of code:

 *               emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} || die "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}.";

 *  The die message:

 *   Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.24-tuxonice-r2/build clean module.

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

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

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

 * 

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

 * 

 * ERROR: x11-drivers/nvidia-drivers-100.14.19 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3563:  Called linux-mod_src_compile

 *             environment, line 2633:  Called die

 * The specific snippet of code:

 *               emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} || die "Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}.";

 *  The die message:

 *   Unable to make  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.24-tuxonice-r2/build clean module.

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

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

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

 * 

```

eselect says that 2.6.24-tuxonice-r2 really is the one /usr/src/linux is pointing to. I emerged the latest linux-headers (also marked testing), but this did not solve the problem. Any suggestions are appreciated.

Thanks,

Vlad

----------

## jburns

Try nvidia-drivers-169.09-r1

----------

## ddvlad

It worked, thank you. I should have thought about unstable drivers, especially because I am using unstable sources.

----------

## maigret

I'm having the same problem with the package x11-drivers/nvidia-drivers-169.09-r1  :Sad: 

```
* Messages for package x11-drivers/nvidia-drivers-169.09-r1:

 * Could not find a Makefile in the kernel source directory.

 * Please ensure that /usr/src/linux points to a complete set of Linux sources

 *

 * ERROR: x11-drivers/nvidia-drivers-169.09-r1 failed.

 * Call stack:

 *                         ebuild.sh, line   49:  Called pkg_setup

 *   nvidia-drivers-169.09-r1.ebuild, line  145:  Called linux-mod_pkg_setup

 *                  linux-mod.eclass, line  465:  Called linux-info_pkg_setup

 *                 linux-info.eclass, line  595:  Called die

 * The specific snippet of code:

 *      get_version || die "Unable to calculate Linux Kernel version"

 *  The die message:

 *   Unable to calculate Linux Kernel version

 *

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-169.09-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-169.09-r1/temp/die.env'.

 *

```

```

[root@nedry] /usr/src

1# ll

total 2

lrwxrwxrwx  1 root root   23 Oct 10 18:58 linux -> linux-2.6.22-gentoo-r8/

drwxr-xr-x 19 root root 1112 Nov 27 19:21 linux-2.6.22-gentoo-r8

drwxr-xr-x  4 root root  120 Mar  8 21:25 linux-2.6.23-gentoo-r3

drwxr-xr-x 19 root root  704 Mar  8 18:34 linux-2.6.23-gentoo-r9

```

----------

## VashTS544

Perhaps you cold re-emerge your kernel? Also, are you upgrading to revision (release?) 9? The symbolic link is pointing to r8, but are you using r8, r9 or the r3 there? If you are using the r9, maybe changing the link will help.

----------

## maigret

Seems like you're right... I've no make targets in the directory  :Sad:  I'm going to look at it this week-end. Thanks for bringing me on the right path!

----------

