This is not a bug, but the feature! :) RH DevToolset is not just an alternative compiler built on the side. It's libstdc++ is an LD script. The new C++11 (and above) symbols in your binary would be resolved via static library (built specially and shipped w/ DTS). However, old symbols (existed in the OS's shipped libstdc++) going to be resolved dynamically. That is why ldd shows you libstdc++ from the /usr/lib64! Also, it has Old C++ ABI by default... to make your modern C++ code compatible w/ old libstdc++ DSO.

This feature allows you to use modern C++ standards, and produce a binary which can be executed in the original OS (CentOS/RHEL) w/o any additional "redistributable" shared libraries.

JFYI, if you use strip, make sure you use it from DTS and not the "native" one (shipped in binutils from the OS)! Otherwise, really bad things can happen.

Answer from zaufi on Stack Overflow
🌐
CMake Discourse
discourse.cmake.org › usage
Can CMake automatically detect RH devtoolset-7? - Usage - CMake Discourse
June 4, 2021 - I am building on Centos 7, which natively has gcc 4.8.5, using CMake 3.16.6 and Ninja. My code requires gcc 7 so I specify RH devtoolset-7: -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++ My code checks the compiler version as follows: if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4.0) message(FATAL_ERROR "g++ (GCC) version must be at least 5.4.0 (detected ${CMAKE_CXX_COMPILER_VERSION}). If on Centos 7, have you enabled Red...
🌐
Mantidproject
developer.mantidproject.org › BuildingWithCMake.html
Building with CMake — MantidProject main documentation
Please note that the executable is called cmake3 on Red Hat 7 / CentOS7. On Red Hat 7 / CentOS7 mantid uses devtoolset-7. This means that you need to wrap your initial cmake command as scl enable devtoolset-7 "cmake3 /path/to/source".
🌐
Bits and Dragons
bitsanddragons.wordpress.com › 2017 › 07 › 06 › install-simple-2-5-therefore-cmake-3-8-and-gcc-4-9-2-on-cent-os-7
Install Simple-2.5 (therefore cmake-3.8 and gcc-4.9.2) on Cent OS 7 | Bits and Dragons
March 7, 2018 - module load cmake-3.8.2 scl enable devtoolset-3 bash tar -xvzf simple2.5.tgz mkdir build cd build/ cmake ../ -- The Fortran compiler identification is GNU 4.9.2 -- The C compiler identification is GNU 4.9.2 ... a lot of things going on here...
🌐
The Mail Archive
mail-archive.com › cmake@cmake.org › msg60951.html
Re: [CMake] How to specify Redhat Developer Toolset compiler?
June 20, 2019 - You could set the environment variables ... > > cmake_minimum_required(VERSION 3.5 FATAL_ERROR) project(hello_world > LANGUAGES CXX) > > add_executable(hello_world "") > > target_sources(hello_world > PRIVATE > main.cpp > Message.hpp > Message.cpp) > > I also have Redhat Developer Toolset 7 installed which I can enable in > my bash shell: > > $ scl enable devtoolset-7 bash > $ ...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360004312319-enable-scl-devtoolset
enable scl devtoolset – IDEs Support (IntelliJ Platform) | JetBrains
For your information the only thing devtoolset is doing for you is providing a newer version for C/C++ Compiler and other tools like CMake, Make, etc.
🌐
CMake
cmake.org › pipermail › cmake › 2019-June › 069646.html
[CMake] How to specify Redhat Developer Toolset compiler?
July 18, 2019 - 20 juin 2019 à 17:39, David Aldrich ... > > cmake_minimum_required(VERSION 3.5 FATAL_ERROR) > project(hello_world LANGUAGES CXX) > > add_executable(hello_world "") > > target_sources(hello_world > PRIVATE > main.cpp > Message.hpp > Message.cpp) > > I also have Redhat Developer Toolset 7 installed which I can enable in my > bash shell: > > $ scl enable devtoolset-7 bash > $ ...
Find elsewhere
🌐
GitHub
github.com › microsoft › vscode-cmake-tools › issues › 702
CMT not providing chosen compilerPath to cpptools · Issue #702 · microsoft/vscode-cmake-tools
June 25, 2019 - export CXX="/opt/rh/devtoolset-7/root/usr/bin/g++" export CC="/opt/rh/devtoolset-7/root/usr/bin/gcc" ... # Show compiler path message(STATUS "Compiler path: " ${CMAKE_CXX_COMPILER}) [cmake] Compiler path: /opt/rh/devtoolset-7/root/usr/bin/g++ [cmake] Configuring done
Author   microsoft
🌐
GitHub
github.com › ku-nlp › jumanpp › blob › master › docs › building.md
jumanpp/docs/building.md at master · ku-nlp/jumanpp
March 24, 2020 - # Install Software Collections and devtoolset (need to do only once) sudo yum install centos-release-scl sudo yum install devtoolset-7 llvm-toolset-7-cmake scl enable devtoolset-7 llvm-toolset-7 bash # Following lines should be typed from the build directory cmake ..
Author   ku-nlp
🌐
GitHub
github.com › MISP › MISP › issues › 2743
Install steps for LIEF on Red Hat Enterprise Linux 7.4 · Issue #2743 · MISP/MISP
December 17, 2017 - cd $LIEF_TMP/LIEF mkdir -p build cd build scl enable devtoolset-7 'bash -c "cmake3 \ -DLIEF_PYTHON_API=on \ -DLIEF_DOC=off \ -DCMAKE_INSTALL_PREFIX=$LIEF_INSTALL \ -DCMAKE_BUILD_TYPE=Release \ -DPYTHON_VERSION=2.7 \ .."' make -j3 cd api/python python setup.py install || : cd $LIEF_TMP/LIEF/build make install make package
Author   MISP
🌐
CMake
cmake.org › pipermail › cmake › 2014-March › 057188.html
[CMake] wrapper around real compiler
March 12, 2014 - On our CI, I put the following in build script (before calling cmake): . /opt/rh/devtoolset-2/enable As there is no magic but only environment variables involved, you can probably set them all using -DCMAKE_... options. Just look at the script and set, what you need.
🌐
CMake
cmake.org › cmake › help › latest › variable › CMAKE_GENERATOR_TOOLSET.html
CMAKE_GENERATOR_TOOLSET — CMake 4.4.0-rc2 Documentation
Native build system toolset specification provided by user · Some CMake generators support a toolset specification to tell the native build system how to choose a compiler. If the user specifies a toolset (e.g. via the cmake -T option or via the CMAKE_GENERATOR_TOOLSET environment variable) ...
🌐
Nasa
seadas.gsfc.nasa.gov › build_ocssw › rhel
NASA Ocean Color - SeaDAS
Install cmake 3.11 (the binaries from CMake work fine) Get a newer compiler. This gives us gcc-9.3.1 · yum install centos-release-scl yum install devtoolset-9 yum install bison flex zlib-devel.x86_64 libX11-devel.x86_64 patch scl enable devtoolset-9 bash yum install python3 pip3 install requests ·
🌐
GitHub
github.com › microsoft › vscode-cmake-tools › issues › 568
Is it possible to pass kit-specific environment variables to CMake? · Issue #568 · microsoft/vscode-cmake-tools
October 24, 2018 - I am able to do this on Windows in Visual Studio 2017 using the CMakeSettings.json file, and there are hints in the documentation for CMake Tools that lead me to believe it is possible. However, if it is possible I cannot figure out how to do it. I have a kit defined as so: { "name": "GCC 7.3.1", "compilers": { "CXX": "/opt/rh/devtoolset-7/root/usr/bin/g++", "C": "/opt/rh/devtoolset-7/root/usr/bin/gcc" } }, and I tried using cmakeSettings like so: { "name": "GCC 7.3.1", "compilers": { "CXX": "/opt/rh/devtoolset-7/root/usr/bin/g++", "C": "/opt/rh/devtoolset-7/root/usr/bin/gcc" }, "cmakeSettings": { "environment": { "LIB_COMPILER_PREFIX": "gcc_7" } } }, However it doesn't seem to be working.
Author   microsoft
🌐
GitHub
github.com › gliwka › centos7-devtoolset9-cmake3-python3-maven3-jdk17
GitHub - gliwka/centos7-devtoolset9-cmake3-python3-maven3-jdk17: Glibc 2.17 based toolchain allowing to build binaries that are compatible with all curently supported (not end of life) Linux distributions · GitHub
Glibc 2.17 based toolchain allowing to build binaries that are compatible with all curently supported (not end of life) Linux distributions - gliwka/centos7-devtoolset9-cmake3-python3-maven3-jdk17
Author   gliwka
🌐
Readthedocs
cath-tools.readthedocs.io › en › latest › build
Build - cath-tools - Read the Docs
yum install bzip2-devel cmake git yum install centos-release-scl-rh yum install devtoolset-3-gcc devtoolset-3-gcc-c++
🌐
GitHub
github.com › The-OpenROAD-Project › RePlAce › blob › master › Dockerfile
RePlAce/Dockerfile at master · The-OpenROAD-Project/RePlAce
LD_LIBRARY_PATH=/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib:/opt/rh/devtoolset-6/root/usr/lib64/dyninst:/opt/rh/devtoolset-6/root/usr/lib/dyninst:/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib:$LD_LIBRARY_PATH · · # install dependencies · RUN yum install -y wget libstdc++-devel libstdc++-static libX11-devel \ · boost-devel zlib-devel tcl-devel tk-devel swig flex \ · gmp-devel mpfr-devel libmpc-devel bison \ · ImageMagick ImageMagick-devel git glibc-static zlib-static libjpeg-turbo-static · · # Installing cmake for build dependency ·
Author   The-OpenROAD-Project
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Recently Active 'devtoolset' Questions - Stack Overflow
I run Centos 7, and I installed devtoolset-8 in order to get gcc 8. Here I found how to enable it for bash, which is done simply by adding source scl_source enable devtoolset-8 to .bashrc. If I ... ... I am trying to enable vtable verification in my project. When I try to use the flag (-fvtable-verify=std) I get an error g++: error: -fvtable-verify=std is not supported in this configuration. Can ... ... /usr/bin/cmake -E cmake_link_script CMakeFiles/YikeSim.dir/link.txt --verbose=1 /data/mpich/bin/mpic++ -Wl,--rpath=./shared_lib/linux -std=c++17 -g -O3 -mavx -fopenmp -Wall -D CMAKE_COMPILE -L /usr/...