0

So the problem started as I lately updated my Ubuntu Vivid (15.04). Now clang-3.5 depends on libstdc++-4.9 (instead of previous version of 4.8) and my compiled programs fail to run on Trusty (14.04):

./my_app: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./my_app)

Both on the development machine and target machine g++ and gcc version 4.8.4 is installed. But the new clang version adds a version dependency required from libstdc++6 on GLIBCXX_3.4.20 which only exists on the development and not the target machine.

Any ideas how to solve this problem?

UPDATE:

There is a solution here suggesting to statically link to libstdc++ and there is good read here investigating pros and cons of such approach. But are there any other possibilities?

-1

In case your problem has not been solved yet, I can suggest two options aside from static linking:

  1. Bundle all libraries required with your apps and set up LD_LIBRARY_PATH and/or rpath for your binaries.
  2. If you're developing server-side apps, shipping those as Docker images inherited from Ubuntu Vivid may also be an option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.