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).
🌐
Centos
buildlogs.centos.org › c7-devtoolset-10.x86_64
Index of /c7-devtoolset-10.x86_64 - CentOS Buildlogs mirror
This server contains a mix of raw/unsigned packages and/or build logs It should be used mainly for testing purposes
🌐
GitLab
git.centos.org › archives › rpms › devtoolset-10-gcc
CentOS / Archives / git.centos.org / rpms / devtoolset-10-gcc · GitLab
This project is archived. Its data is read-only. This project is read-only · devtoolset-10-gcc · Archived · Project information · Created on · July 24, 2025 · Loading
Find elsewhere
🌐
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 - Red Hat Developer Toolset is distributed with GCC 10.2.1. This version is more recent than the version included in Red Hat Enterprise Linux and provides a number of bug fixes and enhancements. In Red Hat Developer Toolset, the GNU C compiler is provided by the devtoolset-10-gcc package and is automatically installed with devtoolset-10-toolchain as described in Section 1.5, “Installing Red Hat Developer Toolset”.
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
1849131 – Add new collection devtoolset-10
November 5, 2020 - Red Hat Bugzilla – 1849131 – Add new collection devtoolset-10
🌐
Vanehost
mirror.vanehost.com › centos › 7 › sclo › x86_64 › rh › Packages › d
Index of /centos/7/sclo/x86_64/rh/Packages/d/
../ devtoolset-10-10.0-0.el7.x86_64.rpm 18-May-2021 15:04 5216 devtoolset-10-10.1-0.el7.x86_64.rpm 30-Jun-2021 08:54 5308 devtoolset-10-annobin-9.23-3.el7.x86_64.rpm 18-May-2021 15:03 102620 devtoolset-10-annobin-9.23-4.el7.1.x86_64.rpm 07-Jan-2022 12:38 102888 devtoolset-10-annobin-9.23-4.el7.x86_64.rpm 30-Jun-2021 08:54 102728 devtoolset-10-annobin-annocheck-9.23-3.el7.x86_..> 18-May-2021 15:03 115692 devtoolset-10-annobin-annocheck-9.23-4.el7.1.x8..> 07-Jan-2022 12:38 116280 devtoolset-10-annobin-annocheck-9.23-4.el7.x86_..> 30-Jun-2021 08:55 115820 devtoolset-10-binutils-2.35-5.el7.2.x86_6
🌐
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
🌐
GitHub
github.com › nealef › clefos › issues › 8
yum install -y devtoolset-10-binutils ... is failing · Issue #8 · nealef/clefos
July 24, 2021 - yum install -y devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran · Here are the steps to reproduce the issue in a clean clefos:7 image: 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
🌐
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 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 ·