LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to setup/downgrade gcc? (https://www.linuxquestions.org/questions/linux-software-2/how-to-setup-downgrade-gcc-4175415243/)

ggyyree 07-06-2012 10:44 AM

How to setup/downgrade gcc?
 
Hi all,

I am using CentOS 5.7. Currently, I have got gcc 4.4.6 version (See below). However, in order to use Matlab (a scientific software) I need to get gcc 4.3.4 installed. May I ask how to setup gcc/g++ 4.3.4 for CentOS 5.7 system please? It is better to keep my 4.4.6 version of gcc as my other application may use it. Thanks a lot.

>> gcc -v
Using built-in specs.
Target: x86_64-redhat-linux6E
...
Thread model: posix
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)

knudfl 07-06-2012 11:38 AM

1) The CentOS 5 system compiler is gcc-4.1.2.
I guess, you have used 'update-alternatives --config gcc'
to change the link /usr/bin/gcc to point to gcc44.

2) You can have as many versions of gcc/g++ as you want,
installed at the same time.

3) gcc-4-3-4 : Either build gcc-4.3.4 from source with
the extra configure option --program-suffix=43

Or use the SLE 10 gcc43-4.3.4 ...
http://download.opensuse.org/reposit...10_SDK/x86_64/
rpm -Uvh cpp43-4.3.4_20091019-25.1.x86_64.rpm
rpm -Uvh --nodeps gcc43-4.3.4_20091019-25.1.x86_64.rpm
rpm -Uvh --nodeps libstdc++43-devel-4.3.4_20091019-25.1.x86_64.rpm
rpm -Uvh gcc43-c++-4.3.4_20091019-25.1.x86_64.rpm
... Provides /usr/bin/ gcc-4.3 g++-4.3

.


All times are GMT -5. The time now is 05:52 PM.