Click to See Complete Forum and Search --> : Trouble compiling nvidia drivers in mdk 8.0


recluse
05-01-2001, 11:55 PM
When trying to compile the drivers from src I get the errors:

[root@localhost NVIDIA_kernel-0.9-769]# make
rm -f nv.o os-interface.o os-registry.o Module-linux NVdriver
cc -c -Wall -Wunknown-pragmas -Wno-multichar -O -D__KERNEL__ -DMODULE -D_LOOSE_
KERNEL_NAMES -DUNIX -DLINUX -DNV4_HW -DNTRM -DRM20 -D_X86_=1 -Di386=1 -D_GNU_SOU
RCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION
=0 -DNV_PATCHLEVEL=769 -I. -I/usr/src/linux/include nv.c
In file included from nv.c:50:
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-hea
ders system headers,
/usr/include/linux/modversions.h:2:2: #error but headers from an appropriate ker
nel-source
make: *** [nv.o] Error 1
[root@localhost NVIDIA_kernel-0.9-769]#
I'm running xfree86 4.0.3 btw if it helps.
-geordan

rick420
05-02-2001, 08:25 AM
Hey man, I had the same problem...u have to make sure you have the kernel-source installed. Just go to whatever software manager u use and search for it and install it. Once I did that, I had no problems installing---BTW, are u using mdk 8.0?

nopun
05-02-2001, 08:25 AM
From what I can tell by looking at that, it's telling us that only header files from a kernel source should be used. To that end, it uses the gcc parameter "-I/usr/src/linux/include" to tell the compiler where to look for these header files. Because it is not finding "modversions.h" there, it has taken it from the default place (ie /usr/include)
The first question is - do you have a kernel source installed? If not, you can probably install it as a package from your Mandrake media.
Secondly, if you do, is it located under /usr/src/linux? If it is not, either move it there, or modify that "-I" parameter in the Makefile.

edit: hey, rick420 beat me to it - read his reply, you can't beat first hand experience :)

[ 02 May 2001: Message edited by: nopun ]