Wrong GLIBCXX version when running a program that was compiled on the same machine

旧街凉风 提交于 2019-12-20 06:27:12

问题


How is it possible that a program that I compile, link and run on the same machine to have GLIBCXX version errors when I try to run it? Does anyone know?

Here is the error I am getting:

0.01s$ build/test/gamgee_test
build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by build/test/gamgee_test)
build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by build/test/gamgee_test)

full output (with VERBOSE=1) including building and running is here: https://travis-ci.org/broadinstitute/gamgee/jobs/39751787

This wasn't happening before, only after I switched to cmake. Also the same code runs fine with Clang (using a bundled version of libstdc++ since I haven't installed libc++ on the VM). That log is here: https://travis-ci.org/broadinstitute/gamgee/jobs/39751786

very puzzled.


回答1:


Runtime paths are different to compile paths. Sounds like you have more than one version of your libraries on your system. check your LD_LIBRARY_PATH env variable and call your executable with ldd to see what libraries it is using/trying to use.



来源:https://stackoverflow.com/questions/26700751/wrong-glibcxx-version-when-running-a-program-that-was-compiled-on-the-same-machi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!