Chapter 1. Red Hat Developer Toolset

1.1. About Red Hat Developer Toolset

Red Hat Developer Toolset is a Red Hat offering for developers on the Red Hat Enterprise Linux platform. It provides a complete set of development and performance analysis tools that can be installed and used on multiple versions of Red Hat Enterprise Linux. Executables built with the Red Hat Developer Toolset toolchain can then also be deployed and run on multiple versions of Red Hat Enterprise Linux. For detailed compatibility information, see Section 1.3, “Compatibility”.

Red Hat Developer Toolset does not replace the default system tools provided with Red Hat Enterprise Linux 6 or 7 when installed on those platforms. Instead, a parallel set of developer tools provides an alternative, newer version of those tools for optional use by developers. The default compiler and debugger, for example, remain those provided by the base Red Hat Enterprise Linux system.

What Is New in Red Hat Developer Toolset 7.1

Since Red Hat Developer Toolset 4.1, the Red Hat Developer Toolset content is also available in the ISO format together with the rest of Red Hat Software Collections content at https://access.redhat.com/downloads, specifically for Server and Workstation. Note that packages that require the Optional channel, which are discussed in Section 1.5.3, “Installing Optional Packages”, cannot be installed from the ISO image.

Table 1.1. Red Hat Developer Toolset Components

NameVersionDescription

GCC

7.3.1

A portable compiler suite with support for C, C++, and Fortran.

binutils

2.28

A collection of binary tools and other utilities to inspect and manipulate object files and binaries.

elfutils

0.170

A collection of binary tools and other utilities to inspect and manipulate ELF files.

dwz

0.12

A tool to optimize DWARF debugging information contained in ELF shared libraries and ELF executables for size.

GDB

8.0.1

A command line debugger for programs written in C, C++, and Fortran.

ltrace

0.7.91

A debugging tool to display calls to dynamic libraries that a program makes. It can also monitor system calls executed by programs.

strace

4.17

A debugging tool to monitor system calls that a program uses and signals it receives.

memstomp

0.1.5

A debugging tool to identify calls to library functions with overlapping memory regions that are not allowed by various standards.

SystemTap

3.1

A tracing and probing tool to monitor the activities of the entire system without the need to instrument, recompile, install, and reboot.

Valgrind

3.13.0

An instrumentation framework and a number of tools to profile applications in order to detect memory errors, identify memory management problems, and report any use of improper arguments in system calls.

OProfile

1.2.0

A system-wide profiler that uses the performance monitoring hardware on the processor to retrieve information about the kernel and executables on the system.

Dyninst

9.3.2

A library for instrumenting and working with user-space executables during their execution.

make

4.2.1

A dependency-tracking build automation tool.

Red Hat Developer Toolset differs from "Technology Preview" compiler releases previously supplied in Red Hat Enterprise Linux in two important respects:

  1. Red Hat Developer Toolset can be used on multiple major and minor releases of Red Hat Enterprise Linux, as detailed in Section 1.3, “Compatibility”.
  2. Unlike Technology Preview compilers and other tools shipped in earlier Red Hat Enterprise Linux, Red Hat Developer Toolset is fully supported under Red Hat Enterprise Linux Subscription Level Agreements, is functionally complete, and is intended for production use.

Important bug fixes and security errata are issued to Red Hat Developer Toolset subscribers in a similar manner to Red Hat Enterprise Linux for two years from the release of each major version release. A new major version of Red Hat Developer Toolset is released annually, providing significant updates for existing components and adding major new components. A single minor release, issued six months after each new major version release, provides a smaller update of bug fixes, security errata, and new minor components.

Additionally, the Red Hat Enterprise Linux Application Compatibility Specification also applies to Red Hat Developer Toolset (subject to some constraints on the use of newer C++11 language features, detailed in Section 2.2.4, “C++ Compatibility”).

Important

Applications and libraries provided by Red Hat Developer Toolset do not replace the Red Hat Enterprise Linux system versions, nor are they used in preference to the system versions. Using a framework called Software Collections, an additional set of developer tools is installed into the /opt/ directory and is explicitly enabled by the user on demand using the scl utility.

1.2. Main Features

Red Hat Developer Toolset 7.1 brings the following changes:

  • The Red Hat Developer Toolset version of the GNU Compiler Collection (GCC) has been upgraded to version 7.3.1 with many new features and bug fixes.
  • The Red Hat Developer Toolset version of the GNU Debugger (GDB) has been upgraded to version 8.0.1 with many new features and bug fixes.

For a full list of changes and features introduced in this release, see Section A.1, “Changes in Version 7.1”.

1.3. Compatibility

Red Hat Developer Toolset 7.1 is available for Red Hat Enterprise Linux 6 and 7 for a number of architectures. Figure 1.1, “Red Hat Developer Toolset 7.1 Compatibility Matrix” illustrates the support for binaries built with Red Hat Developer Toolset on a certain version of Red Hat Enterprise Linux when those binaries are run on various other versions of this system.

For ABI compatibility information, see Section 2.2.4, “C++ Compatibility”.

Figure 1.1. Red Hat Developer Toolset 7.1 Compatibility Matrix

Red Hat Developer Toolset 7.1 Compatibility Matrix

Architecture support

Red Hat Developer Toolset is available on the following architectures:

  • The 64-bit Intel and AMD architectures
  • The 64-bit ARM architecture
  • The IBM POWER architecture
  • The little-endian variant of IBM POWER architecture
  • The IBM z Systems architecture

1.4. Getting Access to Red Hat Developer Toolset

Red Hat Developer Toolset is an offering that is distributed as a part of the following content sets:

Red Hat Software Collections
This content set is available to customers with Red Hat Enterprise Linux 6 and 7 subscriptions listed at https://access.redhat.com/solutions/472793.
Red Hat Developer Tools

This content set is available to customers with deployments of Red Hat Enterprise Linux 7.

Note

Please note the difference: Red Hat Developer Toolset is an offering distributed as a part of the Red Hat Developer Tools content set.

Enable Red Hat Developer Toolset by using the Red Hat Subscription Management. For information on how to register your system with this subscription management service, see the Red Hat Subscription Management collection of guides.

1.4.1. Using Red Hat Software Collections

Complete the following steps to attach a subscription that provides access to the repository for Red Hat Software Collections (which includes Red Hat Developer Toolset), and then enable that repository:

  1. Determine the pool ID of a subscription that provides Red Hat Software Collections (and thus also Red Hat Developer Toolset). To do so, display a list of all subscriptions that are available for your system:

    # subscription-manager list --available

    For each available subscription, this command displays its name, unique identifier, expiration date, and other details related to your subscription. The pool ID is listed on a line beginning with Pool ID.

    For a complete list of subscriptions that provide access to Red Hat Developer Toolset, see https://access.redhat.com/solutions/472793.

  2. Attach the appropriate subscription to your system:

    # subscription-manager attach --pool=pool_id

    Replace pool_id with the pool ID you determined in the previous step. To verify the list of subscriptions your system has currently attached, at any time:

    # subscription-manager list --consumed
  3. Determine the exact name of the Red Hat Software Collections repository. Retrieve repository metadata and to display a list of available Yum repositories:

    # subscription-manager repos --list

    The repository names depend on the specific version of Red Hat Enterprise Linux you are using and are in the following format:

    rhel-variant-rhscl-version-rpms
    rhel-variant-rhscl-version-debug-rpms
    rhel-variant-rhscl-version-source-rpms

    In addition, certain packages, such as devtoolset-7-gcc-plugin-devel, depend on packages that are only available in the Optional channel. The repository names with these packages use the following format:

    rhel-version-variant-optional-rpms
    rhel-version-variant-optional-debug-rpms
    rhel-version-variant-optional-source-rpms

    For both the regular repositories and optional repositories, replace variant with the Red Hat Enterprise Linux system variant (server or workstation), and version with the Red Hat Enterprise Linux system version (6-eus, 6, or 7).

  4. Enable the repositories from step no. 3:

    # subscription-manager repos --enable repository

    Replace repository with the name of the repository to enable.

Once the subscription is attached to the system, you can install Red Hat Developer Toolset as described in Section 1.5, “Installing Red Hat Developer Toolset”. For more information on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the Red Hat Subscription Management collection of guides.

1.4.2. Using Red Hat Developer Tools

  1. Enable the rhel-7-variant-devtools-rpms repository:

    # subscription-manager repos --enable rhel-7-variant-devtools-rpms

    Replace variant with the Red Hat Enterprise Linux system variant (server or workstation).

  2. Add the Red Hat Developer Tools key to your system:

    # cd /etc/pki/rpm-gpg
    # wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt
    # rpm --import RPM-GPG-KEY-redhat-devel

Once the subscription is attached to the system, you can install Red Hat Developer Toolset as described in Section 1.5, “Installing Red Hat Developer Toolset”. For more information on how to register your system using Red Hat Subscription Management and associate it with subscriptions, see the Red Hat Subscription Management collection of guides.

1.5. Installing Red Hat Developer Toolset

Red Hat Developer Toolset is distributed as a collection of RPM packages that can be installed, updated, uninstalled, and inspected by using the standard package management tools that are included in Red Hat Enterprise Linux. Note that a valid subscription that provides access to the Red Hat Software Collections content set is required in order to install Red Hat Developer Toolset on your system. For detailed instructions on how to associate your system with an appropriate subscription and get access to Red Hat Developer Toolset, see Section 1.4, “Getting Access to Red Hat Developer Toolset”.

Important

Before installing Red Hat Developer Toolset, install all available Red Hat Enterprise Linux updates.

1.5.1. Installing All Available Components

To install all components that are included in Red Hat Developer Toolset, install the devtoolset-7 package:

# yum install devtoolset-7

This installs all development, debugging, and performance monitoring tools, and other dependent packages to the system. Alternatively, you can choose to install only a selected package group as described in Section 1.5.2, “Installing Individual Package Groups”.

Note

Note that since Red Hat Developer Toolset 3.0, the scl-utils package is not a part of Red Hat Developer Toolset, which is a change from preceding versions where the scl utility was installed along with the Red Hat Developer Toolset software collection.

1.5.2. Installing Individual Package Groups

To make it easier to install only certain components, such as the integrated development environment or the software development toolchain, Red Hat Developer Toolset is distributed with a number of meta packages that allow you to install selected package groups as described in Table 1.2, “Red Hat Developer Toolset Meta Packages”.

Table 1.2. Red Hat Developer Toolset Meta Packages

Package NameDescriptionInstalled Components

devtoolset-7-perftools

Performance monitoring tools

SystemTap, Valgrind, OProfile, Dyninst

devtoolset-7-toolchain

Development and debugging tools

GCC, make, GDB, binutils, elfutils, dwz, memstomp, strace, ltrace

To install any of these meta packages:

# yum install package_name

Replace package_name with a space-separated list of meta packages you want to install. For example, to install only the development and debugging toolchain and packages that depend on it:

# yum install devtoolset-7-toolchain

Alternatively, you can choose to install all available components as described in Section 1.5.1, “Installing All Available Components”.

1.5.3. Installing Optional Packages

Red Hat Developer Toolset is distributed with a number of optional packages that are not installed by default. To list all Red Hat Developer Toolset packages that are available to you but not installed on your system:

$ yum list available devtoolset-7-\*

To install any of these optional packages:

# yum install package_name

Replace package_name with a space-separated list of packages that you want to install. For example, to install the devtoolset-7-gdb-gdbserver and devtoolset-7-gdb-doc packages:

# yum install devtoolset-7-gdb-gdbserver devtoolset-7-gdb-doc

1.5.4. Installing Debugging Information

To install debugging information for any of the Red Hat Developer Toolset packages, make sure that the yum-utils package is installed and run:

# debuginfo-install package_name

For example, to install debugging information for the devtoolset-7-dwz package:

# debuginfo-install devtoolset-7-dwz

Note that in order to use this command, you need to have access to the repository with these packages. If your system is registered with Red Hat Subscription Management, enable the rhel-variant-rhscl-version-debug-rpms repository as described in Section 1.4, “Getting Access to Red Hat Developer Toolset”. For more information on how to get access to debuginfo packages, see https://access.redhat.com/site/solutions/9907.

Note

The devtoolset-7-package_name-debuginfo packages can conflict with the corresponding packages from the base Red Hat Enterprise Linux system or from other versions of Red Hat Developer Toolset. This conflict also occurs in a multilib environment, where 64-bit debuginfo packages conflict with 32-bit debuginfo packages.

Manually uninstall the conflicting debuginfo packages prior to installing Red Hat Developer Toolset 7.1 and install only relevant debuginfo packages when necessary.

1.6. Updating Red Hat Developer Toolset

1.6.1. Updating to a Minor Version

When a new minor version of Red Hat Developer Toolset is available, update your Red Hat Enterprise Linux installation:

# yum update

This updates all packages on your Red Hat Enterprise Linux system, including the Red Hat Developer Toolset versions of development, debugging, and performance monitoring tools, and other dependent packages.

Important

Use of Red Hat Developer Toolset requires the removal of any earlier pre-release versions of it. Additionally, it is not possible to update to Red Hat Developer Toolset 7.1 from a pre-release version of Red Hat Developer Toolset, including beta releases. If you have previously installed any pre-release version of Red Hat Developer Toolset, uninstall it from your system as described in Section 1.7, “Uninstalling Red Hat Developer Toolset” and install the new version as documented in Section 1.5, “Installing Red Hat Developer Toolset”.

1.6.2. Updating to a Major Version

When a new major version of Red Hat Developer Toolset is available, you can install it in parallel with the previous version. For detailed instructions on how to install Red Hat Developer Toolset on your system, see Section 1.5, “Installing Red Hat Developer Toolset”.

1.7. Uninstalling Red Hat Developer Toolset

To uninstall Red Hat Developer Toolset packages from your system:

# yum remove devtoolset-7\* libasan libatomic libcilkrts libitm liblsan libtsan libubsan

This removes the GNU Compiler Collection, GNU Debugger, binutils, and other packages that are a part of Red Hat Developer Toolset from the system.

Note

Red Hat Developer Toolset 7.1 for Red Hat Enterprise Linux 7 no longer includes the libatomic and libitm libraries, which the above command attempts to remove, because they are not required for a proper function of Red Hat Developer Toolset components on that system. Nevertheless, the above command works as expected even on Red Hat Enterprise Linux 7.

Note that the uninstallation of the tools provided by Red Hat Developer Toolset does not affect the Red Hat Enterprise Linux system versions of these tools.

1.8. Using Red Hat Developer Toolset Container Images

Docker-formatted container images can be used to run Red Hat Developer Toolset components inside virtual software containers, thus isolating them from the host system and allowing for their rapid deployment. For detailed description of the Red Hat Developer Toolset docker-formatted container images and Red Hat Developer Toolset Dockerfiles, see Using Red Hat Software Collections Container Images.

Note

The docker package, which contains the Docker daemon, command-line tool, and other necessary components for building and using docker-formatted container images, is currently available only for the Server variant of the Red Hat Enterprise Linux 7 product. Docker-formatted container images cannot be run on Red Hat Enterprise Linux 6, and Red Hat Developer Toolset Dockerfiles are not distributed for Red Hat Enterprise Linux 6.

Follow the instructions outlined at Getting Docker in RHEL 7 to set up an environment for building and using docker-formatted container images.

1.9. Additional Resources

For more information about Red Hat Developer Toolset and Red Hat Enterprise Linux, see the resources listed below.

Online Documentation

See Also