Which version of GCC to use: an example
Claudio Bley
bley@cs.uni-magdeburg.de
Fri Feb 22 12:38:00 GMT 2002
>>>>> "Bob" == Bob Gustafson <bobgus@mcs.com> writes:
Bob> Claudio == Claudio Bley <bley@cs.uni-magdeburg.de> writes:
>>>>>>> "Bob" == Bob Gustafson <bobgus@mcs.com> writes:
>>
Bob> My goal was to compile and install prcs-1.3.1 (a new source
Bob> code control system)
>>
Bob> I started out with gcc version 2.96 which is the stock
Bob> version supplied with RedHat 7.2 (for i686-pc-linux-gnu)
>>
Bob> ./configure 2>&1 | tee config.out make 2>&1 | tee make.out
>>
Bob> The last few lines of make.out are:
>> [snipped]
>>
Claudio> As Frank Schafer already pointed out, you should never
Claudio> use gcc 2.96 because there never was such a release.
Bob> I just used what came with RH 7.2 (However, I am now using
Bob> 2.95.3)
Okay, but I never understood why RedHat shipped its distribution with
that compiler, nor did I understand why the GCC people called their
development version "2.96".
>>
Bob> It still won't make. Last bit of the make.out file is given
Bob> below ( make 2>&1 | tee make.out).
>> [snipped]
>>
Bob> Finally, I installed gcc version 2.95.3 (2.95.3 20010315
Bob> (release)) and this worked fine.
>>
Bob> I don't know if there are bugs in the compiler(s) or bugs in
Bob> prcs-1.3.1, but this might be a regression test to pass for
Bob> the newer compilers.
>>
Claudio> prcs is not complying with the ANSI C++ Standard as
Claudio> required by gcc v3. prcs needs to be fixed until you're
Claudio> able to compile it with gcc v3.
>> From the listing of make errors, do you have any guidance as to
>> what part
Bob> of the ANSI C++ Standard is being violated?
At first, stdiostream.h apparently was removed from the stdc++ lib
distributed with gcc v3. Thus, there is no class `stdiobuf' (I
couldn't find it in "The C++ Standard Library" book nor in any of the
header files of gcc's standard c++ library).
The other errors seem to result due gcc getting confused -- it seems
gcc doesn't recognize the `const' keyword anymore... E.g. in
include/prcserror.h:509: parse error before `char' :
omanip<const char*> query(const char* message);
Bob> Also, if 2.95.3 does the job, why doesn't 3.0.3 flag (and
Bob> deprecate) the things that pass 2.95.3 and do not pass 3.0.3
Bob> :-)
I suppose that would blow up the compiler quite a bit. Eventually, you
would need to distribute a complete gcc v2.95 with it in order to say
"hey, it would compile with gcc v2.95.x but not with the release of
gcc you're using now." It's a lot easier to say: "just write standard
compliant code!".
Claudio
More information about the Gcc-help
mailing list