Skip to content
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

Script not generated for libraries in subfolders #22

Open
hplatou opened this issue Mar 5, 2024 · 1 comment
Open

Script not generated for libraries in subfolders #22

hplatou opened this issue Mar 5, 2024 · 1 comment

Comments

@hplatou
Copy link

hplatou commented Mar 5, 2024

When building a colcon cmake package which installs libraries in a subfolder of lib no ld_library_path_lib.xx files are generated.
Would it be possible to extend the search for .so/.dylib/.dll files to all subfolders under lib?

@cottsay
Copy link
Member

cottsay commented Mar 5, 2024

I don't think that it's standard behavior for libraries in subdirectories of lib to be part of the library search path implicitly. On RedHat systems, for example, you would need to add a file to /etc/ld.so.conf.d/ to instruct the ld.so search to include that directory.

Similarly to how ld.so.conf can be used to extend the ld.so search, you should be able to create a custom hook for your package to specifically extend LD_LIBRARY_PATH to include your custom library directory, and let colcon know about it using a colcon.pkg file in your package.

https://colcon.readthedocs.io/en/released/user/configuration.html?highlight=hook#colcon-pkg-files

Example implementation of a custom environment hook: https://github.com/ros2/ros2cli/blob/rolling/ros2cli/colcon.pkg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants