Red Hat Developer Toolset
Supported gcc updates along with other development tools
Red Hat Developer Toolset
Thank you for downloading
Your download should start automatically. If you have any problems with the download, please use the direct link.
Introduction and Prerequisites
In this tutorial, you will install the Eclipse 4.5.2 (Mars.2) IDE and the GNU Compiler Collection 5.3.1 from the Red Hat Developer Toolset (DTS) and build a simple C++ Hello World application. This tutorial should take less than 30 minutes to complete.
Red Hat DTS provides the latest, stable, open source C and C++ compilers and complementary development tools (including Eclipse via a separate installation), enables developers to compile applications once and deploy across multiple versions of Red Hat Enterprise Linux.
Before you begin, you will need a current Red Hat Enterprise Linux 7 workstation or server subscription that allows you to download software and get updates from Red Hat. If you don’t have an active subscription, register and obtain the RHEL Developer Suite (includes RHEL server) from here.
If you encounter difficulties at any point, see Troubleshooting and FAQ.
Want to know more about what you can do with Developer Toolset?
Learn more about the Red Hat Developer Toolset
Learn more about Red Hat Software Collections
Red Hat Software Collections deliver the latest stable versions of dynamic languages, open source databases, and web development tools that can be deployed alongside those included in Red Hat Enterprise Linux. Red Hat Software Collections is available with select Red Hat Enterprise Linux subscriptions and has a three-year life cycle to allow rapid innovation without sacrificing stability. For more information:
Red Hat Software Collections 2.3 Packaging Guide — The packaging guide for Red Hat Software Collections explains the concept of software collections, documents the
sclutility, and provides a detailed explanation of how to create a custom software collection or extend an existing one.
- Red Hat Software Collections 2.3 Release Notes — The release notes for Red Hat Software Collections document known problems, possible issues, and other important information available at the time of release of the content set. They also contain useful information on installing, rebuilding, and migrating.
- How to use Red Hat Software Collections (RHSCL) or Red Hat Developer Toolset (DTS) — This article lists which Red Hat Enterprise Linux subscriptions include access to Red Hat Software Collections and the Developer Toolset.
You can view the list of packages available in RHSCL by running:
$ yum --disablerepo="*" --enablerepo="rhel-server-rhscl-7-rpms" list available
Developing with Red Hat Enterprise Linux
Red Hat Enterprise Linux 7 Developer Guide — The developer guide for Red Hat Enterprise Linux 7 provides an introduction to application development tools and using source code management tools such as Git in Red Hat Enterprise Linux 7.
Become a Red Hat developer: developers.redhat.com
Red Hat delivers the resources and ecosystem of experts to help you be more productive and build great solutions. Register for free at developers.redhat.com.
Troubleshooting and FAQ
As a developer, how can I get a Red Hat Enterprise Linux subscription that includes Red Hat Software Collections and Developer Toolset?
Developers can get a no-cost Red Hat Enterprise Linux Developer Suite subscription for development purposes by registering and downloading through developers.redhat.com. We recommend you follow our Getting Started Guide which covers downloading and installing Red Hat Enterprise Linux on a physical system or virtual machine (VM) using your choice of VirtualBox, VMware, Microsoft Hyper-V, or Linux KVM/Libvirt. For more information, see Frequently asked questions: no-cost Red Hat Enterprise Linux Developer Suite.
I can’t find the RHSCL repository on my system.
Some Red Hat Enterprise Linux subscriptions do not include access to RHSCL. For a list of what subscriptions include RHSCL see How to use Red Hat Software Collections (RHSCL) or Red Hat Developer Toolset (DTS).
The name of the RHSCL repository depends on whether you have a server or workstation version of Red Hat Enterprise Linux installed. You can use
subscription-managerto view the available software repositories and verify that you have access to RHSCL:
$ su - # subscription-manager repos --list | egrep rhscl
When I run
yum install devtoolset-6, it fails due to a missing dependency.
Some RHSCL collections require packages that are in the optional RPMs repository, which is not enabled by default. See Step 1 above, for how to enable both the optional RPMs and RHSCL repositories.
When I try to start Eclipse, I get a message about the Eclipse Platform not responding.
The first launch of Eclipse under your user ID might take a minute or two longer to start up than normal while Eclipse sets up files in your home directory. Click the Wait button to let Eclipse finish starting up.
The Eclipse C++ perspective never opens, all I see is "Welcome to Eclipse".
The Welcome tab in Eclipse obscures any of the other tabs. Click the X to close the Welcome tab.
Which version of GCC am I using?
I’m getting the older GCC that came with Red Hat Enterprise Linux instead of the newer DTS version.
How do I include the DTS GCC in my path?
The Red Hat Developer Toolset uses Red Hat Software Collections to install a parallel set of packages in
/opt/rhwhere they will not override the system packages that come with Red Hat Enterprise Linux.
which g++to see which compiler is in your path. The DTS gcc executable path will begin with
/opt/rh. Alternatively, use
g++ -vto confirm that the version number is the correct one for Red Hat Developer Toolset.
$ which g++ /opt/rh/devtoolset-6/root/usr/bin/gcc $ g++ -v g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
g++ -vshows a different version, you need to run
scl enableto add DTS GCC and the rest of DTS to your environment.
$ scl enable devtoolset-4 bash
How can I view the manual pages for the DTS version of GCC?
When you use
scl enable, the manual page search path, MANPATH, is updated. This is in addition to the other environment variables that are updated which include PATH, and LD_LIBRARY_PATH.
$ scl enable devtoolset-4 bash $ man g++
Note: It is possible to use
scl enablefor a specific command. This might be handy if you want to compare the manual page differences between versions.
$ scl enable devtoolset-6 'man g++'
How do I find out which other packages are available in the Red Hat Developer Toolset?
You can view the list of packages with the following command:
# yum list available devtoolset-6-\*
How can I find out what RHSCL packages are installed?
scl --listwill show the list of RHSCL packages that have been installed, whether they are enabled or not.
$ scl --list devtoolset-6 rh-java-common
Why did Java get installed for doing C++ development?
The Eclipse IDE is Java based and needs a Java runtime environment. When Eclipse is installed from DTS, the software collection rh-java-common will be installed automatically.