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 complicated even for systems with identical OS version.
Install Software Collections
In order to install Developer Toolset, Software Collections must be installed first.
RHEL 7
1 |
yum-config-manager --enable rhel-server-rhscl-7-rpms |
RHEL 6
1 |
yum-config-manager --enable rhel-server-rhscl-6-rpms |
CentOS
1 |
yum install centos-release-scl |
Scientific Linux 7
1 2 |
yum install yum-conf-repos yum install yum-conf-softwarecollections |
Scientific Linux 6
1 |
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.)
1 |
yum install devtoolset-8 |
Developer Toolset 7 (GCC 7, etc.)
1 |
yum install devtoolset-7 |
Developer Toolset 6 (GCC 6, etc.)
1 |
yum install devtoolset-6 |
Developer Toolset 4 (GCC 5, etc.)
1 |
yum install devtoolset-4 |
Developer Toolset 3 (GCC 4, etc.)
1 |
yum install devtoolset-3 |
Use Installed Developer Toolset
Say you want to use Developer Toolset 8, you can run
1 |
scl enable devtoolset-8 bash |
to invoke a BASH shell with environment variables setup to run Developer Toolset 8, check it yourself with
1 |
gcc --version |
References
- 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
Kuan-Yi,
Thank you for this web page–it was invaluable to getting Tensorflow 1.0 working on a Centoas 6 system.
I think that the URL for the yum-conf repo needs to be updated to:
http://ftp.scientificlinux.org/linux/scientific/6/external_products/softwarecollections/x86_64/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm
The version 1.0.1 failed for me.
Thanks for the information! I’ve updated the post.
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.
Glad it saved you some time. 😉
Thanks , it worked for me for ScientificLinux 7