このコンテンツは選択した言語では利用できません。

Chapter 2.  Red Hat Developer Toolset 9.0 Release


2.1. Features

2.1.1. List of Components

Red Hat Developer Toolset 9.0 provides the following components:

Development Tools

  • GNU Compiler Collection (GCC)
  • binutils
  • elfutils
  • dwz
  • make
  • annobin

Debugging Tools

  • GNU Debugger (GDB)
  • strace
  • ltrace
  • memstomp

Performance Monitoring Tools

  • SystemTap
  • Valgrind
  • OProfile
  • Dyninst
For details, see the Red Hat Developer Toolset Components table in the Red Hat Developer Toolset User Guide.

2.1.2. Changes in Red Hat Developer Toolset 9.0

2.1.2.1. Updated Components

All components in Red Hat Developer Toolset 9.0 are distributed as new packages with the devtoolset-9- prefix and only for Red Hat Enterprise Linux 7.
The following components have been upgraded in Red Hat Developer Toolset 9.0 compared to the previous release of Red Hat Developer Toolset:
  • GCC to version 9.1.1
  • binutils to version 2.32
  • GDB to version 8.3
  • strace to version 5.1
  • SystemTap to version 4.1
  • Valgrind to version 3.15.0
  • Dyninst to version 10.1.0
In addition, Red Hat Developer Toolset 9.0 introduces a new component, Annobin, a build security checking tool. The tool consists of annobin, a plug-in for GCC, and annocheck, a program for examining compiled binary files. The annobin plug-in records security-related command-line options that are used when a program is built. This information is stored in the binary files as a special, non-loadable, section. The annocheck tool examines the information, as well as other features of the compiled program, and generates a report about its security hardening status.
For detailed information on changes in Red Hat Developer Toolset 9.0, see Red Hat Developer Toolset User Guide.

2.1.2.2. Container Images

Red Hat Developer Toolset 9.0 includes two pre-built container images:
  • The rhscl/devtoolset-9-toolchain-rhel7 image, which contains the following Red Hat Developer Toolset components:
    • devtoolset-9-gcc
    • devtoolset-9-gcc-c++
    • devtoolset-9-gcc-fortran
    • devtoolset-9-gdb
    Additionally, the devtoolset-9-binutils component is pulled by devtoolset-9-gcc in the rhscl/devtoolset-9-toolchain-rhel7 image.
  • The rhscl/devtoolset-9-perftools-rhel7 image, which contains the following components:
    • devtoolset-9-dwz
    • devtoolset-9-dyninst
    • devtoolset-9-elfutils
    • devtoolset-9-ltrace
    • devtoolset-9-make
    • devtoolset-9-memstomp
    • devtoolset-9-oprofile
    • devtoolset-9-strace
    • devtoolset-9-systemtap
    • devtoolset-9-valgrind
The container images are available from the Red Hat Container Registry. For details on how to obtain the images and how to run Red Hat Developer Toolset components using these images, see Using Red Hat Software Collections Container Images.

2.2. Known Issues

dyninst component, BZ#1763157
Dyninst 10 is provided only for the AMD64 and Intel 64 architectures.
gcc component
Using C++ object files compiled with GCC versions earlier than 9.1.0 can cause ABI incompatibilities. When the C++ std::rotate algorithm is called with an empty range, the compiled program can terminate unexpectedly with a divide-by-zero error (as a SIGFPE signal). To work around this problem, recompile all objects that might call std::rotate with an empty range.
gcc component, BZ#1731555
Executable files created with Red Hat Developer Toolset are dynamically linked in a nonstandard way. As a consequence, Fortran code cannot handle input/output (I/O) operations asynchronously even if this functionality is requested. To work around this problem, link the libgfortran library statically with the -static-libgfortran option to enable asynchronous I/O operations in Fortran code. Note that Red Hat discourages static linking for security reasons.
gcc component, BZ#1570853
In Red Hat Developer Toolset, libraries are linked via linker scripts which might specify some symbols through static archives. This is required to ensure compatibility with multiple versions of Red Hat Enterprise Linux. However, the linker scripts use names of the respective shared object files. As a consequence, the linker uses different symbol handling rules than expected, and does not recognize symbols required by object files when the option adding the library is specified before options specifying the object files, such as:
gcc -lsomelib objfile.o
Such use of a library from Red Hat Developer Toolset results in linker error messages undefined reference to symbol. To enable successful symbol resolution and linking, follow the standard linking practice and specify the option adding the library after the options specifying the object files:
gcc objfile.o -lsomelib
Note that this recommendation applies when using the version of GCC available as a part of Red Hat Enterprise Linux, too.
gcc component, BZ#1433946
GCC in Red Hat Developer Toolset 3.x contained the libasan package, which might have conflicted with the system version of libasan. As a consequence, depending on which libasan was present in the system, the -fsanitize=address tool worked only either with the system GCC or with the Red Hat Developer Toolset version of GCC, but not with both at the same time. To prevent the described conflict, in Red Hat Developer Toolset 4.x and later versions, the package was renamed to libasanN, where N is a number. However, if the Red Hat Software Collections repository is enabled, the problem can occur after the system update because the system version of libasan is available in an earlier version than the Red Hat Developer Toolset 3.x version, which is still available in the repository. To work around this problem, exclude this package while updating:
~]$ yum update --exclude=libasan
systemtap component
When the user attempts to start the devtoolset-9-stap-server service, an SELinux AVC denial occurs on the IBM POWER, little endian architecture. To work around this problem, disable SELinux, start the service, and enable SELinux.
oprofile component
OProfile 1.3.0 and OProfile 1.2.0 shipped in Red Hat Developer Toolset works on all supported architectures, with the exception of IBM Z, where only the ocount tool works on the following models: z196, zEC12, and z13. operf and the other tools, such as oparchive or opannotate, do not work on IBM Z. For profiling purposes, users are recommended to use the Red Hat Enterprise Linux 7 system OProfile 0.9.9 version, which supports opcontrol with TIMER software interrupts.
Note that for correct reporting of data collected by OProfile 0.9.9, the corresponding opreport utility is necessary. Thus opcontrol-based profiling should be performed with Red Hat Developer Toolset disabled because the reporting tools from Red Hat Developer Toolset cannot process data collected within opcontrol legacy mode correctly.
valgrind component, BZ#869184
The default Valgrind gdbserver support (--vgdb=yes) can cause certain register and flags values to be not always up-to-date due to optimizations done by the Valgrind core. The GDB utility is therefore unable to show certain parameters or variables of programs running under Valgrind. To work around this problem, use the --vgdb=full parameter. Note that programs might run slower under Valgrind when this parameter is used.
multiple components
The devtoolset-version-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 namely applies to devtoolset-version-gcc-debuginfo, devtoolset-version-ltrace-debuginfo, devtoolset-version-valgrind-debuginfo, and might apply to other debuginfo packages, too. A similar conflict can also occur in a multilib environment, where 64-bit debuginfo packages conflict with 32-bit debuginfo packages.
For example, on Red Hat Enterprise Linux 7, devtoolset-7-gcc-debuginfo conflicts with three packages: gcc-base-debuginfo, gcc-debuginfo, and gcc-libraries-debuginfo. On Red Hat Enterprise Linux 6, devtoolset-7-gcc-debuginfo conflicts with one package: gcc-libraries-debuginfo. As a consequence, if conflicting debuginfo packages are installed, attempts to install Red Hat Developer Toolset can fail with a transaction check error message similar to the following examples:
file /usr/lib/debug/usr/lib64/libitm.so.1.0.0.debug from install of gcc-base-debuginfo-4.8.5-16.el7.x86_64 conflicts with file from package devtoolset-7-gcc-debuginfo-7.2.1-1.el7.x86_64
file /usr/lib/debug/usr/lib64/libtsan.so.0.0.0.debug from install of gcc-debuginfo-4.8.5-16.el7.x86_64 conflicts with file from package devtoolset-7-gcc-debuginfo-7.2.1-1.el7.x86_64
file /usr/lib/debug/usr/lib64/libitm.so.1.0.0.debug from install of devtoolset-7-gcc-debuginfo-7.2.1-1.el6.x86_64 conflicts with file from package gcc-libraries-debuginfo-7.1.1-2.3.1.el6_9.x86_64
To work around the problem, manually uninstall the conflicting debuginfo packages prior to installing Red Hat Developer Toolset 9.0. It is advisable to install only the relevant debuginfo packages when necessary and expect such problems to happen.

Other Notes

  • Red Hat Developer Toolset primarily aims to provide a compiler for development of user applications for deployment on multiple versions of Red Hat Enterprise Linux. Operating system components, kernel modules and device drivers generally correspond to a specific version of Red Hat Enterprise Linux, for which the supplied base OS compiler is recommended.
  • Red Hat Developer Toolset 9.0 supports only C, C++ and Fortran development. For other languages, invoke the system version of GCC available on Red Hat Enterprise Linux.
  • Building an application with Red Hat Developer Toolset 9.0 on Red Hat Enterprise Linux (for example, Red Hat Enterprise Linux 7) and then executing that application on an earlier minor version (such as Red Hat Enterprise Linux 6.7.z) may result in runtime errors due to differences in non-toolchain components between Red Hat Enterprise Linux releases. Users are advised to check compatibility carefully. Red Hat supports only execution of an application built with Red Hat Developer Toolset on the same, or a later, supported release of Red Hat Enterprise Linux than the version used to build that application.
  • Valgrind must be rebuilt without Red Hat Developer Toolset's GCC installed, or it will be used in preference to Red Hat Enterprise Linux system GCC. The binary files shipped by Red Hat are build using the system GCC. For any testing, Red Hat Developer Toolset's GDB should be used.
  • All code in the non-shared library libstdc++_nonshared.a in Red Hat Developer Toolset 9.0 is licensed under the GNU General Public License v3 with additional permissions granted under Section 7, described in the GCC Runtime Library Exception version 3.1, as published by the Free Software Foundation.
  • The compiler included in Red Hat Developer Toolset emits newer DWARF debugging records than previous compilers available on Red Hat Enterprise Linux. These new debugging records improve the debugging experience in a variety of ways, particularly for C++ and optimized code. However, certain tools are not yet capable of handling the newer DWARF debug records. To generate the older style debugging records, use the options -gdwarf-2 -gstrict-dwarf or -gdwarf-3 -gstrict-dwarf.
  • Some newer library features are statically linked into applications built with Red Hat Developer Toolset to support execution on multiple versions of Red Hat Enterprise Linux. This adds a small additional security risk because regular Red Hat Enterprise Linux errata would not change this code. If the need for developers to rebuild their applications due to such an issue arises, Red Hat will signal this in a security erratum. Developers are strongly advised not to statically link their entire application for the same reasons.
  • Note that error messages related to a missing libitm library when using the -fgnu-tm option require the libitm package to be installed. You can install the package with the following command:
    yum install libitm
  • To use the ccache utility with GCC included in Red Hat Developer Toolset, set your environment correctly. For example:
    ~]$ scl enable devtoolset-9 '/usr/lib64/ccache/gcc -c foo.c'
    Alternatively, you can create a shell with the Red Hat Developer Toolset version of GCC as the default compiler:
    ~]$ scl enable devtoolset-9 'bash'
    After you have created the shell, run the following two commands:
    ~]$ export PATH=/usr/lib64/ccache${PATH:+:${PATH}}
    ~]$ gcc -c foo.c
  • Because the elfutils libraries contained in Red Hat Developer Toolset 9.0 are linked to a client application statically, caution is advised when passing handles to libelf, libdw, and libasm data structures to external code and when passing handles received from external code to libelf, libdw, and libasm.
    Be especially careful when an external library, which is linked dynamically against the system version of elfutils, is passed a pointer to a structure that comes from the Red Hat Developer Toolset 9.0 version of elfutils (or vice versa).
    Generally, data structures used in the Red Hat Developer Toolset 9.0 version of elfutils are not compatible with the Red Hat Enterprise Linux system versions, and structures coming from one should never be touched by the other.
    In applications that use the Red Hat Developer Toolset 9.0 libraries, all code that was linked against the system version of the libraries should be recompiled against the libraries included in Red Hat Developer Toolset 9.0.
  • The elfutils EBL library, which is used internally by libdw, was amended not to open back ends dynamically. Instead, a selection of back ends is compiled in the library itself: the 32-bit AMD and Intel architecture, AMD64 and Intel 64 systems, Intel Itanium, IBM Z, 32-bit IBM Power Systems, 64-bit IBM Power Systems, IBM POWER, big endian, and the 64-bit ARM architecture. Some functionality may not be available if the client wishes to work with ELF files from architectures other than those mentioned above.
  • Some packages managed by the scl utility include privileged services that require sudo. The system sudo clears environment variables and so Red Hat Developer Toolset includes its own sudo shell script, wrapping scl enable. This script does not currently parse or pass normal sudo options, only sudo COMMAND ARGS .... In order to use the system version of sudo from within a Red Hat Developer Toolset-enabled shell, use the /usr/bin/sudo binary.
  • Intel have issued erratum HSW136 concerning TSX (Transactional Synchronization Extensions) instructions. Under certain circumstances, software using the Intel TSX instructions may result in unpredictable behavior. TSX instructions may be executed by applications built with Red Hat Developer Toolset GCC under certain conditions. These include use of GCC's experimental Transactional Memory support (using the -fgnu-tm option) when executed on hardware with TSX instructions enabled. The users of Red Hat Developer Toolset are advised to exercise further caution when experimenting with Transaction Memory at this time, or to disable TSX instructions by applying an appropriate hardware or firmware update.
  • To use the Memory Protection Extensions (MPX) feature in GCC, the Red Hat Developer Toolset version of the libmpx library is required, otherwise the application might not link properly.
  • The two binutils linkers, gold and ld, have different ways of handling hidden symbols, which leads to incompatibilities in their behavior. Previously, the gold and ld linkers had inconsistent and incorrect behavior with regard to shared libraries and hidden symbols. There were two scenarios:
    • If a shared library referenced a symbol that existed elsewhere in both hidden and non-hidden versions, the gold linker produced a bogus warning message about the hidden version.
    • If a shared library referenced a symbol that existed elsewhere only as a hidden symbol, the gold linker created an executable, even though it could not work.
    The gold linker has been updated so that it no longer issues bogus warning messages about hidden symbols that also exist in a non-hidden version. The second scenario cannot be solved in the linker. It is up to the programmer to ensure that a non-hidden version of the symbol is available when the application is run.
    As a result, the two linkers' behavior is closer, but they still differ in case of a reference to a hidden symbol that cannot be found elsewhere in a non-hidden version. Unfortunately, there is not a single correct behavior for this situation, so the linkers are allowed to differ.
  • The valgrind-openmpi subpackage is no longer provided with Valgrind in Red Hat Developer Toolset. The devtoolset-<version>-valgrind-openmpi subpackages previously caused incompatibility issues with various Red Hat Enterprise Linux minor releases and problems with rebuilding. Users are recommended to use the latest Red Hat Enterprise Linux system version of the valgrind and valgrind-openmpi packages if they need to run Valgrind against their programs that are built against the openmpi-devel libraries.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.