nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   nvidia.ko problems in kernel 2.6.7 (http://www.nvnews.net/vbulletin/showthread.php?t=35295)

Tristania 08-22-04 03:49 AM

nvidia.ko problems in kernel 2.6.7
 
I compiled Linux 2.6.7 (I'm a kernel n00b, and this was the first one I ever got working), and everything seemed to be working fine, until I tried to install Nvidia. First, it would build, then tell me that the nvidia.ko could not be loaded, possibly because I used the wrong kernel source, which I know I didn't. I used --kernel-source-path="/usr/src/linux-2.6.7"... The exact source for the kernel I built.

After that, I used the --kernel-source-path, along with --kernel-name="linux-2.6.7", in which the Nvidia installer didn't give me the nvidia.ko error. However, when I tried to startx, it would give me an Nvidia error. I tried to locate nvidia.ko, and it couldn't be found. One person I talked to was completely baffled at this, and said it wasn't building right. So I came here for help.

If you've got any suggestions, they would be much appreciated. I am using Slackware 10.0.

Ernest0x 08-22-04 03:32 PM

Re: nvidia.ko problems in kernel 2.6.7
 
I have exactly the same problem and it seems to have to do with Slackware 10 since it occured after the upgrade from slack 9.1

zander 08-22-04 03:49 PM

Re: nvidia.ko problems in kernel 2.6.7
 
What error messages do you receive, exactly?

Ernest0x 08-22-04 03:56 PM

Re: nvidia.ko problems in kernel 2.6.7
 
I get the following error:

ERROR: Unable to load the kernel module 'nvidia.ko'. 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.

It seems nonesense since both the running kernel and the kernel sources are the same (2.6.7)

zander 08-22-04 04:08 PM

Re: nvidia.ko problems in kernel 2.6.7
 
Please check the output of dmesg for error messages after the failed installation attempt (chances are there's a module version magic conflict).

Ernest0x 08-22-04 04:20 PM

Re: nvidia.ko problems in kernel 2.6.7
 
You are right. I get the following:
nvidia: version magic '2.6.7 SMP preempt K7 4KSTACKS gcc-3.3' should be '2.6.7 SMP preempt K7 4KSTACKS gcc-3.2'

It looks to me as if the nvidia module is built with gcc-3.3 while the kernel has been built with gcc-3.2 or something like that, but I' m not that sure. Could you please explain me what does it mean and how I can fix it (by recompiling the kernel maybe?)?

zander 08-22-04 04:32 PM

Re: nvidia.ko problems in kernel 2.6.7
 
The error message (generated by the module loader based on version magic stamped onto the binaries) indicates that the kernel was built with gcc 3.2, whereas the NVIDIA kernel module was built with gcc 3.3; you'll need to rebuild either of the two with the respective other compiler to solve this problem (rebuilding the NVIDIA kernel module is probably less time consuming, provided you can easily (re-)install gcc 3.2).

Tristania 08-22-04 09:51 PM

Re: nvidia.ko problems in kernel 2.6.7
 
Those are the error messages I got as well.

Sorry I couldn't provide them, I was on a laptop posting and wasn't on that system at that time. I can be sure that I compiled both the kernel and the nvidia module with the same gcc version, because I compiled the kernel, booted into it, and immediately tried to install the Nvidia driver.

However, someone told me the same thing. He told me how to check which version I compiled them with, to be 100% sure, but I've forgotten.

zander 08-23-04 12:00 AM

Re: nvidia.ko problems in kernel 2.6.7
 
One thing worth checking is that gcc -v and cc -v report the same compiler version.

Tristania 08-23-04 12:57 AM

Re: nvidia.ko problems in kernel 2.6.7
 
Oy, you're right!

cc -v gives me 3.3.4, while gcc -v gives me 3.4.0!

So either the kernel was compiled with cc and the nvidia used gcc, or vise versa.

Is there a way I can control what nvidia uses to build? Or any other suggestions

agri 08-23-04 01:55 AM

Re: nvidia.ko problems in kernel 2.6.7
 
Quote:

Originally Posted by Tristania
Oy, you're right!

cc -v gives me 3.3.4, while gcc -v gives me 3.4.0!

So either the kernel was compiled with cc and the nvidia used gcc, or vise versa.

Is there a way I can control what nvidia uses to build? Or any other suggestions

kernel build with gcc... and nvidia with cc.

hmmm... i dont know how nvidia make files works...
u may try set CC environment.... e.g. bash> CC=gcc ./command-to-fight args...

make either understand
make CC=gcc fight-target

i tryied do smth like that .... it doesn't help for me...

u may try another way
find your cc and gcc
bash> whereis gcc
bash> whereis cc
this shows u all files of that name... commands.. manfiles.. info... and otheres
i suppose that cc it just a symbolic link... u can change it to point to where your gcc is i.e. set into cc symlink to full gcc path of rite version.
if u get few gcc installs... u can check version providing full execfile path...
bash> /path/to/my/gcc --version
of smth like that...
after all... u will build your nvidia with the same compiler.

p.s. same compiler... seems like kernel paranoya...

Ernest0x 08-23-04 02:49 AM

Re: nvidia.ko problems in kernel 2.6.7
 
My problem (which is the same problem described by others in this thread) was solved by just recompiling my kernel with gcc 3.3 and then building the nvidia kernel module (with the same gcc 3.3 compiler). It could be fixed also in the opposite way as zander said before, by re-installing the old gcc 3.2 compiler and building the nvidia kernel with it. I prefered to rebuild the kernel though since I want to use gcc 3.3 from now on.
The lesson here is (correct me if I'm wrong) that in order to build succesfully the nvidia kernel module you not only need to have installed the sources of the running kernel, but you also need to build the module with the same compiler, of the same version that the running kernel is built with.
I think it would be helpful if this extra tip (about compiler versions) is added to the error message of the nvidia installer.


All times are GMT -5. The time now is 02:34 AM.

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