Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-01-03, 10:10 AM   #1
divined
Registered User
 
Join Date: Dec 2003
Posts: 6
Default Problem installing NVIDIA Linux driver

I`m trying to install the NVIDIA Linux driver version 'NVIDIA-Linux-x86-1.0-4496-pkg2.run'. My Linux distribution is Mandrake Linux 9.2. Apparently the above mentioned package does not contain a precomiled kernel interface for Mandrake 9.2. So the kernel needs to be recompiled.
I downloaded and installed the kernel-source rpm (kernel version 2.4.22) and tried running the driver. Unfortunately the driver installer ends with an error message that It could not locate the kernels.h header file. Where can I find this file and how do I install it; Do I need another package?

George Papadopoulos
divined is offline   Reply With Quote
Old 12-01-03, 03:56 PM   #2
LordMorgul
Electrical Engineer
 
LordMorgul's Avatar
 
Join Date: Dec 2002
Location: San Luis Obispo, CA
Posts: 872
Default

Installing the kernel-source should fix this problem, so you may have installed an incorrect kernel-source. Check that your kernel and kernel-source match (show all kernel related RPMs)
rpm -qa | grep kernel

check running kernel version:
uname -r
cat /proc/version
__________________
"..the triumph of evil is for good men to do nothing." (Edmond Burke)
nVIDIA video driver RPMs for Fedora :: see yum repo at livna.org.
LordMorgul is offline   Reply With Quote
Old 12-02-03, 11:20 AM   #3
divined
Registered User
 
Join Date: Dec 2003
Posts: 6
Default

I ran a check of my kernel version against the source files and they seem to be of the same version. Specifically

rpm -qa | grep kernel gave me a single rpm (kernel-2.4.22.10mdk-1-1mdk)

uname -r gave me (2.4.22-10mdk)

So I think those are correct. I found out that my kernel.h file has been installed under the directory /usr/include. Accordingly I ran the NVIDIA installer as follows :

sh NVIDIA-Linux-x86-1.0-4496-pkg2.run --kernel-include-path /usr/include Now the installer starts compiling the NVIDIA kernel module but still fails. The NVIDIA log files states the below :

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Dec 2 18:33:52 2003

option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
no precompiled interface: false
no ncurses color : false
query latest driver ver : false
OpenGL header files : false
no questions : false
silent : false
XFree86 install prefix : /usr/X11R6
OpenGL install prefix : /usr
Installer install prefix: /usr
kernel include path : /usr/include
kernel install path : /usr/src/RPM/SOURCES
proc mount point : /proc
ui : (not specified)
tmpdir : /root/tmp
ftp site : ftp://download.nvidia.com

Using: nvidia-installer ncurses user interface
-> License accepted.
-> 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.
-> Using the kernel include path '/usr/include' as specified by the
'--kernel-include-dir' commandline option.
-> Kernel include path: '/usr/include'
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f nv.o os-agp.o os-interface.o os-registry.o nv-linux.o nv_compiler.h *
.d NVdriver nvidia.o
-> Building kernel module:
executing: 'cd ./usr/src/nv; make nvidia.o SYSINCLUDE=/usr/include'...
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -
DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D_
_KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVE
L=4496 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -I. -I/us
r/include -Wno-cast-qual nv.c
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/module.h:11,
from nv-linux.h:28,
from nv.c:14:
/usr/include/asm/processor.h:55: error: requested alignment is not a constan
t
In file included from /usr/include/linux/module.h:297,
from nv-linux.h:28,
from nv.c:14:
/usr/include/linux/version.h:2:2: #error "==================================
====================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/includ
e/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation
of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files
from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recomme
nded by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and
may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They sho
uld only be"
/usr/include/linux/version.h:10:2: #error "included via other system header
files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly incl
ude <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do
the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources instal
led"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic li
nk"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build
exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source dir
ectory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version
.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/
include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to u
se the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the cor
rect include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/buil
d/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile acc
ordingly."
/usr/include/linux/version.h:35:2: #error "=================================
======================"
In file included from nv-linux.h:28,
from nv.c:14:
/usr/include/linux/module.h:299: error: syntax error before "UTS_RELEASE"
In file included from nv-linux.h:29,
from nv.c:14:
/usr/include/linux/version.h:2:2: #error "==================================
====================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/includ
e/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation
of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files
from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recomme
nded by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and
may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They sho
uld only be"
/usr/include/linux/version.h:10:2: #error "included via other system header
files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly incl
ude <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do
the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources instal
led"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic li
nk"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build
exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source dir
ectory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version
.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/
include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to u
se the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the cor
rect include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/buil
d/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile acc
ordingly."
/usr/include/linux/version.h:35:2: #error "=================================
======================"
In file included from nv.c:14:
nv-linux.h:31:40: missing binary operator before token "("
nv-linux.h:33:42: missing binary operator before token "("
nv-linux.h:43:42: missing binary operator before token "("
nv-linux.h:45:42: missing binary operator before token "("
nv-linux.h:47:42: missing binary operator before token "("
nv-linux.h:51:4: #error This driver does not support 2.6.x or newer kernels!
In file included from /usr/include/linux/mm.h:12,
from /usr/include/linux/slab.h:14,
from nv-linux.h:71,
from nv.c:14:
/usr/include/linux/mmzone.h:44: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclare
d here (not in a function)
/usr/include/linux/mmzone.h:44: error: requested alignment is not a constant
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:46,
from nv-linux.h:79,
from nv.c:14:
/usr/include/linux/irq.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared h
ere (not in a function)
/usr/include/linux/irq.h:65: error: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:46,
from nv-linux.h:79,
from nv.c:14:
/usr/include/asm/hardirq.h:16: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared
here (not in a function)
/usr/include/asm/hardirq.h:16: error: requested alignment is not a constant
In file included from nv-linux.h:79,
from nv.c:14:
/usr/include/linux/interrupt.h:129: error: `CONFIG_X86_L1_CACHE_SHIFT' undec
lared here (not in a function)
/usr/include/linux/interrupt.h:129: error: requested alignment is not a cons
tant
nv-linux.h:296:40: missing binary operator before token "("
nv-linux.h:402:2: #error "Couldn't determine number of arguments expected by
remap_page_range!"
nv-linux.h:463:64: missing binary operator before token "("
nv.c: In function `init_module':
nv.c:759: warning: unused variable `i'
nv.c: In function `cleanup_module':
nv.c:861: warning: unused variable `i'
nv.c: In function `nv_kern_mmap':
nv.c:1349: warning: implicit declaration of function `NV_REMAP_PAGE_RANGE'
nv.c:1405:65: missing binary operator before token "("
nv.c:1408: warning: implicit declaration of function `pgprot_writecombine'
nv.c:1408: error: incompatible types in assignment
make: *** [nv.o] Error 1
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
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`m rather baffled at these compiler errors. I`ve been reading about how easy it is to get this driver working but am getting all this trouble instead.
divined is offline   Reply With Quote
Old 12-02-03, 12:23 PM   #4
TheOneKEA
Fifteen-K Saiyan Bastard
 
TheOneKEA's Avatar
 
Join Date: Aug 2002
Location: Somewhere in England, waiting for ROTK and drooling over the A64 3000+
Posts: 417
Send a message via ICQ to TheOneKEA Send a message via AIM to TheOneKEA Send a message via Yahoo to TheOneKEA
Default

Use -I/lib/modules/`uname -r`/build/include instead and see what happens.

LordMorgul, check your PMs.
__________________
/me \/\/@|\|t5 $$$$$ F0r @|\| u65r 3|33t G@/\/\1|\|G r1G

SCREW THE ADS! http://adblock.mozdev.org/
Proud user of teh Fox of Fire - Mozilla Firefox 0.8

Registered Linux User #289618
TheOneKEA is offline   Reply With Quote
Old 12-02-03, 01:58 PM   #5
divined
Registered User
 
Join Date: Dec 2003
Posts: 6
Default

How exactly do I use these options?
divined is offline   Reply With Quote
Old 12-03-03, 12:33 AM   #6
divined
Registered User
 
Join Date: Dec 2003
Posts: 6
Default

There seems to be no valid kernel files under the directory /lib/modules/kernel-2.4.22.10mdk//build/include. The kernel source files seem to be installed under /usr/include. Yet the nvidia driver installer fails with the above log file.
One other thing. When I type rpm -qa | grep kernel I get the reply
kernel-2.4.22.10mdk-1-1mdk

Should there be a source extension to the rpm returned?
divined is offline   Reply With Quote
Old 12-03-03, 02:33 AM   #7
LordMorgul
Electrical Engineer
 
LordMorgul's Avatar
 
Join Date: Dec 2002
Location: San Luis Obispo, CA
Posts: 872
Default

Yes, you should have two separate RPMs that are listed by that rpm command.
One will be:
kernel-2.4.22.10mdk-1-1mdk

and the other will be:
kernel-source-2.4.22.10mdk-1-1mdk

So, hit up the Mandrake ftp and get the package, install it, and build the driver again.

And TheOneKEA, thanks again for the awesome avatar
__________________
"..the triumph of evil is for good men to do nothing." (Edmond Burke)
nVIDIA video driver RPMs for Fedora :: see yum repo at livna.org.
LordMorgul is offline   Reply With Quote
Old 12-03-03, 04:25 AM   #8
TheOneKEA
Fifteen-K Saiyan Bastard
 
TheOneKEA's Avatar
 
Join Date: Aug 2002
Location: Somewhere in England, waiting for ROTK and drooling over the A64 3000+
Posts: 417
Send a message via ICQ to TheOneKEA Send a message via AIM to TheOneKEA Send a message via Yahoo to TheOneKEA
Default

Quote:
Originally posted by LordMorgul
Yes, you should have two separate RPMs that are listed by that rpm command.
One will be:
kernel-2.4.22.10mdk-1-1mdk

and the other will be:
kernel-source-2.4.22.10mdk-1-1mdk

So, hit up the Mandrake ftp and get the package, install it, and build the driver again.

And TheOneKEA, thanks again for the awesome avatar
You're welcome

Once he installs the kernel-source RPM, the include files should appear under /lib/modules/`uname -r`/build/include, and then he should be able to compile the NVIDIA driver. I think that was why the build symlink was introduced under both the 2.4 and 2.6 kernels - it provides a clean way to access the source (and under 2.6, the build system).
__________________
/me \/\/@|\|t5 $$$$$ F0r @|\| u65r 3|33t G@/\/\1|\|G r1G

SCREW THE ADS! http://adblock.mozdev.org/
Proud user of teh Fox of Fire - Mozilla Firefox 0.8

Registered Linux User #289618
TheOneKEA is offline   Reply With Quote

Old 12-03-03, 04:04 PM   #9
divined
Registered User
 
Join Date: Dec 2003
Posts: 6
Default

I downloaded the rpm kernel-2.4.22.10mdk-1-1mdk.src.rpm.
I tried to install it in the following manner

rpm --install kernel-2.4.22.10mdk-1-1mdk.src.rpm and I got the results

warning : user nplanel does not exist - using root
warning : group nplanel does not exist - using root

i created the user nplanel and group nplanel and executed the above command again. Now the package seems to install without warnings.
when I execute rpm -qa | grep kernel I still only get a single kernel rpm.

Am i missing something or could I have downloaded an incorrect kernel-source rpm?
divined is offline   Reply With Quote
Old 12-04-03, 07:35 AM   #10
TheOneKEA
Fifteen-K Saiyan Bastard
 
TheOneKEA's Avatar
 
Join Date: Aug 2002
Location: Somewhere in England, waiting for ROTK and drooling over the A64 3000+
Posts: 417
Send a message via ICQ to TheOneKEA Send a message via AIM to TheOneKEA Send a message via Yahoo to TheOneKEA
Default

You didn't install the kernel source, you installed a precompiled vendor kernel. You have to install the kernel-source RPM.
__________________
/me \/\/@|\|t5 $$$$$ F0r @|\| u65r 3|33t G@/\/\1|\|G r1G

SCREW THE ADS! http://adblock.mozdev.org/
Proud user of teh Fox of Fire - Mozilla Firefox 0.8

Registered Linux User #289618
TheOneKEA is offline   Reply With Quote
Old 12-04-03, 12:37 PM   #11
leto_2_atreid
Registered User
 
Join Date: Dec 2003
Posts: 1
Exclamation How it works (at least for me)

Follow the instruction and it should work. I had the same problem and now everything works great.

1./ Reinstall Mandrake 9.2 from scratch (to be sure the pb wont come from what you've been trying till now... i know by experience it can screw everything...)

2./ download the source kernel (for me it was: kernel-source-2.4.22-10mdk.i586.rpm, just google the one that corresponds to your kernel... might be the same !)

3./ install the source kernel:
rpm -ivh kernel-source-2.4.22-10mdk.i586.rpm

4./ control that you have it now:
rpm -qa | grep kernel
this should give you 2 results: the kernel and its sources

5./ quit X if you were in it, and run the Nvidia installer:
(http://www.nvidia.com/object/linux_display_ia32_1.0-4496.html)
with the following options:

sh NVIDIA-Linux-x86-1.0-4496-pkg2.run --kernel-include-path=/usr/src/include

It should compile smoothly !!!

Try startx... and enjoy !

Hope this helps...
leto_2_atreid is offline   Reply With Quote
Old 12-06-03, 03:45 AM   #12
LordMorgul
Electrical Engineer
 
LordMorgul's Avatar
 
Join Date: Dec 2002
Location: San Luis Obispo, CA
Posts: 872
Default

Wrong RPM, reinstall of Mandrake may not be necessary if you install the correct kernel RPM.

The kernel-source rpm does NOT end in .src.rpm.

kernel-source-<blahblah>.rpm

kernel-<blahblah>.src.rpm

are NOT the same or interchangable. Get the kernel-source-<version>.rpm.
__________________
"..the triumph of evil is for good men to do nothing." (Edmond Burke)
nVIDIA video driver RPMs for Fedora :: see yum repo at livna.org.
LordMorgul is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 Ferianto85 NVIDIA Linux 0 05-18-12 08:35 PM
nVidia Linux drivers with Linux on Mac, help? Thetargos NVIDIA Linux 0 05-13-12 12:52 PM
302.07 (beta) for Linux x86/x86_64 released AaronP NVIDIA Linux 0 05-02-12 09:55 AM
Getting the proprietary nvidia driver to run with Debian 3.0 r0 (woody) Katchina404 NVIDIA Linux 9 01-12-03 08:49 AM
download problem with linux NVIDIA driver packages Timo NVIDIA Linux 7 07-31-02 09:22 AM

All times are GMT -5. The time now is 04:40 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.