% 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
Do take a look at Linux @ CERN for the documentation on how to use yum to install devtoolset which contain the following packages. The latest version for CentOS 6 is devtoolset-2.1. Here is a summary of the Linux @ CERN
CentOS 6 / SL 6
Developer Toolset 2.1 provides following tools:
gcc/g++/gfortran – GNU Compiler Collection – version 4.8.2
gdb – GNU Debugger – version 7.6.34
binutils – A GNU collection of binary utilities – version 2.23.52
elfutils – A collection of utilities and DSOs to handle compiled objects – version 0.155
dwz – DWARF optimization and duplicate removal tool – version 0.11
systemtap – Programmable system-wide instrumentation system – version 2.1
valgrind – Tool for finding memory management bugs in programs – version 3.8.1
oprofile – System wide profiler – version 0.9.8
eclipse – An Integrated Development Environment – version 4.3.1 (Kepler)
CentOS 5 / SL 5
Developer Toolset 1.1 provides following tools:
gcc/g++/gfortran – GNU Compiler Collection – version 4.7.2
gdb – GNU Debugger – version 7.5
binutils – A GNU collection of binary utilities – version 2.23.51
elfutils – A collection of utilities and DSOs to handle compiled objects – version 0.154
dwz – DWARF optimization and duplicate removal tool – version 0.7
systemtap – Programmable system-wide instrumentation system – version 1.8
valgrind – Tool for finding memory management bugs in programs – version 3.8.1
oprofile – System wide profiler – version 0.9.7
Installation and Enablement
CentOS 6 / SL 6
Save repository information as /etc/yum.repos.d/slc6-devtoolset.repo on your system:
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