version problem

LLeweLLyn Reese llewelly@lifesupport.shutdown.com
Sat Mar 8 22:54:00 GMT 2003


"Andre Azaroff" <AndreAzaroff@stonge.com> writes:

> I have just run across a problem with versioning.
> 
> I am trying to compile a vendor supplied driver for a fibre channel card. the vendor claims kernel 2.4.4 (redhat 7.x) compatibility.
> 
> Currently the code compiles with only one warning as follows
> 
> In file included from fcLINUXfcp.c:116:
> /usr/src/linux/include/linux/module.h:15:1: warning: "_set_ver" redefined
> In file included from /usr/src/linux/include/linux/modversions.h:4,
>                  from <command line>:1:
> /usr/src/linux/include/linux/modsetver.h:9:1: warning: this is the location of the previous definition
> 
> when I try to inser the module I get the following error:
> 
> lpfcdriver.o: The module you are trying to load (./lpfcdriver.o) 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.
> 
> my current version of gcc is 3.2-7 (stock redhat v8.0 no patches applied for any packages yet)
> redhat stock install has several hooks into the gcc compiler as follows:
> gcc
> gnatgcc
> gcc296
> i386-redhat-linux-gcc
> i386-redhat-linux7-gcc
> 
> I have tried each one in turn without and with the -b and -V switches (tried each switch seperately and tried both together with each compiler hook) in accordance with your documentation with no luck. The module allways compiles using the version 2 compiler. I have also scoured the code (not a very big source file and can find noplace where they are explicitly setting the compiler version although it is possible i missed it
> 
> the compiler is set up to compile for 3.2 and 2.96. that is to say there exist both a /usr/lib/gcc-lib/i386-redhat-linux/3.2 and a /usr/lib/gcc-lib/i386-redhat-linux7/2.96 directory.
> 
> your docs also explicitly state that using -V 2.xx.x will not work
> with the driver program from a version 3 compiler. i am assuming the
> gcc296 and the i386-redhat-linux7-gcc hooks point by default to the
> version 2 compiler and the gcc and i386-redhat-linux-gcc point to
> the version 3 compiler. I have no idea at this time what the gnatgcc
> points to.

I expect gcc296 is gcc 2.96. Test this by running:

$/usr/bin/gcc296 -v

You should see something like:

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 200xxxxx

if you have 2.96 (output approximate)

gnatgcc is the ada front-end, and not relevant to your problem.

> so. do i have to re-compile my kernel using a version 2 compiler
> (not really what i want to do) to get the driver working or is there
> something i am missing?

First try rebuilding your kernel with the gcc296 compiler. If that
    doesn't work, try obtaining 2.95.3 or 2.96 sources.

Finally, firmly but politely tell the vendor they should improve their
    support. 



More information about the Gcc-help mailing list