1

I'm getting the following when running my closed-source app on target machine which uses older OS than mine:

./myapp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./myapp)
./myapp: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./myapp)
./myapp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./myapp)

Is there any way to lower required libstdc and libstdc++ versions or bypass this check at all without moving my build server to older OS (which I find very frustrating), as well as without statical linking against libstdc (which seems to be prohibited by license)?

I have already checked Linking against an old version of libc to provide greater application coverage, but this only explains how to do that for some specifical symbol, while I need to do that for every symbol imported by my app from glibc.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
vdudouyt
  • 843
  • 7
  • 14
  • Sure, my question is about GCC. I added it to tags now. – vdudouyt Nov 23 '17 at 06:40
  • You can link to libstdc++ statically or ship the .so together with your app (there's an exemption, read the license carefully or better have your legal dept read it). You haven't posted any error messages related to glibc or libstdc (I have no idea what libstdc is, there doesn't seem to be GNU software with this name). – n. m. could be an AI Nov 23 '17 at 07:21
  • By the way, without the aforementioned exemption you would not be able to ship your closed source app at all. Most C++ apps physically incorporate significant portions of libstdc++ thanks to templates and inline functions. Lots of libstdc++ code is in the headers. – n. m. could be an AI Nov 23 '17 at 07:30

1 Answers1

0

To avoid these undefined symbols, you really have to compile with a different GCC version.

If you do not want to downgrade to a historic GCC version, several distributions now offer newer GCC versions for older distributions, such as SUSE with the Toolchain Module and Red Hat with Developer Toolset. These compilers provider a compatible ABI, so integration with the operating system is relatively painless.

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