This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

version problem


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. 

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?


Andre Azaroff

St. Onge Company
1400 Williams Road
York PA 17402

Phone: 717 840-8181 ext. 8075
Fax: 717 840-8182
Website: www.stonge.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]