% bunzip2 gmp-6.2.1.tar.bz2
% tar -xvf gmp-6.2.1.tar
% cd gmp-6.2.1
% ./configure --prefix=/usr/local/gmp-6.2.1
% make
% make install
Step 2: Install mpfr-4.1.0 (requires gmp-6.2.1 as prerequisites)
% bunzip2 mpfr-4.1.0.tar.bz
% tar -xvf mpfr-4.1.0.tar
% cd mpfr-4.1.0/
% ./configure --prefix=/usr/local/mpfr-4.1.0 --with-gmp=/usr/local/gmp-6.2.1/
% make
% make install
Step 3: Install mpc-1.2.1 (requires gmp-6.2.1 and mpfr-4.1.0)
% tar -zxvf mpc-1.2.1.tar.gz
% cd mpc-1.2.1/
% ./configure --prefix=/usr/local/mpc-1.2.1 -with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0
% make
% make install
Step 4: Install isl-0.24 (requires gmp-6.2.1 as prerequisites)
% bunzip2 isl-0.24.tar.bz2
% tar -xvf isl-0.24.tar
% cd isl-0.24
% ./configure --prefix=/usr/local/isl-0.24 --with-gmp-prefix=/usr/local/gmp-6.2.1/
% make
% make install
/usr/local/software/gcc/build-gcc/./gcc/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory
An alternative way is to let GCC do the download for you….. Retracing the steps
–enable-orterun-prefix-by-default (Configure OMPI –enable-orterun-prefix-by-default and so that you do not need to add the prefix option) –enable-openib-rdmacm-ibaddr (To enable routing over IB) –enable-mpi-cxx (C++ bindings are no more built by default) –enable-mca-no-build=btl-uct (ecent OpenMPI versions contain a BTL component called ‘uct’, which can cause data corruption when enabled, due to conflict on malloc hooks between OPAL and UCM.)
If you compiling using cmake and you make encounter error like this. This is despite the fact that you use the latest compiler like GNU-5.2.0. But somehow the cmake is still looking at the older gnu that comes with CentOS 6
[user1@node1 build]$ cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:24 (message):
The compiler /usr/bin/c++ has no C++11 support. Aborting.
To resolve this, you have to be more explicit in the cmake parameter point to the corrcet g++, gcc
The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License.
The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.
Step 1: The current version of GSL is gsl-1.16.tar.gz
Step 2: You may want to use the latest GCC 4.8.1 to compile. For more information on how to compile GCC 4.8.1, see Compiling GNU 4.8.1 on CentOS 6. This compilation will help to fix all the components required for gsl-1.16
Step 3: After packing gsl, To compile
# cd /root/gsl-1.15/
# mkdir build-gsl
# cd build-gsl
# ../configure --prefix=/usr/local/gsl-1.16/
# make
# make install
# bunzip2 gmp-4.3.2.tar.bz2
# tar -zxvf gmp-4.3.2.tar
# cd gmp-4.3.2
# ./configure --prefix=/usr/local/gmp-4.3.2
# make
# make install
2. Install mpfr-2.4.2 (requires gmp-4.3.2 as prerequisites)
# bunzip2 mpfr-2.4.2.tar.bz2
# tar -zxvf mpfr-2.4.2.tar
# cd mpfr-2.4.2
# ./configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2/
# make
# make install
3. Install mpc-0.8.1 (requires gmp-4.3.2 and mpfr-2.4.2 as prerequisites )
# tar -zxvf mpc-0.8.1.tar.gz
# cd mpc-0.8.1
#./configure --prefix=/usr/local/mpc-0.8.1/ --with-gmp=/usr/local/gmp-4.3.2/ --with-mpfr=/usr/local/mpfr-2.4.2
# make
# make install
I encountered error when compiling GCC 4.8.1 on CentOS 6 I have the prequistics (via yum installed)
gmp 4.3.1-7.el6_2.2
mpfr 2.4.1-6.el6
mpc 0.19-1.el6.rf
But still I enountered the error
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
Source code for these libraries can be found at their respective hosting sites as well as
at ftp://gcc.gnu.org/pub/gcc/infrastructure/
# bunzip2 gmp-4.3.2.tar.bz2
# tar -zxvf gmp-4.3.2.tar
# cd gmp-4.3.2
# ./configure --prefix=/usr/local/gmp-4.3.2
# make
# make install
2. Install mpfr-2.4.2 (requires gmp-4.3.2 as prerequisites)
# bunzip2 mpfr-2.4.2.tar.bz2
# tar -zxvf mpfr-2.4.2.tar
# cd mpfr-2.4.2
# ./configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2/
# make
# make install
3. Install mpc-0.8.1 (requires gmp-4.3.2 and mpfr-2.4.2 as prerequisites )
# tar -zxvf mpc-0.8.1.tar.gz
# cd mpc-0.8.1
#./configure --prefix=/usr/local/mpc-0.8.1/ --with-gmp=/usr/local/gmp-4.3.2/ --with-mpfr=/usr/local/mpfr-2.4.2
# make
# make install
4. Update your LD_LIBRARY_PATH reflect /usr/local/mpc-0.8.1/lib In your .bash_profile include the following
5. Install the glibc-devel.i686. For more information, do look at Error when compiling GCC 4.8.1 (linuxtoolkit.blogspot.com) 6. Finally install GNU CC 4.8.1
# tar -zxvf gcc-4.8.1.tar.gz
# cd gcc-4.8.1
# mkdir build-gcc
# cd build-gcc
# ../configure --prefix=/usr/local/gcc-4.8.1 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1 --with-gmp=/usr/local/gmp-4.3.2
# make
# make install