Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x

Install gmp 5.1.2

wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
 tar -xjvf gmp-5.1.2.tar.bz2
 cd gmp-5.1.2
 ./configure --exec-prefix=/opt/gmp/5.1.2 --datarootdir=/opt/gmp/5.1.2/share --datadir=/opt/gmp/5.1.2/share --infodir=/opt/gmp/5.1.2/share/info --includedir=/opt/gmp/5.1.2/include --oldincludedir=/opt/gmp/5.1.2/include --prefix=/opt/gmp/5.1.2
 make
 make install

Module file: /etc/modulefiles/gmp/5.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/gmp/5.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/gmp/5.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/gmp/5.1.2/include
prepend-path CPPFLAGS -I/opt/gmp/5.1.2/include
prepend-path LIBS -L/opt/gmp/5.1.2/lib
prepend-path GMP_LIBRARIES /opt/gmp/5.1.2/lib
prepend-path GMP_INCLUDE_DIR /opt/gmp/5.1.2/include
pre

Install mpfr 3.1.2

wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.gz
tar -xzvf mpfr-3.1.2.tar.gz
cd mpfr-3.1.2
./configure --exec-prefix=/opt/mpfr/3.1.2 --datarootdir=/opt/mpfr/3.1.2/share --datadir=/opt/mpfr/3.1.2/share --infodir=/opt/mpfr/3.1.2/share/info --includedir=/opt/mpfr/3.1.2/include --oldincludedir=/opt/mpfr/3.1.2/include
make
make install

Module file: /etc/modulefiles/mpfr/3.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##


## Add directory to the path
#prepend-path PATH /opt/mpfr/3.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/mpfr/3.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpfr/3.1.2/include
prepend-path CPPFLAGS -I/opt/mpfr/3.1.2/include
prepend-path LIBS -L/opt/mpfr/3.1.2/lib
prepend-path MPFR_LIBRARIES /opt/mpfr/3.1.2/lib
prepend-path MPFR_INCLUDE_DIR /opt/mpfr/3.1.2/include
prepend-path LD_RUN_PATH /opt/mpfr/3.1.2/lib

Install mpc 1.0.1

wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz
tar -xzvf mpc-1.0.1.tar.gz
cd mpc-1.0.1
./configure --exec-prefix=/opt/mpc/1.0.1 --datarootdir=/opt/mpc/1.0.1/share --datadir=/opt/mpc/1.0.1/share --infodir=/opt/mpc/1.0.1/share/info --includedir=/opt/mpc/1.0.1/include --oldincludedir=/opt/mpc/1.0.1/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/
make
make install

Module file: /etc/modulefiles/mpc/1.0.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

## Add directory to the path
#prepend-path PATH /opt/mpc/1.0.1/bin
prepend-path LD_LIBRARY_PATH /opt/mpc/1.0.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpc/1.0.1/include
prepend-path CPPFLAGS -I/opt/mpc/1.0.1/include
prepend-path LIBS -L/opt/mpc/1.0.1/lib

Install isl 0.11.1

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/isl-0.11.1.tar.bz2
tar -xjvf isl-0.11.1.tar.bz2
cd isl-0.11.1
./configure --exec-prefix=/opt/isl/0.11.1 --datarootdir=/opt/isl/0.11.1/share --datadir=/opt/isl/0.11.1/share --infodir=/opt/isl/0.11.1/share/info --includedir=/opt/isl/0.11.1/include --oldincludedir=/opt/isl/0.11.1/include --with-gmp-prefix=/opt/gmp/5.1.2/ 
make make install

Module file: /etc/modulefiles/isl/0.11.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/isl/0.11.1/bin
prepend-path LD_LIBRARY_PATH /opt/isl/0.11.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/isl/0.11.1/include
prepend-path CPPFLAGS -I/opt/isl/0.11.1/include
prepend-path LIBS -L/opt/isl/0.11.1/lib
prepend-path LD_RUN_PATH /opt/isl/0.11.1/lib

Install cloog 0.18.0

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/cloog-0.18.0.tar.gz
tar -xzvf cloog-0.18.0.tar.gz
cd cloog-0.18.0
./configure --exec-prefix=/opt/cloog/0.18.0 --datarootdir=/opt/cloog/0.18.0/share --datadir=/opt/cloog/0.18.0/share --infodir=/opt/cloog/0.18.0/share/info --includedir=/opt/cloog/0.18.0/include --oldincludedir=/opt/cloog/0.18.0/include --with-gmp-prefix=/opt/gmp/5.1.2/
makemake install

Module file: /etc/modulefiles/cloog/0.18.0

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/cloog/0.18.0/bin
prepend-path LD_LIBRARY_PATH /opt/cloog/0.18.0/lib
prepend-path CPLUS_INCLUDE_PATH /opt/cloog/0.18.0/include
prepend-path CPPFLAGS -I/opt/cloog/0.18.0/include
prepend-path LIBS -L/opt/cloog/0.18.0/lib
prepend-path LD_RUN_PATH /opt/cloog/0.18.0/lib

Install gcc 4.8.4

I had to install 32 bit glibc-devel:
 yum install glibc-devel.i686

module load gmp/5.1.2
module load mpfr/3.1.2 
module load mpc/1.0.1 
module load isl/0.11.1
module load cloog/0.18.0
wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2
tar -xjvf gcc-4.8.4.tar.bz2
cd gcc-4.8.4
./configure --prefix=/opt/gcc/4.8.4 --exec-prefix=/opt/gcc/4.8.4 --datarootdir=/opt/gcc/4.8.4/share --datadir=/opt/gcc/4.8.4/share --infodir=/opt/gcc/4.8.4/share/info --includedir=/opt/gcc/4.8.4/include --oldincludedir=/opt/gcc/4.8.4/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/ --with-mpc=/opt/mpc/1.0.1/ --with-isl=/opt/isl/0.11.1/ --with-cloog=/opt/cloog/0.18.0/ --disable-isl-version-check
 make 
make install

Module file: /etc/modulefiles/gcc/4.8.4

#%Module1.0####################################################################
##
## gcc modulefile
##
## 
##

prepend-path PATH /opt/gcc/4.8.4/bin
#prepend-path PATH /opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/
set-alias "cc" "/opt/gcc/4.8.4/bin/gcc"
prepend-path LD_LIBRARY_PATH /opt/gcc/4.8.4/lib/../lib64 
prepend-path LD_RUN_PATH /opt/gcc/4.8.4/lib/../lib64 
#prepend-path LIBS -I/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include
prepend-path MANPATH /opt/gcc/4.8.4/share/man

prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/include
#prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include/ssp
prepend-path CPPFLAGS -I/opt/gcc/4.8.4/include
prepend-path CPPFLAGS -L/opt/gcc/4.8.4/lib
#prepend-path LIBS -L/opt/gcc/4.8.4/lib64
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/

Leave a Reply

Your email address will not be published. Required fields are marked *