Can't install gcc 3.2 alongside gcc 2.96 on Red Hat 7.3

Jonathan Watt jonathan.watt@strath.ac.uk
Thu Feb 19 19:18:00 GMT 2004


lrtaylor@micron.com wrote:

> Jonathan,
> 
> If you're really concerned about overwriting other files, then configure
> GCC using the --prefix option and tell it where to put the files.  For
> example, you could use --prefix=/opt/gcc3.  That way you can put it in a
> totally independent directory that won't interfere with anything else on
> your system.  And, then in the worst case, you can "uninstall" it by
> simply removing that directory tree.  This is my preferred way of
> installing separate versions of GCC.  Much cleaner in my opinion that
> sticking everything under /usr/local, or worse, /usr...
> 
> Then, use the --program-suffix option to give your GCC commands a name
> different than the system one.  That way, you can add /opt/gcc3/bin to
> your PATH and people can choose which compiler they want simply by using
> the right command - gcc would be the system compiler, gcc3 (or whatever
> you want) would be the new compiler.
> 
> Make sense?
> 
> Lyle
> 

Yes, perfect sense.  Since I'm the only person who will be using this 
version of gcc I am going to try installing gcc to a directory under my 
$HOME without using the --program-suffix option. I will then prepend the 
bin directory created by the install to my PATH variable. I assume that 
this should then allow me to use gcc 3.2 as if it was the default 
compiler without changing my make files (well, SConscripts actually). I 
also assume that since gcc will be installed under my $HOME I won't need 
to bother the system administrator.

Assuming everything goes smoothly this will be a very good solution. 
Thank you again, that has been very helpful.

Jonathan



More information about the Gcc-help mailing list