1

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).

Command gcc --version returns 10.2.1, but after unsuccessful compilation of target files we run ldd target_file, which says that target_file was linked with /lib64/libstdc++.so.6 file, which supports older version of gcc (strings -a /lib64/libstdc++.so.6 | grep GCC returns 4.8 version of gcc)

TL;DR

Problem: unlinked gcc-related shared objects and libs after source <...>/devtoolset-10/enablecommand

Double_Mind
  • 59
  • 1
  • 9
  • No `libstdc++.so.6.28` in devtools-10 https://stackoverflow.com/questions/69095294/updating-usr-include-c-in-centos-7/69100907#69100907 – Knud Larsen Sep 11 '21 at 15:52

1 Answers1

1

Developer Toolset uses a hybrid linkage model. Programs built using it use the system libstdc++ library as far as possible. Missing bits (those that were added in later C++ versions) are automatically supplied via static linking.

As a result, Developer Toolset can be used to build applications using newer GCC versions. But it cannot be used to run applications which have been built on other distributions, with newer GCC versions (assuming that is what you are trying to do).

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92