-
Notifications
You must be signed in to change notification settings - Fork 46
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
Colcon extends LD_LIBARAY_PATH with cross compiled libraries #625
Comments
These hooks certainly aren't designed for cross-compiled builds like this, so I'm not surprised that strange behaviors like this manifest. The easiest and most supported way to block the Docs for that variable are here: https://colcon.readthedocs.io/en/released/reference/global-arguments.html?highlight=COLCON_EXTENSION_BLOCKLIST#environment-variables |
Thank you for your anwser! Using I suppose we would need something like that but which only blocks the usage of the hooks of a certain extensions during build time. The hooks itself are still valuable and required on the target machine but can cause harm during build. |
We were now able to circumvent this issue
With this workaround it is possible to protect cmake from the modified LD_LIBRARY_PATH. But this feels like a workaround to me. At this point I wonder whether it is possible with reasonable effort to protect parts of the toolchain (cmake, ctest, etc) from the modified LD_LIBRARY_PATH? |
Just ran into this as well. Thank you for the insight. |
I am trying to cross compile rosbag2 for QNX 7.2 on Ubuntu Jammy. If I do so, cmake crashes for packages which depend on zstd_vendor with this error
/usr/bin/cmake: error while loading shared libraries: libc.so.5: cannot open shared object file: No such file or directory
The reason for that is that:
I was able to circumvent this issue by reconfiguring zstd_vendor so that is creates static libraries in stead of shared libraries. However, this issue concernes me a bit. It should be possible to cross compile projects using Colcon without the potential risk of injecting newly build libraries into the build system.
At this point I'm not entirely sure how to fix this issue. My first idea was to have some kind of "cross compilation flag" which turns this "LD_LIBRARY_PATH" behavior off entirely during build time. However, as think more about it: in general it should not be possible that parts of the build system end up using just build libraries by accident - this seems just wrong to me.
The text was updated successfully, but these errors were encountered: