Red Hat Developer Toolset 2.1
Release Notes for Red Hat Developer Toolset 2.1
Edition 0
Legal Notice
Copyright © 2014 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Abstract
Red Hat Developer Toolset is a Red Hat offering for developers on the Red Hat Enterprise Linux platform. Using a framework called Software Collections, an additional set of tools is installed into the
/opt directory, as recommended by the UNIX Filesystem Hierarchy Standard. These tools are enabled by the user on demand using the supplied scl utility. Red Hat Developer Toolset 2.1 provides current versions of the GNU Compiler Collection, GNU Debugger a number of Performance Tools and a variety of other utilities. These do not replace the Red Hat Enterprise Linux system versions of these tools, nor will they be used in preference to those system versions unless explicitly invoked using the scl utility.
These Release Notes contain important information available at the time of release of Red Hat Developer Toolset 2.1. Known problems, resources, and other issues are discussed here. Read this document before beginning to use Red Hat Developer Toolset 2.1.
This chapter specifies hardware requirements and contains information related to the installation of Red Hat Developer Toolset 2.1.
Red Hat Developer Toolset 2.1 contains RPM packages for both Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6 running on 32-bit or 64-bit Intel or AMD architectures. Installation on PowerPC architecture is not supported. The correct packages must be installed according to the host operating system in use.
Red Hat Enterprise Linux 5 RPM packages can be used on supported versions of Red Hat Enterprise Linux 5 only, and Red Hat Enterprise Linux 6 RPM packages can be used on supported versions of Red Hat Enterprise Linux 6 only.
Important
Red Hat Developer Toolset 2.1 requires systems to be subscribed to the
Optional channel in order to access all the necessary dependent packages required by the Red Hat Developer Toolset toolchain. This can be achieved by following the instructions at https://access.redhat.com/site/solutions/70019. Users of Red Hat Enterprise Linux 6 can add this channel by selecting → → from the panel, navigating to → , and then enabling the Optional channel for their system.
Important
Use of Red Hat Developer Toolset requires the removal of any earlier pre-release versions of this product. Additionally, it is not possible to update to Red Hat Developer Toolset 2.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 the Uninstalling Red Hat Developer Toolset section of the Red Hat Developer Toolset 2.1 User Guide.
Note that installing Red Hat Developer Toolset 2.x in parallel with Red Hat Developer Toolset 1.x is supported.
For detailed information on installation of Red Hat Developer Toolset refer to the Installing Red Hat Developer Toolset chapter of the Red Hat Developer Toolset 2.1 User Guide.
Red Hat Developer Toolset 2.1 adds Git as a new component available only for Red Hat Enterprise Linux 6. Git is a fast, scalable, distributed revision control system with a rich command set that provides both high-level operations and full access to internals.
For detailed information on changes in Red Hat Developer Toolset 2.1, refer to Red Hat Developer Toolset User Guide.
The Red Hat Developer Toolset version of the GNU Compiler Collection (GCC) provides the following features:
- A new register allocator (LRA) has been added, improving code performance
- A fast memory error detector called AddressSanitizer has been added
- A fast data race detector called ThreadSanitizer has been added
- Extremely large functions can now be compiled faster using less memory
- A new "general" optimization level has been introduced
- GCC diagnostic messages now highlight the exact problem in the source code
- Various new optimization options have been added
- DWARF4 is now used as the default debug format
- GCC now fully implements the C++11 language standard
- C++11 library support has been extended though it is still experimental
- GCC now supports dynamic initialization of thread-local variables
- Support has been added for Intel FXSR, XSAVE, and XSAVEOPT instructions
- New built-in functions added to detect run-time Intel CPU Type and ISA
- Intel function multi-versioning support added
- Intel RTM/HLE intrinsics, built-ins and code generation have been added
- Transactions (-fgnu-tm option) can now be run using Intel TSX extensions
- Support for AMD family 15h and 16h processors has been added
- Various Fortran changes have been included
The version of the GNU Debugger (GDB) included in Red Hat Developer Toolset provides the following features:
- Improved and expanded support for Python scripting.
- Improved handling of C++ debugee executables.
- Improved inferior control commands.
- Improved support for ambiguous line specifications.
- Improved tracepoint support.
- Multi-program debugging.
Additionally, the Red Hat Developer Toolset version of binutils provides these features:
- The new
goldlinker, which is smaller and faster thanld. Note thatgoldis not the default linker and must be explicitly enabled by using thealternativescommand. - Support for link-time optimization (LTO) in conjunction with GCC.
- Support for build-IDs, unique numbers to identify executables.
- Support for the
IFUNCandUNIQUEsymbols that are used byglibcto improve performance. Due to dependencies on a particular version of theglibclibrary, these symbols are only available on Red Hat Enterprise Linux 6. - Compressed debug sections for smaller debug info files.
C++ Compatibility
Objects compiled with Developer Toolset 1.1 and 2.1 in C++98 mode (the default mode) are compatible with each other, and with objects compiled with the Red Hat Enterprise Linux system compilers in C++98 mode. Objects compiled in C++11 mode (that is, with -std=c++11) are compatible with all of the above C++98 objects, but are not guaranteed to be compatible with C++11 objects compiled with a different major version of the compiler. That is, if some C++11 objects previously compiled with Developer Toolset 1.1 are rebuilt with Developer Toolset 2.1, all C++11 objects should be rebuilt.
For more information on features in this release, refer to the Red Hat Developer Toolset User Guide.
-
gcccomponent - On Red Hat Enterprise Linux 5 and 6, attempting to install Red Hat Developer Toolset 2.1 in parallel with Red Hat Developer Toolset 1.1 can fail with an error message similar to the following;
file /usr/lib/debug/usr/lib/libitm.so.1.0.0.debug from install of libitm-debuginfo-4.7.0-5.1.1.el6.i686 conflicts with file from package devtoolset-1.1-gcc-debuginfo-4.7.2-5.el6.i686
To work around the problem, manually uninstall the devtoolset-1.1-gcc-debuginfo package prior to installing Red Hat Developer Toolset 2.1. -
valgrindcomponent - 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 workaround this problem use--vgdb=fullparameter. Note that programs can run slower under Valgrind when this parameter is used. -
valgrindcomponent - 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 binaries shipped by Red Hat are build using system gcc. For any testing, Red Hat Developer Toolset's gdb should be used.
-
elfutilscomponent - elfutils must be rebuilt without Red Hat Developer Toolset enabled, otherwise the compilation will end with an error.
-
oprofilecomponent - OProfile provides access to performance monitoring hardware only on physical machines. If you are using OProfile on a virtual machine guest, you need to force OProfile to use the timer mechanism with the following command:
~]$
opcontrol --deinit; modprobe oprofile timer=1 -
oprofilecomponent - To allow OProfile to use the hardware performance units on Red Hat Enterprise Linux 5 or Red Hat Enterprise Linux 6, you need to disable watchdog timers with the following command:
~]$
echo 0 > /proc/sys/kernel/nmi_watchdog -
dyninstcomponent - The
dyninstcomponent works correctly only when the "allow_execmod" and "allow_execstack" SELinux boolean values are turned on. To do so, run the following commands:~]#
setsebool allow_execmod on~]#
setsebool allow_execstack on -
binutilscomponent - Under certain circumstances, printing out information from an Executable Linking Format (ELF) file by using the eu-readelf utility fails with the following error message:
invalid CIE reference in FDE
To work around this problem, use the "-Wl,--traditional-format" option when linking the object files in the GNU Compiler Collection (GCC). Alternatively, use the "-flto -fno-fat-lto-objects" option for generating all object files. -
oprofilecomponent - Under certain circumstances, on some Red Hat Enterprise Linux 5 systems, the
oprofileddaemon terminates unexpectedly with a segmentation fault during the profiling process when theopcontrol --save=<name>command is executed while the daemon is running. As a consequence, some profiling data collected by the daemon can be lost. To work around this problem, use theopcontrol --shutdown; opcontrol --save=<name>command instead ofopcontrol --save=<name>while the oprofile utility is running. -
eclipsecomponent - Under certain circumstances, on some Red Hat Enterprise Linux 6.5 systems, the perf utility returns improperly formatted data when the report command is run to show the number of samples for each symbol (the
-noption) using a particular field separator (the-toption) for columns. This problem has been addressed by a bug fix to the underlying perf utility in kernel-2.6.32-421.el6. Also, on 32-bit Intel architecture, the reported sample values are incorrect and appear to have underflown. As a consequence, the Eclipse Perf plug-in parses the data incorrectly and either does not report any samples captured, or displays them improperly.
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.
- After installing Red Hat Developer Toolset, it is recommended to apply all available Red Hat Enterprise Linux errata updates to enable all Red Hat Developer Toolset features and apply fixes that may otherwise impact the tools or built code.
- Red Hat Developer Toolset 2.1 supports C, C++ and Fortran development only. For other languages, please invoke the system version of GCC available on Red Hat Enterprise Linux.
- Red Hat Developer Toolset 2.1 Valgrind contains experimental support for some AVX2 instructions.
- Building an application with Red Hat Developer Toolset 2.1 on Red Hat Enterprise Linux (for example: Red Hat Enterprise Linux 5.9) and then executing that application on an earlier minor version (such as Red Hat Enterprise Linux 5.6) 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 only supports 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.
- All code in the non-shared library
libstdc++_nonshared.ain Red Hat Developer Toolset 2.1 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-dwarfor-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 as normal 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 via 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-tmoption require the libitm package to be installed. You can install the package with the following command:yum install libitm - The ccache utility can be used with GCC included in Red Hat Developer Toolset by setting your environment correctly. For example:
~]$
sclenable devtoolset-2.1 '/usr/lib64/ccache/gcc -cfoo.c'Alternatively, you can create a shell with the Red Hat Developer Toolset version of GCC as the default compiler:~]$
sclenable devtoolset-2.1 'bash'After you have created the shell, run the following two commands:~]$
exportPATH=/usr/lib64/ccache${PATH:+:${PATH}}~]$
gcc-c -o a.o a.c - Because the elfutils libraries contained in Red Hat Developer Toolset 2.1 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 2.1 version of elfutils (or vice versa).Generally, data structures used in the Red Hat Developer Toolset 2.1 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 2.1 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 2.1.
- elfutils EBL, a library used internally by libdw, was amended not to open back ends dynamically. Instead, a selection of back ends is compiled in the library itself: Intel x86 (i386), AMD64 / Intel 64 (x86_64), Intel Itanium, and IBM System z. Some functionality may not be available if the client wishes to work with ELF files from architectures other than those mentioned above.
- With the Red Hat Developer Toolset 2.1 release, you can now use Valgrind's libmpiwrap wrapper with either the openmpi package or the compat-openmpi compatibility package. When using Valgrind on Red Hat Enterprise Linux 6, specify whether you want use the openmpi or compat-openmpi package by updating the
LD_PRELOADenvironment variable.To use the openmpi package with the libmpiwrap wrapper, updateLD_PRELOADas follows:LD_PRELOAD=/opt/rh/devtoolset-2/root/usr/lib64/valgrind/libmpiwrap-amd64-linux.so:/usr/lib64/openmpi/lib/libmpi.so /usr/lib64/openmpi/bin/mpirun valgrind ./mpi-hello
Wherempi-hellois compiled with the appropriate mpicc compiler.To use the compat-openmpi package with the libmpiwrap wrapper, updateLD_PRELOADas follows:LD_PRELOAD=/opt/rh/devtoolset-2/root/usr/lib64/valgrind/libmpiwrap-amd64-linux.so:/usr/lib64/compat-openmpi/lib/libmpi.so /usr/lib64/compat-openmpi/bin/mpirun valgrind ./mpi-hello
Wherempi-hellois compiled with the appropriate mpicc compiler.To test that the above works as expected and the MPI calls are intercepted by the wrapper, set the environment variableMPIWRAP_DEBUGtoverbose. - 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, onlysudo. In order to use the system version of scl from within a Red Hat Developer Toolset-enabled shell, please use theCOMMAND ARGS .../usr/bin/sudobinary.
For more information about Red Hat Developer Toolset 2.1 and Red Hat Enterprise Linux, refer to the resources listed below.
Users of Red Hat Developer Toolset can access the Red Hat Enterprise Linux Developer Program Group in the Red Hat Customer Portal to get developer related information for the development tools available for Red Hat Enterprise Linux. In addition, users can find there developer related papers and videos on topics that are of interest to developers, for example RPM building, threaded programming, performance tuning, debugging, and so on.
- To visit the Red Hat Enterprise Linux Developer Program Group, log in to the Customer Portal, click at the top of the page, choose , and then from the list.
The Red Hat Documentation portal located at https://access.redhat.com/site/documentation/ serves as a central source of all product documentation. It is translated in 22 languages and for each product, it provides different kinds of books from release and technical notes to installation, user, and reference guides in HTML, PDF, and EPUB formats.
The following is a brief list of documents that are directly or indirectly relevant to this book:
- Red Hat Developer Toolset 2.1 User Guide – The User Guide for Red Hat Developer Toolset 2.1 contains more information about installing and using this product.
- Red Hat Developer Toolset 2.1 Software Collections Guide – The Software Collections Guide for Red Hat Developer Toolset 2.1 explains the concept of Software Collections and documents Software Collections packaging.
- Red Hat Enterprise Linux 6 Developer Guide – The Developer Guide for Red Hat Enterprise Linux 6 provides detailed information on the Eclipse IDE, libraries and runtime support, compiling and building, debugging, and profiling.
