-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird linker error (with conda feedstock) #124
Comments
@jaredgrubb @Kerndog73 does any of you have time to help debug this? |
I had some issues like this, IIRC it was a matter of using libstdc++11, i.e. add the define There are |
@theodelrieu Thanks for the suggestions. However,
Note that no matter if |
@tdegeus No I meant to pass |
@theodelrieu I tried also this by adding this to my target_compile_definitions(${PROJECT_NAME} PUBLIC "_GLIBCXX_USE_CXX11_ABI=1") However...
|
Hmm, is it a visibility problem? What is the value of |
First of all, does it work with static linking? And header only? |
This problem occurs with dynamic linking. More specifically I'm trying dynamic linking of the conda-forge package, build with this script: https://github.com/conda-forge/docopt.cpp-feedstock/blob/master/recipe/build.sh The failing example is here: https://github.com/tdegeus/test_docopt.cpp/blob/master/example/main.cpp Note that the example is failing on travis, but not on my own Linux machine. |
Running
Could you try to do the same with your local copy of |
Same
|
Well, I have no idea :D |
Do I need to enforce |
No it's only at compile-time IIRC |
@chrisdembia Do you have the same experience with the conda-forge package? I should state that it works fine on any of my macOS and Linux machine, just not in the CI. Could you comment? |
I think I've seen this issue in the past, but I do not remember how I avoided it. I do not see this linker issue with conda-forge: conda-forge/staged-recipes#11894 ...or with Travis CI: https://github.com/opensim-org/opensim-core/blob/master/.travis.yml |
On the CI of my code I'm getting (on Linux only) the following linker error with the docopt.cpp feedstock:
To debug I created an isolated test repository with corresponding CI. As observed, the code compiles fine on macOS and Windows, but fails to compile on Linux. Interestingly, on my own Linux machine the code compiles without errors. Also, note that the file
/home/travis/miniconda/lib/libdocopt.so
is in fact linked.Output of
nm /home/travis/miniconda/lib/libdocopt.so
:The text was updated successfully, but these errors were encountered: