Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-08-2009, 05:56 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 24

Rep: Reputation: 15
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 ?

Last edited by kk2202; 05-08-2009 at 06:11 AM.
Old 05-08-2009, 07:56 AM   #2
LQ Newbie
Registered: May 2009
Posts: 18

Rep: Reputation: 5
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.
Old 05-08-2009, 08:21 AM   #3
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 299

Rep: Reputation: 32
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.
Old 05-08-2009, 10:52 AM   #4
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,440

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DOWNgrade gcc. How? KDel Linux - Software 25 10-29-2009 02:53 AM
Downgrade xlC compiler version in AIX 5.3 vathsan AIX 4 02-22-2009 03:22 PM
downgrade of GCC version nelnel Linux - Software 7 06-29-2005 02:10 AM
gcc downgrade: help required ludwig W Linux - Software 12 03-31-2003 03:09 AM
any recomendations to downgrade GCC 2.96 to 2.95? Hano Linux - Distributions 2 06-09-2002 03:11 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration