Compiling GNU 5.2.0 on CentOS 6


1. Prerequisites:

You will need

  1. gmp 4.3.1-7.el6_2.2
  2. mpfr  2.4.1-6.el6
  3. mpc 0.19-1.el6.rf and
  4. isl-0.14

For 1 to 3, do take a look at Compiling GNU 4.8.1 on CentOS 6. For 4, do take look at Compiling isl-0.15 library

2a. Update linked library at /etc/ld.so.conf

# touch /etc/ld.so.conf.d/library.conf
/usr/local/isl-0.15/lib
/usr/local/mpfr-2.4.2/lib
/usr/local/mpc-0.8.1/lib
/usr/local/gmp-4.3.2/lib

2b. Update your .bashrc

export LD_LIBRARY_PATH=/usr/local/mpfr-2.4.2/lib:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/isl-0.15/lib

3. Compile. This will take a while.

# tar -zxvf  gcc-4.8.1.tar.gz
# cd gcc-4.8.1
# mkdir build-gcc
# cd build-gcc
# ../configure --prefix=/usr/local/gcc-5.2.0 
--with-mpfr=/usr/local/mpfr-2.4.2 
--with-mpc=/usr/local/mpc-0.8.1 
--with-gmp=/usr/local/gmp-4.3.2
--with-isl=/usr/local/isl-0.14
--disable-multilib
--enable-shared 
--host x86_64-redhat-linux-gnu 
--build x86_64-redhat-linux-gnu
# make -j 16
# make install

References:

  1. Encountering error -static-libstdc++ not implemented when compiling GNU 4.8.1 on CentOS 6
  2. Configure Error when compiling GCC 5.2.0 on CentOS 6.6
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s