ros2 / rosidl_typesupport

Packages which provide the typesupport for ROS messages and services
Apache License 2.0
13 stars 34 forks source link

Defer path resolution of rosidl typesupport libraries to dynamic linker. #98

Closed hidmic closed 3 years ago

hidmic commented 3 years ago

Connected to https://github.com/ros2/rcutils/pull/320. By deferring path resolution to the dynamic linker, RPATHs and RUNPATHs entries as well as LD_LIBRARY_PATH and PATH envvars are dealt with the standard way. Pre-linked and pre-loaded libraries are also honored.

CI up to test_communication:

hidmic commented 3 years ago

Rebased on top of #99.

hidmic commented 3 years ago

Re-running CI:

hidmic commented 3 years ago

Merging!

karthiknit commented 1 year ago

This change is causing the following error when writing a custom message to a rosbag2 file on UNIX platforms:

[rcutils|error_handling.c:108] rcutils_set_error_state() This error state is being overwritten:

'Handle's typesupport identifier (rosidl_typesupport_cpp) is not supported by this library, at /home/user/build/glnxa64/ros2/src/ros2/rosidl_typesupport/rosidl_typesupport_cpp/src/type_support_dispatch.hpp:111'

with this new error message:

'dlopen error: libdepend_msgs__rosidl_typesupport_fastrtps_cpp.so: shared object file cannot be opened: The file or directory does not exist, at /home/user/build/glnxa64/ros2/src/ros2/rcutils/src/shared_library.c:99'

rcutils_reset_error() should be called after error handling to avoid this. <<<

[rcutils|error_handling.c:108] rcutils_set_error_state() This error state is being overwritten:

'Could not load library libdepend_msgsrosidl_typesupport_fastrtps_cpp.so: dlopen error: libdepend_msgsrosidl_typesupport_fastrtps_cpp.so: shared object file cannot be opened: The file or directory does not exist, at /home/user/build/glnxa64/ros2/src/ros2/rcutils/src/shared_library.c:99, at /home/user/build/glnxa64/ros2/src/ros2/rosidl_typesupport/rosidl_typesupport_cpp/src/type_support_dispatch.hpp:76'

with this new error message:

'type support not from this implementation, at /home/user/build/glnxa64/ros2/src/ros2/rmw_fastrtps/rmw_fastrtps_cpp/src/rmw_serialize.cpp:37'

rcutils_reset_error() should be called after error handling to avoid this. <<< [ERROR] [1677147144.980970111] [rosbag2_cpp]: Failed to re-serialize message for conversion.

Note that, RPATH and LD_LIBRARY_PATH are set correctly. If I revert this change, I am able to successfully write the message to the bag file. Could someone help on this issue?

Thanks, Karthik Reddy