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

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-24-04, 04:23 PM   #13
AbsentVegetable
Registered User
 
Join Date: Feb 2004
Posts: 2
Default

I have had problems with compiler version mismatches between the installed linux kernel and the nvidia drivers as well. If you do not want to recompile your linux kernel ( can be high overhead / complex ), you might try forcing the nvidia installer to use the same gcc version as your running linux kernel this waymy command prompt is 'kludge:')

Identify your running kernel by:
kludge:grep gcc /var/log/messages -a
This should show which gcc-?.? your linux kernel was built with.

Identify your current default gcc by:
kludge:ls -l /usr/bin/gcc
This should show a link like 'gcc -> gcc-3.0' or such. Note this because if you change your gcc link manually to compile the nvidia drivers you'll want to change it back when done.

List the other gcc versions available:
kludge:ls -l /usr/bin/gcc*
This should show several 'gcc-?.?'s in /usr/bin

Is one the same as your linux kernel gcc from 'grep gcc /var/log..' ?

If so, then you could try
kludge:cd /usr/bin
kludge:mv gcc gcc-true
to sideline the existing debian propor gcc->gcc?.? link
Then make a link to the presumably older gcc version that your linux kernol was built with, if your linux kernel was built with gcc-2.95 :
kludge:ln -sf gcc-2.95 gcc
and do
kludge: ls -l /usr/bin/gcc
to verify the new link.

Then try building the nvidia driver.

Make sure you go back to /usr/bin and restore the proper debian gcc:
cd /usr/bin
rm gcc
mv gcc-true gcc
and verify,
ls -l gcc

The 'update-alternatives' command might be a more debian proper way to do this. (update-alternatives --config gcc / man update-alternatives for more)

There might also be minor differences between updated versions of gcc-2.95 that stymie this approach, but overall it should be a lot more simple than upgrading linux kernel versions or recompiling a kernel.
AbsentVegetable is offline   Reply With Quote
Old 02-24-04, 05:48 PM   #14
crimarti
Registered User
 
Join Date: Feb 2004
Posts: 3
Default

AbsentVegetable:


Quote:
Then try building the nvidia driver.
how do i build the nvidia driver?

your guide is easy to follow but i don't know how to do this.




BTW i'm using debian 3.0r0 and my kernel is 2.4.18


thanks in advance.

c.
crimarti is offline   Reply With Quote
Old 02-24-04, 08:58 PM   #15
AbsentVegetable
Registered User
 
Join Date: Feb 2004
Posts: 2
Default

To build the nvidia driver I usually do simply:
kludge: sh ./NVIDIA-Linux-x86-1.0-xxxx-pkg1.run
(http://download.nvidia.com/XFree86/L...-5336-pkg1.run)
that is what I meant by build the nvidia driver.

the full instructions are of course:
ftp://download.nvidia.com/XFree86/Li....0-5336/README


I note now that update-alternatives does not manage /usr/bin/gcc
AbsentVegetable is offline   Reply With Quote
Old 02-24-04, 10:30 PM   #16
forestial
Registered User
 
Join Date: Feb 2004
Posts: 13
Default Re: Need to install new kernel as well

Quote:
Originally posted by kommisar
Did you install your newly compiled kernel ? If not you are still running the one you installed with Debian which may not have been compiled with 2.95. .... Your running kernel should be compiled by the same version of gcc that you use to compile the nvidia drivers.
OK: I had not done this before, but I have now. I built my own kernel on
my machine with gcc 2.95 and I have installed it and booted with it.

Now when running
sh NVIDIA-Linux-x86-1.0.5336-pkg1.run --kernel-source-path=/usr/src/kernel-source-2.4.18

I get a new error (or series of errors). From the log:

Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.o'. This is most likely
because the kernel module was built using the wrong kernel source files.
Please make sure you have installed the kernel source files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
'kernel-source' rpm installed. If you know the correct kernel source
files are installed, you may specify the kernel source path with the
'--kernel-source-path' commandline option.
-> Kernel module load error: ./usr/src/nv/nvidia.o: unresolved symbol
_mmx_memcpy
./usr/src/nv/nvidia.o:
Hint: You are trying to load a module without a GPL compatible license
and it has unresolved symbols. Contact the module supplier for
assistance, only they can help you.


The error about _mmx_memcpy is puzzling. My machine has an Athlon cpu and I set the kernel options to specify this. And the kernel and the kernel modules built cleanly.
forestial is offline   Reply With Quote
Old 02-24-04, 10:53 PM   #17
kommisar
Registered User
 
Join Date: Feb 2004
Posts: 8
Default sym link to kernel_source_2.4.18?

Hi

The nvidia build file assumes that your source files are in /usr/src/linux. This is not the debian way... as debian puts your kernel source files in /usr/src/kernel_source_2.4.18. Now you could fix the problem by creating a sym link in /usr/src to fool the nvidia build file as follows:


"ln -s /usr/src/kernel_source_2.4.18 /usr/src/linux"


Just make sure you delete this link after you are finished compiling the drivers.

Alternatively there is an option you can invoke upon calling the nvidia builder where you specify your path to the kernel source. I don't remember the exact syntax of the option. Check the readme.

Cheers
kommisar is offline   Reply With Quote
Old 02-24-04, 11:10 PM   #18
crimarti
Registered User
 
Join Date: Feb 2004
Posts: 3
Default

hi, i've tried the AbsentVegetable solution but i still get the same error:


performing cc_version_check with CC="cc" (i pasted this from the log)

unable to determine the nvidia kernel module module filename

and below, in the black part of the screen:

sh:make: command not found.


i guess i'm missing something related with kernel headers/sources, look, i was told to install the kernel headers before running nvidia installer, i went and type:

apt-get install kernel-headers-2.4.18

but apt returned: package not found so i went and change the order to:

apt-get install kernel-source-2.4.18
and apt told me to insert the cd and voilą, but later i realize that the only thing apt did was to create (or copy form the cd, i don't know) the file linux-2.4.18.bz2 in /usr/src. again i went and uncompress the file in the same /src folder and then made the symbolic link and so on.

is this right?, i'm almost sure that i made a mistake somewhere.

also, when trying the AbsentVegetable solution i couldn't get any gcc version from /usr/bin/, using this order: ls -l /usr/bin/gcc returns "no such file or directory", the same with ls -l /usr/bin/gcc*

ok. thnkz

c.
crimarti is offline   Reply With Quote
Old 02-24-04, 11:28 PM   #19
kommisar
Registered User
 
Join Date: Feb 2004
Posts: 8
Default

Quote:
Originally posted by crimarti

apt-get install kernel-headers-2.4.18

but apt returned: package not found so i went and change the order to:

you should try "apt-get install kernel_source_2.4.18".

Notice those are underscores and not dashes (at least the kernel_source_2.4.18 part - apt-get is a dash)

Quote:
Originally posted by crimarti


apt-get install kernel-source-2.4.18
and apt told me to insert the cd and voilą, but later i realize that the only thing apt did was to create (or copy form the cd, i don't know) the file linux-2.4.18.bz2 in /usr/src. again i went and uncompress the file in the same /src folder and then made the symbolic link and so on.

is this right?, i'm almost sure that i made a mistake somewhere.
All that will do is download the kernel source, unpack it in /usr/src/kernel_source_2.4.18.

It does not compile the kernel, or install it, or point the volume boot record at the new image for booting purposes. You need to find the kernel install HOWTO.
kommisar is offline   Reply With Quote
Old 02-25-04, 10:41 AM   #20
forestial
Registered User
 
Join Date: Feb 2004
Posts: 13
Default Re: sym link to kernel_source_2.4.18?

Quote:
Originally posted by kommisar
The nvidia build file assumes that your source files are in /usr/src/linux. This is not the debian way... as debian puts your kernel source files in /usr/src/kernel_source_2.4.18. Now you could fix the problem by creating a sym link in /usr/src to fool the nvidia build file as follows:

"ln -s /usr/src/kernel_source_2.4.18 /usr/src/linux"

Just make sure you delete this link after you are finished compiling the drivers.

Alternatively there is an option you can invoke upon calling the nvidia builder where you specify your path to the kernel source. I don't remember the exact syntax of the option. Check the readme.
I did both of these: created a symlink and specified the --kernel-source-path=/usr/src/kernel-source-2.4.18
option when running the nvidia installer. (I had not realized
that creating /usr/src/linux is not the 'debian way'; I just automatically
did it because I remembered doing so when I used RedHat a while back).
forestial is offline   Reply With Quote

Old 02-25-04, 11:17 AM   #21
kommisar
Registered User
 
Join Date: Feb 2004
Posts: 8
Default

try it with the symlink but not the --kernel-source-path run time option.
kommisar is offline   Reply With Quote
Old 02-25-04, 10:15 PM   #22
forestial
Registered User
 
Join Date: Feb 2004
Posts: 13
Default It works now

After a bit of googling on the "_mmx_memcpy" issue I found a workaround.
See here for the clue. I had to do the 'make bzImage' with the kernel options specifying a K7 processor, which is what I am running, then change the
options to specify Intel Coppermine and run the NVIDIA installer. This
allows the installer to build. I assume (hope) that this has been fixed in
later kernels.

Then a quick 'insmod nvidia', and a few tweaks to XFConfig-4 (these are
documented in the NVIDIA readme file) and I was up and running.

Thanks to all for the suggestions.
forestial is offline   Reply With Quote
Old 02-26-04, 05:05 AM   #23
ivasic
Registered User
 
Join Date: Feb 2004
Posts: 2
Default

Please, since you solved the problem could someone PLEASE write this again in stepbystep instructions, 'cause I can't follow instructions i so many posts.... PLEASE !
ivasic is offline   Reply With Quote
Old 02-26-04, 08:25 AM   #24
forestial
Registered User
 
Join Date: Feb 2004
Posts: 13
Default

I'll take a shot at listing the major steps but I won't claim this is
definitive. A lot of this (the details of how to build the kernel, for
example) are already documented in HOWTOs and
other online documents; it's mostly a matter of searching for the
right information and trying things out. (It's the Linux Way :-)

Note that this is specific to debian woody (2.4.18 kernel) and the
5336 version of the nvdia installer. Also, part of my trouble was
related to configuring the kernel for Athlon; if you haven't done
this you can skip step 6 below.

The two main documents you will need are:
Creating custom kernels with Debian's kernel-package system and
the README file that comes with the NVIDIA installer.

Disclaimer: this is from memory - I don't have the Linux machine here
at the moment - so there may be some errors in file and directory names below.

1. Download the source for the kernel you are running:
apt-get install kernel-source-2.4.18

2. Download the nvidia installer package - see the sticky thread at the
top of this forum about IA32 for the link.

3. Build and install a new kernel. This is of course a pretty large task
but it's well documented in many places: the document referenced above
is a good one because it's debian specific.

4. Boot with your new kernel; make sure everything's working. A key
point here is that you must be running the kernel that you are
trying to run the nvidia installer against; it is not sufficient to have
the kernel source without building or running it.

5. Recreate the symlink that the kernel building instructions told you to
remove when you were done:
cd /usr/src
ln -s kernel-source-2.4.18 linux

6. IF you built the kernel for Athlon/Duron, do
make menuconfig
and change the processor option to Intel Coppermine. This was the
key step that caused me trouble because it is entirely non-obvious.
It's possible you don't need to do this with more recent kernels. If you
get errors talking about _mmx_memcpy in the next step, this is what
cures it.

7. Go back to the directory where you downloaded the nvidia installer.
Type
sh NVIDIA-Linux-x86-1.0-5336-pkg1.run
This will build the nvidia driver as a module.
If you have trouble here, pay careful attention to the log file in
/var/log/nvidia-installer.log
it does an excellent job with clear, helpful error messages.

8. Run
insmod nvidia
to load the module into the kernel. Once you have everything working
you need to make this permanent by editing /etc/modules.conf (I think that's the name)

9. Go back to /usr/src/linux; run
make menuconfig
and change the processor option back to whatever it really should be
(whatever processor you actually have).

10. Go back to /usr/src and remove the symlink
rm linux

11. Edit /etc/X11/XF86config-4
Find the Device section and replace the line:
Driver "nv"
(or Driver "vesa")

with

Driver "nvidia"

In the Module section, make sure you have:

Load "glx"

You should also remove the following lines:

Load "dri"
Load "GLcore"

if they exist. (This step is copied from the nvidia README: it's well
worth reading through this because they have a good FAQ section that
covers a lot of common problems).

12. Run
startx
and you should see an nvidia splash screen followed by the desktop
environment (KDE seems to be the default in debian). If you have errors
here, carefully read the xf86 log file in /var/log for clues. Often, if you
find the first error message and paste it into Google you may turn up
some useful information where someone has encountered the same
error before.
forestial 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
[9800gt] Xorg black screen after installing nvidia driver HacKurx NVIDIA Linux 1 06-07-12 01:29 PM
Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 Ferianto85 NVIDIA Linux 0 05-18-12 08:35 PM
Getting the proprietary nvidia driver to run with Debian 3.0 r0 (woody) Katchina404 NVIDIA Linux 9 01-12-03 08:49 AM
GF4 Nvidia Driver 2960, Win TV Problem, Freeze titan3025 NVIDIA Linux 5 09-06-02 07:12 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 12:19 PM.


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