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):
/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 ?
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
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 ?
~$ ls /usr/src/redhat/SRPMS/
These are the version that I use in my system.
~$ cat /proc/version
Linux version 2.4.18-11custom (email@example.com) (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 ... )
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.
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
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? ;)
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
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 ;)
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... :)
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...
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.
thanks for all the answers - the modutils rpm replacement finally was the working solution...
|All times are GMT -5. The time now is 08:10 AM.|
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.