LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2009, 07:52 PM   #1
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Rep: Reputation: 22
Nvidia drivers can't find kernel version...


I posted this on the gentoo forums, but have gotten zero help. Got a lot in the IRC channel but to no avail. The Nvidia drivers bitch and moan about not finding the current kernel version. Honestly, I have no clue where the installer looks (other than somewhere in /usr/src/linux) which is set. Neither the Portage and the Nvidia Installer (which I'm apparently not supposed to use) will work, so I'm guessing something is wrong w/ my kernel config.

For some people a while back, making sure asm-x86 was linked to asm-i386 solved it, but that doesn't help me.

This is an x86_64 system, w/ gentoo-sources 2.6.30-r3 kernel. I've tried different versions of the driver, and different versions of the kernel. For my current setup, I wiped the slate clean (unemerged previous kernel versions, and deleted everything in /usr/src) then started fresh, only to have the same results. This is really driving me up a wall. I don't want to go the Radeon route.

Output from portage:

Code:
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.30-gentoo-r5/build
 * Found sources for kernel version:
 *     2.6.30-gentoo-r5
 * Checking for MTRR support ...                                                                                                          [ ok ]
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-180.60-pkg2.run to /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2 ...
 * Applying NVIDIA_glx-defines.patch ...                                                                                                  [ ok ]
 * Applying NVIDIA_glx-glheader.patch ...                                                                                                 [ ok ]
 * Converting NVIDIA-Linux-x86_64-180.60-pkg2/usr/src/nv/Makefile.kbuild to use M= instead of SUBDIRS= ...                                [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2 ...
 * Preparing nvidia module
make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.30-gentoo-r5/build HOST_CC=x86_64-pc-linux-gnu-gcc clean 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-180.60 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3942:  Called linux-mod_src_compile
 *             environment, line 2939:  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=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux               SYSOUT=/lib/modules/2.6.30-gentoo-r5/build HOST_CC=x86_64-pc-linux-gnu-gcc 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-180.60/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/temp/environment'.
 *


Here's the output from the nvidia installer log:

Code:
option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  no cc version check     : false
  force tls               : (not specified)
  force compat32 tls      : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  compat32 install chroot : (not specified)
  compat32 install prefix : (not specified)
  compat32 install libdir : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 185.18.36.
-> 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: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
ERROR: Unable to determine the version of the kernel sources located in
       '/lib/modules/2.6.30-gentoo-r5/source'.  Please make sure you have
       installed the kernel source files for your kernel and that they are
       properly configured; on Red Hat Linux systems, for example, be sure you
       have the 'kernel-source' or 'kernel-devel' RPM installed.  If you know
       the correct kernel source files are installed, you may specify the
       kernel source path with the '--kernel-source-path' 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.
I can post /usr/src/linux/.config if need be.

Last edited by GaijinPunch; 10-25-2009 at 05:25 PM.
 
Old 10-24-2009, 09:27 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,520

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
not sure about gentoo but this driver is OLD " 180.60"
this is the current "185.18.36 " http://www.nvidia.com/object/linux_d...185.18.36.html
and the .run driver MUST have the running kernel source available to it
with gentoo that should already be there along with the gcc compiler
 
Old 10-24-2009, 09:47 PM   #3
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
180.60 is the latest stable in portage... I'm getting little help on the forums there, and thus far today in IRC, none. So I'm really curious as to WTF is happening. I tried the 185.18.36 installer many times, to no avail -- same issue. Also doing ACCEPT_KEYWORDS="~amd64" tries to install 185.18.36-r1, but of course, same error.


The problem is (apparently) in how the installer (and the ebuild) determine the kernel version. Since both are binary, I can't just go digging through the source, unfortunately. I tried gentoo-sources & vanilla-sources. The only thing I haven't tried that might work is genkernel, but something tells me the sources will be laid out the same as with a manual kernel, and thus, back to my debacle.
 
Old 10-24-2009, 10:06 PM   #4
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Is your /usr/src/linux link valid?

It work for me with a fairly recent kernel. If you are using 2.6.32-rc, don't ask why you got problems. Anything older than that should work.
 
Old 10-24-2009, 10:35 PM   #5
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
As per the original post, /usr/src/linux is a valid link. I've tried nothing but stable kernels: 3 within portage, 1 external (manual).

I'm thinking a fresh start isn't a dumb thing at this point.

Last edited by GaijinPunch; 10-24-2009 at 11:45 PM.
 
Old 10-25-2009, 05:38 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,425

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
The nvidia installer looks for

/lib/modules/Žuname -rŽ/build
/lib/modules/Žuname -rŽ/source

.. where 'build' and 'source' are links to
/usr/src/linux-Žuname -rŽ/

Usually the 'build' link will do.
.....

Last edited by knudfl; 10-25-2009 at 05:39 AM.
 
Old 10-25-2009, 07:57 AM   #7
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
I'll chalk this one up to bad karma. A rebuild has allowed me to install them. Now I realize my GPU isn't support in the latest stable release... or beta even. RC all the way!
 
Old 10-25-2009, 11:19 PM   #8
akamikeym
Member
 
Registered: May 2008
Posts: 112

Rep: Reputation: 21
Same Problem

I'm having the exact same problem with gentoo-sources 2.6.30-r5 and any NVidia drivers up to 190.40. I've checked everything an followed every link and everything is pointing to my kernel but NVidia just wont accept it.

I've tried using the version from the install and installing it by hand (just to see what errors i'd get) and it failed with both the nvidia installer and by running make with all the right parameters.

I would love to know how you managed this in the end.
 
Old 10-26-2009, 01:09 AM   #9
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Check to see if the symlink is valid
Code:
eselect kernel list
This will show a list of installed kernels. If only 1 kernel is installed, you should see a star next to the list of the kernels. If there is no star, then you need to set it with
Code:
eselect kernel set 1
Then try and compile the driver. It never has failed me. Very easy to install the Nvidia drivers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to install NVIDIA drivers due to missing version.h Nylex Slackware 15 04-16-2010 03:38 AM
Nvidia graphic drivers and kernel version js72 Fedora 6 10-20-2006 08:52 AM
Find out distribution + version (NOT: kernel version!) Tajci Red Hat 5 06-08-2005 03:17 PM
nvidia drivers, gcc-version-check failed Seiken Slackware 26 02-25-2005 09:50 PM
nvidia drivers, can't find kernel module name newbe45 Linux - Newbie 3 03-29-2004 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration