LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 11-05-2002, 01:30 PM   #1
acidream
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Rep: Reputation: 15
Angry Nvidia driver compile errors


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

Thanks,
Scott
 
Old 11-05-2002, 01:49 PM   #2
Vaevictus
LQ Newbie
 
Registered: Nov 2002
Location: Wales
Distribution: Red Hat 8.0
Posts: 14

Rep: Reputation: 0
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.
 
Old 11-05-2002, 03:10 PM   #3
acidream
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Original Poster
Rep: Reputation: 15
I have all the kernel development packages installed. I also tried installing all the ones in the other catagory, but no luck
 
Old 11-05-2002, 04:03 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,394
Blog Entries: 55

Rep: Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566Reputation: 3566
"nv-linux.h:43:4: #error This driver does not support 2.6.x or newer kernels!"

So, what kernel source are you building this against?
 
Old 11-05-2002, 04:41 PM   #5
acidream
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Original Poster
Rep: Reputation: 15
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
 
Old 11-07-2002, 05:52 PM   #6
acidream
LQ Newbie
 
Registered: Oct 2002
Posts: 23

Original Poster
Rep: Reputation: 15
I finally got them to compile. It turns out I didn't have the source RPM installed. oops.

Scott
 
Old 12-28-2002, 09:34 AM   #7
nG.Aeon
LQ Newbie
 
Registered: Dec 2002
Posts: 2

Rep: Reputation: 0
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.
 
Old 02-14-2003, 03:31 PM   #8
petway56
LQ Newbie
 
Registered: Feb 2003
Posts: 7

Rep: Reputation: 0
Quote:
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.
 
Old 02-19-2003, 08:01 PM   #9
Quintesse
LQ Newbie
 
Registered: Feb 2003
Posts: 6

Rep: Reputation: 0
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.

BTW: Love apt-get!!! (look here for example: http://www.freshrpms.net/apt/) Made life a lot easier for this newbie
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
NVidia Driver Installer errors DoddyUK Linux - Software 1 06-03-2005 01:46 PM
nvidia driver install errors djc_slip Mandriva 3 02-25-2005 05:04 PM
errors when trying to compile hsf driver cornfed Linux - Software 2 05-02-2004 09:31 AM
Driver compile parse errors Livia Linux - General 1 02-18-2004 09:25 AM
D-Link driver compile -> billions of errors Wynd Linux - Hardware 1 07-18-2003 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:22 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration