[plug] What is proper way to downgrade GCC back to 2.95

Steege, Phil E phil.e.steege at lmco.com
Thu Aug 22 22:03:20 WST 2002


Peter

Thanks for all the information.
One of the programs was Mplayer and I was unaware it was a bug.  Thanks for
that.
I will give the second install in /usr/local a go.

Phil

-----Original Message-----
From: Peter Wright [mailto:pete at akira.apana.org.au] 
Sent: Thursday, August 22, 2002 9:56 AM
To: plug at plug.linux.org.au
Subject: Re: [plug] What is proper way to downgrade GCC back to 2.95


On 22/08 08:16:40, Steege, Phil E wrote:
> I have a redhat 7.3 system running gcc 2.96.  I have a few programs 
> which will not compile with 2.96 and I want to 'downgrade' to gcc 
> 2.95.2

Just out of interest - which programs would these be? Don't feel obliged to
answer if you'd rather not, I'm just curious. The last I heard about
programs that allegedly wouldn't compile under 2.96 (but would under 2.95)
was with the MPlayer fiasco... and as far as I was aware, the _bug_ in the
MPlayer code (which showed up under 2.96 but not under the also-buggy 2.95)
has long since been fixed.

If you've got a C (or C++) program that won't compile under gcc 2.96, it's
not too likely that it will (compile) under 2.95. Do you _know_ for sure
that it's supposed to work under 2.95? If not, you could end up expending a
lot of effort for nothing...


Anyway - sorry I can't offer any advice on RPM-based downgrading, but I
_can_ suggest simply building yourself an _alternative_ gcc 2.95.3 (the
latest of the 2.95 series) from source and installing it in /usr/local or
/opt or wherever - then you can build your programs with that.  You may
actually find it a simpler and easier option than replacing your default
"system" compiler.

# cd /usr/local/src
# wget ftp://ftp.it.net.au/mirrors/gnu/gcc/gcc-2.95.3.tar.gz

and away you go...

# cd /usr/local/src
# tar xfz gcc-2.95.3.tar.gz
# cd gcc-2.95.3
# ./configure --prefix=/usr/local && make && make install


NB. In case you're not aware, showing a prompt as "# " like so is a simple
convention meaning "do this stuff as root". Although technically only the
"make install" bit should need to be done as root.

Then when building your problem programs, just make sure /usr/local/bin is
in your PATH before /usr/bin, so you'll use /usr/local/bin/gcc instead of
/usr/bin/gcc when you run "gcc".

> Phil

Alternatively, you could try the recently released gcc 3.2 ;-).

Pete.
-- 
http://akira.apana.org.au/~pete/
Real programmers disdain structured programming.  Structured programming is
for compulsive neurotics who were prematurely toilet-trained.  They wear
neckties and carefully line up pencils on otherwise clear desks.



More information about the plug mailing list