Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to compile the Nvidia drivers on a Dual Athlon system running Mandrake 9.0. I've read all the related questions in the forums and I'm pretty sure i understand the process, but I'm getting weird errors when I try to compile the kernel from source. It's long, but I'm hoping someone can help me out.
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3123 -DNV_UNIX -DNV_LINUX -DNVCPU_X86 -I. -I/usr/src/linux/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: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:55: requested alignment is not a constant
In file included from /usr/include/linux/module.h:296,
from nv-linux.h:28,
from nv.c:14:
/usr/include/linux/version.h:2:2: #error "======================================================="
some more stuff
"======================================================="
In file included from nv.c:14:
nv-linux.h:31:40: missing binary operator before '('
nv-linux.h:33:42: missing binary operator before '('
nv-linux.h:35:42: missing binary operator before '('
nv-linux.h:37:42: missing binary operator before '('
nv-linux.h:39:42: missing binary operator before '('
nv-linux.h:43:4: #error This driver does not support 2.6.x or newer kernels!
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/irq.h:65: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in
a function)
/usr/include/linux/irq.h:65: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/asm/hardirq.h:16: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not
in a function)
/usr/include/asm/hardirq.h:16: requested alignment is not a constant
In file included from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/interrupt.h:128: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here
(not in a function)
/usr/include/linux/interrupt.h:128: requested alignment is not a constant
nv-linux.h:111:28: linux/autoconf.h: No such file or directory
nv.c:99:65: missing binary operator before '('
nv.c:697:65: missing binary operator before '('
nv.c:1011:65: missing binary operator before '('
nv.c:1040:65: missing binary operator before '('
nv.c:1383:65: missing binary operator before '('
nv.c: In function `nv_kern_mmap':
nv.c:1386: warning: implicit declaration of function `pgprot_writecombine'
nv.c:1386: incompatible types in assignment
nv.c:2926:65: missing binary operator before '('
make: *** [nv.o] Error 1
I had the same problem when trying to complile my nvidia drivers, I fixed it by installing "kernel development " packages from the package selection screen.
I was curious about that too, my kernel is the one that comes with Mandrake 9.0 SMP. I'm not at home now, but I know it's 2.4 something. It's definately not 2.6.x
Hi there, I am a complete Linux newb and I suffer from the exact same problem described here.
In my case I have exasperated the situation by compiling GLX after getting the above error while compiling the kernel drivers. I have had little luck trying to find out how to reverse my compiling of GLX (in fact googling for that procedure led me here) and it is my understanding that both versions need to match or no X for me
I am unable to get into X at all, however I believe if I can get the kernel driver installed all should be well. Now I see that having the source rpm installed resolved this problem.... would someone be kind enough to elaborate on this?
I don't have any rpms for the drivers, just the two tarballs, do I need to get another file or does this refer to a package?? .... very confused as to how to proceed....
I am running a virtually stock Mandrake 9 install.
Originally posted by nG.Aeon I am unable to get into X at all, however I believe if I can get the kernel driver installed all should be well. Now I see that having the source rpm installed resolved this problem.... would someone be kind enough to elaborate on this?
I realize this is 2 months old but I can't read this and leave it unanswered. In case you haven't figured it out yet he was referring to having the linux kernel source RPM installed. The nvidia make process looks to the kernel source code and if that isn't available on your system you'll get the errors you encountered.
And I will add to this as well: if compiling fails make sure that not only you installed the kernel sources but also that they are EXACTLY the same version as the kernel you are using.
I'm using RedHat 8.0 and installed the source RPMs from the CDs but I just couldn't compile. Untill I started apt-get (for Red Hat) and found out that the sources were actually slightly older (2.4.18-19 instead of 2.4.18-24). Upgrading to the latest sources fixed the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.