Installing Developer Toolset on RHEL-based Distributions

Comes in handy when you need newer versions of developer tools such as GCC, GDB, Valgrind, etc.

Hidden Perk

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 to even systems with identical OS version complicated.

Install Software Collections

In order to install Developer Toolset, Software Collections must be installed first.

RHEL 7

RHEL 6

CentOS

Scientific Linux 7

Scientific Linux 6

Install Developer Toolset

Install the version(s) of your choice. Yes, they can co-exist.

Developer Toolset 7 (GCC 7, etc.)

Developer Toolset 6 (GCC 6, etc.)

Developer Toolset 4 (GCC 5, etc.)

Developer Toolset 3 (GCC 4, etc.)

Use Installed Developer Toolset

Say you want to use Developer Toolset 7, you can run

to invoke a BASH shell with environment variables setup to run Developer Toolset 7, check it yourself with

References

  1. Product Documentation for Red Hat Developer Toolset
  2. Software Collections Special Interest Group – CentOS Wiki
  3. List of Software Collections available in SCLo SIG – CentOS Wiki
  4. Devtoolset-7 – Software Collections
  5. Devtoolset-6 – Software Collections
  6. Devtoolset-4 – Software Collections
  7. Devtoolset-3 – Software Collections

4 Comments for “Installing Developer Toolset on RHEL-based Distributions”

Lee

says:

This is a killer page. Thank you so much, I was about to compile myself. I don’t mind doing that always, but was not in the mood today. Also I manage a whole cluster so 3 lines to replace ~300 lines of scripting is very nice! Thank you.

Leave a Reply

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