I used following steps on CentOS-7 and they worked fine for me:

yum install centos-release-scl
yum install devtoolset-10
scl enable devtoolset-10 bash

I used same flags which you used:

g++ -std=c++2a -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/dummy2.d" -MT"src/dummy2.o" -o "src/dummy2.o" "../src/dummy2.cpp"
Answer from Ashish Shirodkar on Stack Overflow
🌐
Abysm
blog.abysm.org › 2016 › 03 › installing-developer-toolset-rhel-based-distributions
Installing Developer Toolset on RHEL-based Distributions · Kuan-Yi Li's Blog
March 25, 2016 - yum install devtoolset-10 · yum install devtoolset-9 · yum install devtoolset-8 · yum install devtoolset-7 · yum install devtoolset-6 · yum install devtoolset-4 · yum install devtoolset-3 · Say you want to use Developer Toolset 8, you can run · scl enable devtoolset-10 bash ·
Discussions

yum install -y devtoolset-10-binutils ... is failing
Hello @nealef, While investigating pypa/manylinux#1141, I found out that the following command is currently failing with missing packages in the repo: yum install -y devtoolset-10-binutils devtools... More on github.com
🌐 github.com
4
July 24, 2021
Newest 'devtoolset' Questions - Stack Overflow
I'd like to use devtoolset-11 on Centos Stream 8, but can't find any information on whether the Software Collection repositories are available for Centos Stream. The usual dnf install centos-release-... ... I am using Centos 7 with kernel 3.10.0 My current gcc version is 4.8.5 and I am trying ... More on stackoverflow.com
🌐 stackoverflow.com
g++ - How can I install devtoolset on the workstation edition of RHEL7 - Stack Overflow
I would like to know how to install devtoolset on RHEL7 workstation. I found instructions for RHEL7 server which I have failed to adjust correctly for the workstation edition. I also found instruc... More on stackoverflow.com
🌐 stackoverflow.com
Devtoolset for Rocky Linux
So we can use “Development Tools” from future e.g. Rocky 10.4 on Rocky 8.4 without upgrading the OS. – devtoolset: GNU Compiler Collection, GNU Debugger, and other development, debugging, and performance monitoring too… More on forums.rockylinux.org
🌐 forums.rockylinux.org
4
0
September 9, 2021
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 10 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 10 | Red Hat Documentation
June 21, 2022 - In Red Hat Developer Toolset, the GNU C++ compiler is provided by the devtoolset-10-gcc-c++ package and is automatically installed with the devtoolset-10-toolchain package as described in Section 1.5, “Installing Red Hat Developer Toolset”.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 10 › html › user_guide › chap-red_hat_developer_toolset
Chapter 1. Red Hat Developer Toolset | User Guide | Red Hat Developer Toolset | 10 | Red Hat Documentation
Replace package_name with a space-separated list of packages that you want to install. For example, to install the devtoolset-10-gdb-gdbserver and devtoolset-10-gdb-doc packages:
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 10 › html-single › 10.0_release_notes › index
10.0 Release Notes | Red Hat Developer Toolset | 10 | Red Hat Documentation
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: ... To use the ccache utility with GCC included in Red Hat Developer Toolset, set your environment correctly. For example: ~]$ scl enable devtoolset-10 '/usr/lib64/ccache/gcc -c foo.c'
🌐
GitHub
github.com › nealef › clefos › issues › 8
yum install -y devtoolset-10-binutils ... is failing · Issue #8 · nealef/clefos
July 24, 2021 - docker pull s390x/clefos:7 docker run -it --rm s390x/clefos:7 echo "multilib_policy=best" >> /etc/yum.conf echo "skip_missing_names_on_install=False" >> /etc/yum.conf sed -i '/^override_install_langs=/d' /etc/yum.conf yum -y update yum -y install yum-utils curl yum-config-manager --enable extras yum -y install centos-release-scl-rh yum install -y devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran
Author   nealef
🌐
GitHub
github.com › pypa › manylinux › issues › 1141
Install devtoolset-10 for manylinux2014 · Issue #1141 · pypa/manylinux
July 19, 2021 - TOOLCHAIN_DEPS="devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran" Is that so simple or maybe I have misunderstood the way which the image installs the tool chain?
Author   pypa
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Newest 'devtoolset' Questions - Stack Overflow
I have boost 1.73 static libraries (.a) and RHEL devtoolset-10 installed,I do the following steps scl enable devtoolset-10 bash Check the LD_LIBRARY_PATH points to /opt/rh/devtoolset-10/root/usr/...
🌐
Centos
cbs.centos.org › koji › buildinfo
devtoolset-10-10.0-0.el7 | Build Info | CentOS Community Build Service
January 21, 2021 - Main Site Links: · Summary · Packages · Builds · Tasks · Build Targets · Users · Hosts · Reports · Search
🌐
Posit Support
support.posit.co › hc › en-us › articles › 360006145413-Posit-Workbench-with-devtoolset-enabled
Posit Workbench with devtoolset enabled – Posit Support
January 24, 2025 - yum install devtoolset-9 · Execute: gcc --version · Enable devtoolset-10 with: source scl_source enable devtoolset-9 · Review gcc version now with: gcc --version · Once tested, you can implement this on Posit Workbench by using the ...
🌐
Readthedocs
openfhe-development.readthedocs.io › en › latest › sphinx_rsts › intro › installation › linux.html
Installing OpenFHE on Linux — OpenFHE documentation
If you need to install a specific version of gcc, do the following (this example is for g++ v10): sudo yum install devtoolset-10-gcc-c++
Top answer
1 of 1
1

This issue in this case is RedHat subscription channels. Though the subscription and software are free (provided you have an active subscription already), for some reason you have to make a 'special request' to RedHat as per:

https://access.redhat.com/solutions/472793

You can automate this by visiting:

https://www.redhat.com/wapps/try/RHSCL

(when logged into the support portal). This should automatically be approved after which you can attach a new subscription. Identify the pool id using:

subscription-manager list --available --all

To find the pool id:

 Subscription Name:   Software Collections and Developer Toolset
 Provides:            Red Hat Developer Tools (for RHEL Server)
                      Red Hat Developer Tools Beta (for RHEL Workstation)
                      Red Hat Software Collections Beta (for RHEL Server)
                      Red Hat Software Collections Beta (for RHEL Workstation)
                      Red Hat Software Collections (for RHEL Server)
                      Red Hat Developer Tools Beta (for RHEL Server)
                      Red Hat Developer Toolset (for RHEL Workstation)
                      Red Hat Software Collections Beta (for RHEL Client)
                      Red Hat Software Collections (for RHEL Workstation)
                      Red Hat Developer Toolset (for RHEL Server)
                      Red Hat Developer Tools (for RHEL Workstation)
                      Red Hat Software Collections (for RHEL Client) 
SKU:                 foobar 
Contract:            1234 Pool ID: XXXXXXXXXX

Then attach this and enable the newly available repos:

>subscription-manager attach --pool=XXXXXXXXXXXXXXXXXXXX
Successfully attached a subscription for: Software Collections and Developer Toolset
>subscription-manager repos --enable rhel-workstation-rhscl-7-rpms
Repository 'rhel-workstation-rhscl-7-rpms' is enabled for this system.
>subscription-manager repos --enable rhel-7-workstation-devtools-rpms
Repository 'rhel-7-workstation-devtools-rpms' is enabled for this system.

You can now install freely:

>yum update -y 
>yum install -y devtoolset-7-gcc-c++

Quite why they make you jump through so many hoops is explained by RedHat as follows:

-If you have a 2013 RHEL SKU with Standard or Premium service level, there should be no action on your part, and your subscription should have full access to RHSCL.

-If you have a 2010 or older RHEL SKU with Standard or Premium service level, you should contact Red Hat Customer Service to request the RHSCL SKU (and all related content) added to your account.

NOTE: Developer Toolset is now included as part of Red Hat Software Collections. This change was made on May 29, 2014.

As you had Red Hat Enterprise Linux Workstation, Standard subscription which is older RHEL SKU with Standard service level, you had to initiate a special request for it

🌐
Rocky Linux Forum
forums.rockylinux.org › rocky linux help & support
Devtoolset for Rocky Linux - Rocky Linux Help & Support - Rocky Linux Forum
September 9, 2021 - So we can use “Development Tools” from future e.g. Rocky 10.4 on Rocky 8.4 without upgrading the OS. – devtoolset: GNU Compiler Collection, GNU Debugger, and other development, debugging, and performance monitoring tools https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/
🌐
Linux @ CERN
linux.web.cern.ch › devtoolset
Developer Toolset - Linux @ CERN
wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Highest scored 'devtoolset' questions - Stack Overflow
January 12, 2022 - I have installed the devtoolset-10 package on CentOS 7 and run the /opt/rh/devtoolset-10/enable script so that now when I do this: g++ --version I get this: g++ (GCC) 10.2.1 20210130 (Red Hat 10.2.1-...