Installation of various common packages
Task 1: GCC
Install Build environment
[root@master ~]# yum groupinstall "Development Tools"
Compile GCC
[install@master ~]$ wget https://ftp.lip6.fr/pub/gcc/releases/gcc-8.3.0/gcc-8.3.0.tar.gz [install@master ~]$ tar xvzf gcc-8.3.0.tar.gz [install@master ~]$ cd gcc-8.3.0 [install@master gcc-8.3.0]$ ./contrib/download_prerequisites [install@master gcc-8.3.0]$ cd ..
Create build folder
[install@master ~]$ mkdir build-gcc-8.3.0 [install@master ~]$ cd build-gcc-8.3.0
Configure GCC (without 32bit support)
[install@master build-gcc-8.3.0]$ ../gcc-8.3.0/configure --prefix=/data/opt/tools/gcc-8.3.0 --disable-multilib
Compile in parallel; this will take some time, so do next tasks in the meantime
[install@master build-gcc-8.3.0]$ make -j 4
Install GCC
[install@master build-gcc-8.3.0]$ make install
Create Modulefile for GCC
create the file
/data/opt/tools/modulesfiles/gcc/8.3.0.lua
Task 2: CMake
Download binary distribution from CMake
[install@master ~]$ wget https://github.com/Kitware/CMake/releases/download/v3.14.1/cmake-3.14.1-Linux-x86_64.tar.gz
Unpack binary release in
/data/opt/tools/cmake-3.14.1
Create Modulefile
/data/opt/tools/modulefiles/cmake/3.14.1.lua
Bonus Task: Installing Clang
Building clang usually requires a rather current toolchain. Use your new GCC module and CMake module to compile and install it.
Download LLVM and Clang via Git
[install@master ~]$ git clone https://github.com/llvm/llvm-project.git [install@master ~]$ cd llvm-project [install@master llvm-project]$ mkdir build [install@master llvm-project]$ cd build
Build and install LLVM and Clang
[install@master build]$ export GCC_HOME=/data/opt/tools/gcc-8.3.0 [install@master build]$ export CC=$GCC_HOME/bin/gcc [install@master build]$ export CXX=$GCC_HOME/bin/g++ [install@master build]$ cmake -D CMAKE_CXX_LINK_FLAGS="-Wl,-rpath,$GCC_HOME/lib64 -L$GCC_HOME/lib64" \ -D CMAKE_INSTALL_PREFIX=/data/opt/tools/clang-8.0.0 \ -D LLVM_ENABLE_PROJECTS=clang \ -D CMAKE_BUILD_TYPE=Release \ ../llvm [install@master build]$ make -j 4 [install@master build]$ make install
Create Modulefile
/data/opt/tools/modulefiles/clang/8.0.0.lua