Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303
Rep:
I agree with kk2202.
else
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
!!
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
.....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.