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 ·
🌐
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 - 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: # yum install devtoolset-10-gdb-gdbserver devtoolset-10-gdb-doc
Discussions

c++ - How to enable later versions of GCC in eclipse CDT in CentOS 7 - Stack Overflow
sudo yum install centos-release-scl sudo yum install devtoolset-10-gcc* scl enable devtoolset-10 bash More on stackoverflow.com
🌐 stackoverflow.com
Installing devtoolset-X
$ sudo dnf search toolset Last metadata expiration check: 2:26:13 ago on Mon 15 Nov 2021 05:10:30 AM EST. ============================================= Name & Summary Matched: toolset ==== gcc-toolset-10.x86_64 : Package that installs gcc-toolset-10 gcc-toolset-10-runtime.x86_64 : Package that handles gcc-toolset-10 Software Collection. gcc-toolset-11.x86_64 : Package that installs gcc-toolset-11 gcc-toolset-11-runtime.x86_64 : Package that handles gcc-toolset-11 Software Collection. gcc-toolset-9.x86_64 : Package that installs gcc-toolset-9 gcc-toolset-9-runtime.x86_64 : Package that handles gcc-toolset-9 Software Collection. So do dnf-install gcc-toolset-X, then scl enable devtoolset-X bash More on reddit.com
🌐 r/AlmaLinux
1
7
November 14, 2021
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 instructions for CentOS7 which work for CentOS7: sudo yum install centos-release-scl sudo yum install ... More on stackoverflow.com
🌐 stackoverflow.com
Where do I get "Development Tools" for CentOS 7 when trying to install via yum? - Unix & Linux Stack Exchange
I'm running CentOS 7. I want to install gcc (for the purposes of building Python 3 with the new openssl package I installed). I was reading here -- https://stackoverflow.com/questions/19816275/no- More on unix.stackexchange.com
🌐 unix.stackexchange.com
May 8, 2020
🌐
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
🌐
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: # yum install devtoolset-10-gdb-gdbserver devtoolset-10-gdb-doc
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

🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-8
Developer Toolset 8 — Software Collections
Start using software collections: $ scl enable devtoolset-8 bash · At this point you should be able to use gcc and other tools just as a normal application. See examples bellow: $ gcc hello.c $ sudo yum install devtoolset-8-valgrind $ valgrind ./a.out $ gdb ./a.out
Find elsewhere
🌐
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 ...
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Newest 'devtoolset' Questions - Stack Overflow
I am trying to install graph-tool on a RHEL7 within a virtual environment; it uses both, Python 3 and gcc 7 or above. I am unable to use both of them within the same scl bash shell. [root@ ~]# scl ... ... We use devtoolset-10 in CentOS 7 ("Actual" default version of gcc in OS is 4.8.5, but in devtoolset we use 10.2.1 version, which is real actual version for project).
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 12 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 12 | Red Hat Documentation
Replace package_name with a space-separated list of packages that you want to install. For example, to install the devtoolset-12-gdb-gdbserver and devtoolset-12-gdb-doc packages: # yum install devtoolset-12-gdb-gdbserver devtoolset-12-gdb-doc
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 9 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 9 | Red Hat Documentation
August 7, 2020 - $ scl enable devtoolset-9 'gcc -g -o fibonacci fibonacci.c' This creates a new binary file called fibonacci in the current working directory. To install debugging information for a package that is already installed on the system: ... Note that the yum-utils package must be installed for the debuginfo-install utility to be available on your system.
🌐
Ahelpme
ahelpme.com › home › linux › centos 7 › how to install new gcc and development tools under centos 7
How to install new gcc and development tools under CentOS 7 | Any IT here? Help Me!
September 5, 2019 - [srv@local ~]# yum install devtoolset-7-gcc* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.crazyfrogs.org * extras: centos.quelquesmots.fr * updates: centos.mirror.fr.planethoster.net centos-sclo-rh | 3.0 kB 00:00:00 centos-sclo-sclo | 2.9 kB 00:00:00 ...
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Recently Active 'devtoolset' Questions - Stack Overflow
To install devtoolset-7.x86_64 on CentOS6 is pretty easy: yum install -y centos-release-scl yum install -y devtoolset-7-toolchain However, i686 is not available for download: http://mirror.centos.org/...
🌐
Linux @ CERN
linux.web.cern.ch › devtoolset
Developer Toolset - Linux @ CERN
Note: Please note 2.1 is an upgrade of 2.0 and can't be installed in parallel. ... Full Developer Toolset documentation can be found on RedHat site. ... Note: Eclipse IDE is available ONLY on SLC6. ... Full Developer Toolset documentation can be found on RedHat site. ... Full Developer Toolset documentation can be found on RedHat site. ... wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo