Skip to content

Commit c8be4f3

Browse files
authored
Add a troubleshooting note for libraries of custom messages not being found (#180)
1 parent da6cd4f commit c8be4f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/building.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,12 @@ If you've deleted your `install` directory but not your `.cargo` directory, you'
220220
> error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
221221
222222
Delete the `.cargo` directory, and rebuild.
223+
224+
225+
### Can not find library at runtime
226+
227+
If you `cargo run` a package that depends on a custom message, or some other dynamic library outside of the ROS 2 distribution, you will see an error from the dynamic linker such as:
228+
229+
> target/debug/message_demo: error while loading shared libraries: librclrs_example_msgs__rosidl_typesupport_c.so: cannot open shared object file: No such file or directory
230+
231+
To help your executable find the library, one possibility is to source the install directory which contains the message (or other library) package. This will add the required entry to the `$LD_LIBRARY_PATH` variable.

0 commit comments

Comments
 (0)