Developer Toolset
Introduction
The developer toolset provides more modern compilers and tools than
those provided by the operating system. There are several version of
these tools.
Documentation
The release notes and user guide for all versions are here.
Initialisation
Use the following commands on a machine where the toolkit is installed.
For bash shells, do
scl enable devtoolset-7 bash
or
scl enable devtoolset-8 bash
or
scl enable devtoolset-9 bash
For csh/tcsh shells, you have to do something like the following for
devtoolset-7 for more recent compilers, substitute 8 or 9 for 7 in the instructions below.
setenv PATH /opt/rh/devtoolset-7/root/usr/bin:$PATH
setenv MANPATH /opt/rh/devtoolset-7/root/usr/share/man:${MANPATH}
setenv LD_LIBRARY_PATH /opt/rh/devtoolset-7/root/lib64:${LD_LIBRARY_PATH}
Version
devtoolset-7, devtoolset-8 and devtoolset-9 are available on selected machines
Testing
gcc --version
or
gfortran --version
should give a modern version like 7.3.1.
Usage
Use just as you would use other versions of the compilers.
Related Software
Can't think of any at the moment.
Potential Problems
Don't put the initialisation command (scl) in your .bashrc or .cshrc as it will create an infinite series of processes known as a forkbomb! If you want to use these compilers by default, you have to do something like the following:
for bash shells:
source scl_source enable devtoolset-7
for csh/tcsh shells
setenv PATH /opt/rh/devtoolset-7/root/usr/bin:$PATH
setenv MANPATH /opt/rh/devtoolset-7/root/usr/share/man:${MANPATH}
setenv LD_LIBRARY_PATH /opt/rh/devtoolset-7/root/lib64:${LD_LIBRARY_PATH}
Rhys Morris
Last modified: Thursday, 22 April 2021