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
🌐
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
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Newest 'devtoolset' Questions - Stack Overflow
I was trying to install devtoolset-8 in my slave node with no active internet connection running centos7. I am using all .rpm packages required as dependencies. During installation through rpm -ivh * ... ... 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
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 - This means that some new C++17 features, such as std::pmr::string, are not available on Red Hat Enterprise Linux 7, even when using the Red Hat Developer Toolset compiler. In Red Hat Developer Toolset, the GNU Fortran compiler is provided by the devtoolset-10-gcc-gfortran package and is ...
🌐
GitHub
github.com › llvm › llvm-project › issues › 54756
LLVM 14 breaks using lld with devtoolset-10 gcc on CentOS 7 · Issue #54756 · llvm/llvm-project
April 5, 2022 - Commit 815a120 removed support for --no-add-needed. However, this option is added by devtoolset-10 gcc on CentOS7: [sgiesecke@SDP_DevVM-sgiesecke gcc]$ scl enable devtoolset-10 -- gcc test.cc -fuse-ld=lld -B /bin -v Using ...
Author   llvm
🌐
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-config-manager --enable rhel-server-rhscl-7-rpms · yum-config-manager --enable rhel-server-rhscl-6-rpms · yum install centos-release-scl · yum install yum-conf-repos yum install yum-conf-softwarecollections · yum install "http://ftp.scientificlinux.org/linux/scientific/6/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm" Install the version(s) of your choice. Yes, they can co-exist. yum install devtoolset-10 ·
🌐
Vanehost
mirror.vanehost.com › centos › 7 › sclo › x86_64 › rh › Packages › d
Index of /centos/7/sclo/x86_64/rh/Packages/d/
84 devtoolset-10-libquadmath-d... 07-Jan-2022 12:39 211908 devtoolset-10-libubsan-devel-10.2.1-2.1.el7.x86..> 18-May-2021 15:01 211364 devtoolset-10-ltrace-0.7.91-1.el7.x86_64.rpm 18-May-2021 15:00 137156 devtoolset-10-make-4.2.1-1.el7.x86_64.rpm 18-May-2021 15:03 473608 ...
Find elsewhere
🌐
GitHub
github.com › nealef › clefos › issues › 8
yum install -y devtoolset-10-binutils ... is failing · Issue #8 · nealef/clefos
July 24, 2021 - It thus seems that devtoolset-10-runtime is missing from the repo. Furthermore, looking at the current version in CentOS 7, those are not the same (I understand there can be some delay between availability in CentOS and rebuild by ClefOS but just wanted to add that in case it's not expected on your end):
Author   nealef
🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Highest scored 'devtoolset' questions - Stack Overflow
July 6, 2023 - 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).
🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-8
Developer Toolset 8 — Software Collections
# 1. Install a package with repository for your system: # On CentOS, install package centos-release-scl available in CentOS repository: $ sudo yum install centos-release-scl # On RHEL, enable RHSCL repository for you system: $ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms # 2. Install the collection: $ sudo yum install devtoolset-8 # 3.
🌐
Docker Hub
hub.docker.com › r › centos › devtoolset-7-toolchain-centos7
centos/devtoolset-7-toolchain-centos7 - Docker Image
FROM rhscl/devtoolset-7-toolchain-rhel7 USER 0 RUN yum install -y --setopt=tsflags=nodocs boost-devel && yum clean all -y USER 1001 Copy
🌐
Oracle Linux
yum.oracle.com › repo › OracleLinux › OL7 › SoftwareCollections › x86_64
Oracle Linux 7 (x86_64) Software Collection 3.0 | Oracle, Software. Hardware. Complete.
Oracle Linux with Oracle enterprise-class support is the best Linux operating system (OS) for your enterprise computing needs.