# nvidia-drivers with non-gentoo-sources?

## avieth

I need to use a 2.6.28 kernel to take advantage of the new additions to the saa7134 driver. I've tried both git-sources, and now vanilla-sources, which would not unpack at first, but both presented issues with the nvidia-drivers as well as lirc packages. 

```

* Preparing nvidia module

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-169.07 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3608:  Called linux-mod_src_compile

 *             environment, line 2663:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                             CROSS_COMPILE=${CHOST}-                                          LDFLAGS=\"$(get_abi_LDFLAGS)\"        ${BUILD_FIXES}                                           ${BUILD_PARAMS}                               ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 *  The die message:

 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.28-rc4/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-169.07/temp/build.log'.

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

 *

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

 *

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

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3608:  Called linux-mod_src_compile

 *             environment, line 2663:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                             CROSS_COMPILE=${CHOST}-                                          LDFLAGS=\"$(get_abi_LDFLAGS)\"        ${BUILD_FIXES}                                           ${BUILD_PARAMS}                               ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 *  The die message:

 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.28-rc4/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-169.07/temp/build.log'.

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

```

nvidia-drivers returns that error. I can't figure out what's wrong. I've compiled the kernel, booted from it, checked the symlink, checked uname -a, and everything is good. Why won't any modules compile for this kernel?

From the logfile.

```

Using: nvidia-installer ncurses user interface

-> License accepted.

-> Installing NVIDIA driver version 173.14.09.

-> No precompiled kernel interface was found to match your kernel; would you li

   ke the installer to attempt to download a kernel interface for your kernel f

   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)

-> No matching precompiled kernel interface was found on the NVIDIA ftp site;

   this means that the installer will need to compile a kernel interface for

   your kernel.

-> Performing CC sanity check with CC="cc".

-> Performing CC version check with CC="cc".

-> Kernel source path: '/lib/modules/2.6.28-rc4/source'

-> Kernel output path: '/lib/modules/2.6.28-rc4/build'

ERROR: 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.

ERROR: Installation has failed.  Please see the file

       '/var/log/nvidia-installer.log' for details.  You may find suggestions

       on fixing installation problems in the README available on the Linux

       driver download page at www.nvidia.com.

```

Does it think my kernel sources are in /lib/modules? How can I tell it otherwise?

Or, do the latest nvidia-drivers simply not support kernel 2.6.28 ?

----------

## eduardhc

What kernel are you using? Ensure you have the kernel sources matching your running kernel installed under /usr/src. 

Also use "eselect kernel" to create the symbolic link /usr/src/linux pointing to your kernel sources.

regards, 

  Eduard

----------

## slackline

 *avieth wrote:*   

> 
> 
> Or, do the latest nvidia-drivers simply not support kernel 2.6.28 ?

 

Bingo!

From The FAQ

 *Quote:*   

> 
> 
> What is NVIDIA\'s policy towards development series Linux kernels?
> 
> NVIDIA does not officially support development series kernels. However, all the kernel module source code that interfaces with the Linux kernel is available in the usr/src/nv/ directory of the .run file. NVIDIA encourages members of the Linux community to develop patches to these source files to support development series kernels. A web search will most likely yield several community supported patches.
> ...

 

----------

## slackline

 *eduardhc wrote:*   

> What kernel are you using? Ensure you have the kernel sources matching your running kernel installed under /usr/src. 
> 
> Also use "eselect kernel" to create the symbolic link /usr/src/linux pointing to your kernel sources.
> 
> regards, 
> ...

 

Or just do it by hand with...

```

ls -l /usr/src/

rm /usr/src/linux

ln -s /usr/src/linux-2.6.28-r4 /usr/src/linux

```

Obviously the first argument to ln should reflect the sources you are trying to compile.  Its unlikely to help in this situation though given the above FAQ.

--mod edit by i92guboj: fixed quotations in this post and the previous one. There's no need (in fact it's incorrect) to escape the quotation marks with backslashes.

@i92guboj : Cheers, but I'm not doing it intentionally, I was posting via a proxy server as work don't let me view the site directly, and its the parsing of text through the proxy that escapes the quotes, very frustrating.  I will sometimes try and correct these when I later return home, but don't always remember

----------

## ihtruelsen

I have the same problem here trying to use git-sources. 

Has anyone gotten nvidia-drivers to work with any of them?

----------

## FallenWizard

the newest beta driver runs without a patch on 2.6.28

If you want to use the old version, you need to manually fix it. 

Quote from http://www.nvnews.net/vbulletin/showthread.php?t=121790 :

 *Quote:*   

> 
> 
>  Originally Posted by Emopig  View Post
> 
> Patched, working and lightly tested here:
> ...

 

----------

## ihtruelsen

Which one is the most recent beta version?

I currently am using 177.80 and I see that there is a 71.86.06 and a 96.43.07. However, according to the changelog file:

```

*nvidia-drivers-1.0.8762-r1 (07 Jul 2006)

  07 Jul 2006; Kristopher Kersey <augustus@gentoo.org>

  +files/1.0.8762/NVIDIA-1.0.8762-U062606.diff,

  +nvidia-drivers-1.0.8762-r1.ebuild:

  Added Zander's patch to allow building with latest kernels (>=

  2.6.17-rc4-mm1, >= 2.6.17-git7).

```

That version doesn't seem to exist as an ebuild anyway. I do not understand the numbering system for the nvidia-drivers versions. Which one would I be looking for?

----------

## ihtruelsen

Never mind. I found a bug for the new 180.06 nvidia driver and it works by renaming the 177.80 ebuild.

I still don't understand the numbering system, but I now have a driver that will work with my git sources.

----------

