|
|
#1 | |
|
Registered User
Join Date: Aug 2004
Posts: 3
|
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. |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Aug 2004
Posts: 4
|
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
|
|
|
|
|
|
|
#3 |
|
NVIDIA Corporation
Join Date: Aug 2002
Posts: 3,740
|
What error messages do you receive, exactly?
|
|
|
|
|
|
#4 | |
|
Registered User
Join Date: Aug 2004
Posts: 4
|
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) |
|
|
|
|
|
|
#5 |
|
NVIDIA Corporation
Join Date: Aug 2002
Posts: 3,740
|
Please check the output of dmesg for error messages after the failed installation attempt (chances are there's a module version magic conflict).
|
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Aug 2004
Posts: 4
|
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?)? |
|
|
|
|
|
|
#7 |
|
NVIDIA Corporation
Join Date: Aug 2002
Posts: 3,740
|
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).
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Aug 2004
Posts: 3
|
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. |
|
|
|
|
|
#9 |
|
NVIDIA Corporation
Join Date: Aug 2002
Posts: 3,740
|
One thing worth checking is that gcc -v and cc -v report the same compiler version.
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Aug 2004
Posts: 3
|
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 |
|
|
|
|
|
#11 | |
|
Registered User
Join Date: Aug 2004
Posts: 6
|
Quote:
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... |
|
|
|
|
|
|
#12 |
|
Registered User
Join Date: Aug 2004
Posts: 4
|
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. |
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Random crashes, NVRM Xid messages | Iesos | NVIDIA Linux | 90 | 10-04-12 03:27 AM |
| Corrupted display - 302.17 - Dell Precision T3500 (G98 [Quadro NVS 295]) | gbailey | NVIDIA Linux | 1 | 06-27-12 10:24 AM |
| UEFI+Nvidia - NVRM: Your system is not currently configured to drive a VGA console... | interzoneuk | NVIDIA Linux | 0 | 06-26-12 04:51 AM |
| xorg locks-up with newest nvidia drivers w/ vdpau. | theroot | NVIDIA Linux | 1 | 06-24-12 11:04 AM |
| Crash when logout from X | TGL | NVIDIA Linux | 10 | 09-13-02 08:22 PM |