LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-15-2008, 05:23 PM   #1
killall
LQ Newbie
 
Registered: Oct 2008
Distribution: slackware (10.2)
Posts: 3

Rep: Reputation: 0
NVIDIA driver install --- kernel headers not configured


hey all

i'm more like a lurker but i'll give posting a shot . i was just comiling a 2.6 kernel (2.6.26) which went quite well. i encounter a problem when installing the NVIDIA driver (NVIDIA-Linux-x86-1.0-4496-pkg2.run) for my geforce fx 5200 video card. i need of course the header files of my new kernel, so i did:

Code:
$ mkdir $HOME/src/headers-2.6.26
$ cp -HR $HOME/src/linux-2.6.26/include/asm $HOME/src/headers-2.6.26
$ cp -R $HOME/src/linux-2.6.26/include/asm-generic $HOME/src/headers-2.6.26
$ cp -R $HOME/src/linux-2.6.26/include/linux $HOME/src/headers-2.6.26
i thought this would copy the header files. then i pointed the NVIDIA installer to the headers

Code:
# ./NVIDIA-...-pkg2.run --kernel-include-path=$HOME/src/headers-2.6.26
the error was that the installer complained about a missing file 'include/linux/modversions.h'. the /var/log/nvidia-installer.log file said nothing more enlightning except that this error might be due to unconfigured kernel headers.

so i thought about how to extract/make the kernel headers or the missing files. i checked the make file and tried:

Code:
$ make headers_check(_all) //also
$ make headers_install(_all)
to no avail. i finally installed my new kernel with all the modules hoping it would automatically copy the new headers somewhere in /usr/include or so. well, nothing so far. NVIDIA installer is still complaining about missing files and hints to "configure the kernel headers"

anybody know how to do this or what i was missing?
help appreciated, thx

killall -9
 
Old 10-15-2008, 05:32 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
With make modules_install command, the kernel build dir get symlinked in
/lib/modules/<Kernel version>/build

so when you compile and install a kernel from source, you don't need to do anything to install kernel header files!
The programs that need them will find them in /lib/modules/`uname -r`/build/include
no need to mess with the kernel header files!
 
Old 10-15-2008, 11:52 PM   #3
killall
LQ Newbie
 
Registered: Oct 2008
Distribution: slackware (10.2)
Posts: 3

Original Poster
Rep: Reputation: 0
hm...

ok, then i'm in trouble. for the NVIDIA installer insists that he can't find the headers:

/var/log/nvidia-installer.log gives:
Code:
ERROR: The kernel header file
       '/lib/modules/2.6.26/build/include/linux/modversions.h' does not exist. 
       The most likely reason for this is that the kernel header files in
       '/lib/modules/2.6.26/build/include' have not been configured.
i had my modules installed with 'make modules_install'. i am sure i issued the command. i'll have to recompile the kernel anyway, so i will take extra care the next time but for the time being this is rather strange.

killall
 
Old 10-16-2008, 03:45 AM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
Maybe try with the latest nvidia driver:
http://www.nvidia.com/object/unix.html
Also the current kernel stable version is: 2.6.27.1
 
Old 10-16-2008, 11:42 AM   #5
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.0
Posts: 2,243

Rep: Reputation: 616Reputation: 616Reputation: 616Reputation: 616Reputation: 616Reputation: 616
The kernel *headers* should not be the ones from your new custom kernel, but the ones from the included Slackware kernels. You shouldn't touch your kernel headers unless you are upgrading glibc as well (and you wouldn't do that unless you were upgrading Slackware -- or if you were crazy and overhauling your system). You should download the appropriate kernel-headers package from a Slackware mirror (or use your install CD/DVD) and issue the following command as root:
Code:
# upgradepkg --reinstall packagename
where packagename is the name of the kernel-headers package, obviously. If you're using Slackware 10.2 as in your profile info, use kernel-headers-2.4.31-i386-1.tgz. If you are using 12.1, use kernel-headers-2.6.24.5_smp-x86-2.tgz. You can use a new custom kernel while leaving the existing kernel headers alone -- just don't attempt to install the kernel headers from the new kernel. Just so I know you're not issuing some crazy kernel commands that end up overwriting kernel headers, this guide is a good resource for compiling 2.6.x kernels.

You could also try passing the location of your kernel headers to the nVidia installer. I do remember a previous version of the nVidia drivers not compiling under certain kernel versions even if you passed the correct kernel (source? headers? I can't remember) location, so make sure you have the latest drivers available for your card. I may be looking up the wrong model, but it appears that the latest legacy version for your card is NVIDIA-Linux-x86-177.80.pkg1.run -- NOT the one you are trying to install.
 
Old 10-16-2008, 12:39 PM   #6
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
I think nvidia module compilation requires the current kernel header files as nvidia module is not an user space program but a kernel module, so it is better to use header files from a specific kernel version rather that "generic" header files from distribution.
I could be wrong though, but that makes sense to me
 
Old 10-16-2008, 03:57 PM   #7
killall
LQ Newbie
 
Registered: Oct 2008
Distribution: slackware (10.2)
Posts: 3

Original Poster
Rep: Reputation: 0
solved --- human failure

thx for all your help!

@T3slider: i remember reading something like what you said about the kernel headers in a newsgroup mail from linus torvalds. i had the 2.4 headers installed. but the insaller was saying something about '/lib/modules/2.6.26/...' so i thought it might need the new ones after all. more strangely, when i first tried to compile the NVIDIA driver on a freshly installed slackware 10.2 it gave me a message saying the version of my c compiler does not match the one with wich my kernel was compiled...

the problem was human failure! i found myself banging my head against my monitor! i have to apologize. when i downloaded the installer i had only links to browse the web which i normally enjoy but on a widescreen monitor with vga=normal i hit the first link which looked familiar on the nvidia side. i didn't give it another look! that has caused all the problems. downloading the newest driver under X with a graphical web browser didn't solve the problem due to the age of my video card (geforce fx 5200) however the installer was kind enough to point me to the correct version; and now it works again.

but i now have a problem with my monitor. it strangly occured after i banged my head several times with severe force against it. the colors are.... nevermind.

thx again killall
 
  


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
trying to install NVIDIA driver and i dont have libc headers malanco Linux - Newbie 2 06-30-2007 04:05 PM
Can yast be configured to install nvidia driver in suse 10.1? sirius57 Suse/Novell 8 12-21-2006 08:25 PM
nVidia driver asks for headers Vitalie Ciubotaru Linux From Scratch 6 09-18-2006 11:45 PM
INstalling Kernel Headers to update nvidia driver plbowler Mandriva 5 09-14-2006 11:10 AM
nVidia Driver won't install because Kernel Headers are missing...Whats that me then? Stevetgn Linux - Newbie 3 08-24-2003 08:27 PM


All times are GMT -5. The time now is 08:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration