Building software on the BGSC

October 11, 2017


building gcc 6 on the bgsc

  1. make folder for code. i called it code
  2. make folder for program to be installed into. i called it software
  3. download gcc code. i did this into ~/software/gcc/6/ curl http://mirror.team-cymru.org/gnu/gcc/gcc-6.4.0/gcc-6.4.0.tar.gz --output gcc-6.4.0.tar.gz
  4. untar. tar zxvf gcc-6.4.0.tar.gz
  5. cd gcc...
  6. follow instructions.
    1. ./contrib/download_prerequisites
    2. cd .. && mkdir objdir && cd objdir
    3. $PWD/../gcc-6.4.0/configure --prefix=$HOME/software/gcc6 --enable-languages=c,c++,fortran,go fails, so add --disable-multilib or whatever. configures ok.
    4. make -j # as selfishly as i feel justified in the shared environment
    5. go teach math345
    6. come back, sit down, take a breath
    7. make install. take a moment to calm down again after thinking i forgot to set prefix while configureing
    8. add install directory to my path, and similarly for the built libraries.
    9. check version of gcc works. reports version 6.4.0. huzzah!

building Boost on bgsc with gcc 6, with boost.python using python3

  1. get the build system ready

    ./bootstrap.sh --with-toolset=gcc --prefix=/data/users/brakeda/software/gcc6/ --with-python=/data/users/brakeda/software/gcc6/bin/python3 --with-python-version=3.6 --with-python-root=/data/users/brakeda/software/gcc6/lib/python3.6

  2. adjust project-config.jam file.

    using python : 3.6 : /data/users/brakeda/software/gcc6/bin/python3.6 : /data/users/brakeda/software/gcc6/include/python3.6m : /data/users/brakeda/software/gcc6/lib/python3.6 ;

  3. build and install

    ./b2 -j12 toolset=gcc cxxflags=-std=c++14 threading=multi link=shared release install

see this SO post for more on using Python3 with Boost, particularly when the Python3 is custom-installed.