0

My program depends on libstdc++.so.6 which depends on /lib64/libstdc++.so.6.0.19

But my older CentOS has libstdc++.so.6 => libstdc++.so.6.0.13

Questions

  1. Should I check the version of the libstdc++.so.6 if less than 0.19?
  2. How do I update the libstdc++ to libstdc++.so.6.0.19?
Marco
  • 893
  • typically this involves building all the modern libraries and possibly also the entire build toolchain (compiler, etc) on the old OS, which may vary from not much work to lots of work to impossible, depending on how old the target OS is – thrig Aug 27 '18 at 14:22

1 Answers1

1

libstc++.so.6.0.13 and libstdc++.so.0.19 are compatible. See the libstdc++ manual. You should have no problem running your program on the CentOS machine.

In general, shared libraries on Linux should follow the following versioning convention: libfoo.so.X.Y.Z, where X is the major number, and Y and Z are minor numbers. When X is incremented, the new version is incompatible with the old version. Incrementing Y means a compatible change to the ABI is made. A changed Z means some bug has been fixed, but the interface is unchanged. Executable binaries contain references to the shared libraries they use, but these references only contain the major number. The actual library used is determined by the library symlink on the machine the program is run on, for example:

/usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.25
Johan Myréen
  • 13,168