-   Linux - Newbie (
-   -   Downgrade gcc compiler (

kk2202 05-08-2009 05:56 AM

Downgrade gcc compiler
I have RHEL5 box installed with gcc version 4.1.2. I want to install gcc version 3.4.2 on to that.

I was ablw to install gccV4.3.2, after removing many other packages and isntalling the older versions of the same packages.However, its not successful. I landed corrupting my glibc in the process.

So I would like to know the formal procedure /steps to be followed for replacing my gccV4.1.2 with gccV3.4.2.

Or, Is it possible to have two versions of gcc installed on the same machine. If yes, how can i achieve that and how do I invoke the specific version of compiler during compilation ?

jens1245 05-08-2009 07:56 AM

Try uninstall your old version of gcc and compile the old version. You must compile when downgrading. Maybe this page can be of some help finding the right version. I don't exactly know what you need.

Or just google for another place to find the sourcecode.

barunparichha 05-08-2009 08:21 AM

I agree with kk2202.
1. get the source code
2. compile it as
./configure --prefix=<your-path>/dir/
3. make ; make install
4. While using use <your-path>/dir/ for older gcc.

By this you don't have to face any dependency problem.

knudfl 05-08-2009 10:52 AM

Do not remove the system compiler, you can have all
the compilers, you want, at the same time. !
No need to compile gcc-3.4 , is already available
as a package : 'compat-gcc-34-3.4.6-4'
......and....... 'compat-gcc-34-c++-3.4.6-4

# yum -y install compat-gcc-34 compat-gcc-34-c++

will do.

Using different compilers, examples :
./configure CC=gcc43 CXX=g++34
make CC=gcc43 CXX=g++34

All times are GMT -5. The time now is 10:23 AM.