Gcc CentOS

From wiki.mikejung.biz
(Redirected from Gcc)
Jump to navigation Jump to search

Liquidweb 728x90.jpg

How to compile gcc-4.8.2 on CentOS 6.6


The instructions below were taken from the site above.I've slightly modified and fixed some typos from the original version. Should work for most CentOS 6.x installs but your mileage may vary.

cd /usr/local/
wget http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
wget http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2
wget https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2
wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/isl-0.11.1.tar.bz2
wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/cloog-0.18.0.tar.gz
yum groupinstall "Development tools"
yum install glibc-devel.i686 glibc-i686
curl -O ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.gz; tar zxf gcc-4.8.2.tar.gz
cd gcc-4.8.2
tar -zxvf ../mpc-1.0.1.tar.gz
tar -jxvf ../mpfr-3.1.2.tar.bz2
tar -jxvf ../gmp-5.1.3.tar.bz2
tar -jxvf ../isl-0.11.1.tar.bz2
tar -zxvf ../cloog-0.18.0.tar.gz
mv mpc-1.0.1  mpc
mv mpfr-3.1.2  mpfr
mv gmp-5.1.3  gmp
mv isl-0.11.1  isl
mv cloog-0.18.0 cloog
./configure --prefix=/opt/gcc-4.8.2/
make -k check
make install

After this is done you will still need to update the PATH environment to point to the new version of gcc. Or you could use Ubuntu and not have to update every damn package ever just to use new and cool things.