Downgrade gcc on CentOS 7.0 (64bit) to version 4.8.2


Recently we had to download gcc from version 4.8.5 to 4.8.2.

We were trying to compile some tools and they required using that older version of gcc.
To compile the old version of the gcc we used the version version that was shipped with the distribution.

Methodology

#Making sure we are not missing any 32bit libraries since we are on a 64bit machine
yum install glibc.i686 ncurses-libs.i686;
#Download the source code
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz;
#Extract the files
tar -xvf gcc-4.8.2.tar.gz;
#Navigate to the folder
cd gcc-4.8.2/;
#Make sure we have all dependencies met
./contrib/download_prerequisites;
#Configure the installation and assign the installation folder to be /usr/local/gcc/4.8.2. Finally make all necessary checks before compilation.
./configure --prefix=/usr/local/gcc/4.8.2;
#Build
make;
#Install
sudo make install;

This post is also available in: Αγγλικα

Απάντηση

Αυτός ο ιστότοπος χρησιμοποιεί το Akismet για να μειώσει τα ανεπιθύμητα σχόλια. Μάθετε πώς υφίστανται επεξεργασία τα δεδομένα των σχολίων σας.