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

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-01-02, 10:04 AM   #1
valserWater
Guest
 
Posts: n/a
Default gcc version3 kenrel module problems

I tried to install the nvidia driver for the Redhat 8.0 beta2 release, which has kernel modules compiled with gcc version 3. Here is the error message I get when I try to load the NVdriver module (I created the module from the src RPMs):
--------------------------
Using /lib/modules/2.4.18-11/kernel/drivers/video/NVdriver
/lib/modules/2.4.18-11/kernel/drivers/video/NVdriver: The module you are trying to load (/lib/modules/2.4.18-11/kernel/drivers/video/NVdriver) is compiled with a gcc
version 2 compiler, while the kernel you are running is compiled with
a gcc version 3 compiler. This is known to not work.
-----------------------
The gcc version used when recreating the NVdriver module was also gcc 3, but still I get this error message. Is there a version of the NVIDIA driver which is compatible with gcc 3 ?
  Reply With Quote
Old 09-01-02, 11:16 AM   #2
utiel
Registered User
 
Join Date: Aug 2002
Location: mallorca
Posts: 65
Default gcc3

I use Redhat null beta, and I compile kernel with gcc3, and then instaled Nvidia drivers.

I use nvidia srpm, and make rpm with this command:
rpmbuild --rebuild *.srpm

The compiled binaries are in /usr/src/redhat/RPMS/i386 and they work for me

Check if you installed gcc-2.96.

srpm use cc instead of gcc

cc -v?? and you will now your compiler version
utiel is offline   Reply With Quote
Old 09-01-02, 12:34 PM   #3
valserWater
Guest
 
Posts: n/a
Default

thanks for the answer - but unfortunately the problem persists. Both gcc and cc are definitely version 3.2, no 2.96 installed at all on my machine. Which version of the source rpm files did you use ?
  Reply With Quote
Old 09-01-02, 10:51 PM   #4
utiel
Registered User
 
Join Date: Aug 2002
Location: mallorca
Posts: 65
Default gcc-3

~$ ls /usr/src/redhat/SRPMS/
NVIDIA_GLX-1.0-2960.src.rpm NVIDIA_kernel-1.0-2960.src.rpm

These are the version that I use in my system.

~$ cat /proc/version
Linux version 2.4.18-11custom (root@localhost.localdomain) (gcc versión 3.2 (Red Hat Linux Rawhide 3.2-1)) #2 jue ago 29 00:38:56 EDT 2002

As you can see, I have compiled my own kernel (with my preferred options, MTRR, noAGP-gart ), not default kernel from RedHat disk.

(even, o forever) you change kernel, you need to recompile NVIDIA_kernel, and install it (rpm -U --force ... )
utiel is offline   Reply With Quote
Old 09-03-02, 01:07 AM   #5
Soul-Crusher
Leadtek 6800GT
 
Join Date: Aug 2002
Location: Albuquerque, NM, USA
Posts: 195
Send a message via ICQ to Soul-Crusher Send a message via AIM to Soul-Crusher Send a message via Yahoo to Soul-Crusher
Default

You should compile the nVidia module with the same version of GCC you used to compile your kernel. You compiled your kernel with version 3, so use the same version to compile the nVidia module.

I think you can also do IGNORE_CC_MISMATCH, but that's probably not a good idea.
__________________
"Floating in a dream-like state, I am the emporer of a parallel universe." --Arch Enemy
My xorg.conf file
Soul-Crusher is offline   Reply With Quote
Old 09-03-02, 09:09 AM   #6
kermuli
Registered User
 
Join Date: Sep 2002
Posts: 8
Default

The same problem exists here. I have fresh (null) distribution installed, with gcc 3.2. The driver compiles ok, but refuses to install. The error message is coming from insmod, complaining that the nvdriver is compiled with gcc 2 while the kernel is complied with gcc 3.

In my case this simply is not possible since there is no gcc 2 in my machine. My suggestion is that this has something to do with the precompiled binary that comes with kernel module package. If its format is different from gcc 3 format, then it might cause this kind of touble.

And yes, I use my own compiled kernel 2.4.18 with the very same gcc 3.2-1
kermuli is offline   Reply With Quote
Old 09-03-02, 01:45 PM   #7
jgshanks
Registered User
 
Join Date: Sep 2002
Posts: 2
Default mod-utils is the problem

It appears that Red Hat has modified modutils to check for drivers compliled with non 3.x libraries (such as the nVidia driver). The generic version doesn't seem to do the check. That's why other distro's don't have this problem.

The easy fix is to download the generic modutils-2.4.19-1.scr.rpm from http://www.kernel.org/pub/linux/util...modutils/v2.4/, recomple it with rpmbuild and then upgrade to it. (rpm -U). It's been working great for me.

I'm sure that this fix is not acceptable to Red Hat and hopefully nVidia will see the light and fix their binary driver, but then what are betas for?

Last edited by jgshanks; 09-04-02 at 10:12 AM.
jgshanks is offline   Reply With Quote
Old 09-03-02, 07:44 PM   #8
utiel
Registered User
 
Join Date: Aug 2002
Location: mallorca
Posts: 65
Default RedHat Null, and Nvidia kernel

I compiled my custom kernel, in RedHat Null.

It worked for my new kernel, doing this

"rpmbuild --rebuild NVIDIA_kernel-1.0-2960.src.rpm"
"rpmbuild --rebuild NVIDIA_GLX...."

and then, install it from /usr/src/redhat/RPMS/i386

Posibly problems:

1. Kernel not configured, and Nvidia_kernel will not compile

2. Diferent version, between Nvidia_kernel and kernel (ie. install it in 2.4.18-11custom instead of 2.4.18 ). Look your /lib/modules directories and version from /usr/src/linux/Makefile

3. if doesn't work, and you installed Nvidia driver, try to force it,
add "/sbin/insmod -f NVdriver" at the end of /etc/rc.d/rc.local

(Is not a valid solution, but work until you find where is the error)

4. I am not an linux expert, and my english is very bad. No more sugestions
utiel is offline   Reply With Quote

Old 09-04-02, 01:35 AM   #9
kermuli
Registered User
 
Join Date: Sep 2002
Posts: 8
Default

Thanks for the help. I downloaded modutils 2.4.18, recompiled and installed the package over redhat provided modutils. Now everything works as it has always been...

Thanks.
kermuli is offline   Reply With Quote
Old 09-04-02, 02:51 AM   #10
augur
Guest
 
Posts: n/a
Unhappy

The problem is that the binary-only Module-nvkernel object the "driver source" (actually a driver-wrapper) links against was compiled with GCC 2.x.. GCC 2.x and 3.2 object files are not completely binary compatible. Seems like (un)hacking modutils would be OK for a beta on an unimportant machine but not much more. I do hope they release updated binaries (or some actual driver source ;-) as soon as (or before) Redhat makes an "official" release...
  Reply With Quote
Old 09-04-02, 10:45 AM   #11
kermuli
Registered User
 
Join Date: Sep 2002
Posts: 8
Default

Nervetheless it is interesting, because the binary "chunk" is enclosed in an output driver that has some .c files around it. If the format of the binary file was that much different from the gcc 3.2 produced output objects, I think there should be a lot of errors in the compilation phase at least from the linker. But as stated, compiler itself is happy with the files, even with the binary file. It is the insmod that complains that the gcc3.2 outputted driver is not gcc 3.2 output file.

However, I have not digged the source files and thus I don't know the mechanism for loading this kernel module. I have always disagreed this method for driver distribution. Binary only is bad, but what can you do... The fact is that if you want to have working 3d acceleration with geforce cards on linux, you either use this hack or forget the acceleration completely.
kermuli is offline   Reply With Quote
Old 09-07-02, 10:40 AM   #12
valserWater
Guest
 
Posts: n/a
Smile

thanks for all the answers - the modutils rpm replacement finally was the working solution...
  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
nvidia + 2.4.19 gentoo = messed up ulukay NVIDIA Linux 18 11-02-02 12:58 AM
X Failed to load NVdriver c00lr4c3r NVIDIA Linux 13 10-22-02 02:44 PM
Error messages... HELP!!!! Imperito NVIDIA Linux 3 09-24-02 11:46 PM
GForce drivers installed...but dont work tomfullery NVIDIA Linux 6 09-22-02 09:23 AM
Need help to get the X to work on my Acer TravelMate 630 knchee NVIDIA Linux 16 09-19-02 11:16 PM

All times are GMT -5. The time now is 05:46 PM.


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