Comes in handy when you need newer versions of developer tools such as GCC, GDB, Valgrind, etc.
Executables built with the Red Hat Developer Toolset toolchain can then also be deployed and run on multiple versions of Red Hat Enterprise Linux; on the other hand, executables built with self-compiled GCC often require another copy of runtime libraries to run due to GLIBC/GLIBCXX ABI incompatibility, leaves deployment complicated even for systems with identical OS version.
Install Software Collections
In order to install Developer Toolset, Software Collections must be installed first.
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum-config-manager --enable rhel-server-rhscl-6-rpms
yum install centos-release-scl
Scientific Linux 7
yum install yum-conf-repos yum install yum-conf-softwarecollections
Scientific Linux 6 (EOL)
yum install "http://ftp.scientificlinux.org/linux/scientific/6/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm"
Install Developer Toolset
Install the version(s) of your choice. Yes, they can co-exist.
Developer Toolset 8 (GCC 8, etc.)
yum install devtoolset-8
Developer Toolset 7 (GCC 7, etc.)
yum install devtoolset-7
Developer Toolset 6 (GCC 6, etc.)
yum install devtoolset-6
Developer Toolset 4 (GCC 5, etc.)
yum install devtoolset-4
Developer Toolset 3 (GCC 4, etc.)
yum install devtoolset-3
Use Installed Developer Toolset
Say you want to use Developer Toolset 8, you can run
scl enable devtoolset-8 bash
to invoke a BASH shell with environment variables setup to run Developer Toolset 8, check it yourself with
- Product Documentation for Red Hat Developer Toolset
- Software Collections Special Interest Group – CentOS Wiki
- List of Software Collections available in SCLo SIG – CentOS Wiki
- Developer Toolset 8 – Software Collections
- Developer Toolset 7 – Software Collections
- Developer Toolset 6 – Software Collections
- Developer Toolset 4 – Software Collections
- Developer Toolset 3 – Software Collections