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
Dynamic linking error #1247
Comments
This is a difficult issue to solve and I would like to discuss the different options we have here and start with an explanation how it worked before. This approach worked to some extend but was neither elegant nor working consistently when people didn't use hpx_add_example. Or when installing binaries, the RPATH wouldn't get adapted correctly etc. Fortunately, CMake comes with proper support to set the rpath for a compile executable (or not). You can see the documentation about it here: http://www.cmake.org/Wiki/CMake_RPATH_handling In the latest changes i switched to conform to this behavior. What I find strange though is that CMake isn't setting the HPX path when linking an executable in the build dir ... but that is probably a cmake issue. Now. In order to solve this issue you could either (every single option would require additional documentationt):
For the last option, this could be done, theoretically, by the HPXConfig.cmake script if some variable is set (for example if HPX_FULL_RPATH), or we can provide a cmake function which can be called by external projects to use this setting. What would you like to happen? |
I think requiring for the user to specify LD_LIBRARY_PATH is ok as it conforms to the use of other libraries. |
Can we all agree on requiring to set |
Yes, or use what is recommended by the cmake documentation. Closing. |
Do we have that documented? |
No. Reopening until docs are there. |
Error at start up of external projects (like HPCG in miniapp rep.) after Cmake changes ( Pull request #1204):
error while loading shared libraries: libhpx.so.0: cannot open shared object file: No such file or directory
works fine if I manually add the path ("LD_LIBRARY_PATH=/path/to/hpx/installdir/lib/")
I think this path must be set in some CMake file.
At build time I use "-DHPX_DIR=/path/to/hpx/intalldir/lib/cmake/hpx" as described in the email from Thomas after his merge.
The text was updated successfully, but these errors were encountered: