Forked from wisdomfusion/install-gcc-4.9.3-on-centos6.txt
Created
October 23, 2020 08:07
-
-
Save alexandnpu/45aa6079af33ac69d1b262cad8c8f4f8 to your computer and use it in GitHub Desktop.
Install gcc-4.9.3 on CentOS 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install libmpc-devel mpfr-devel gmp-devel | |
cd /usr/src/ | |
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2 -O | |
tar xvfj gcc-4.9.3.tar.bz2 | |
cd gcc-4.9.3 | |
./configure --disable-multilib --enable-languages=c,c++ | |
make -j `grep processor /proc/cpuinfo | wc -l` | |
make install |
the script uses ftp to get the source code; at my run, the script fails to get source tarball from ftp, try to change ftp to HTTP, which usually succeeds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some systems, the command:
./configure --disable-multilib --enable-languages=c,c++
might block giving the error:
Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
To solve this, just run (in the same dir) the command:
./contrib/download_prerequisites
and then continue with the installation.