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

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

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Dec 11, 2020

Connected to ros2/rcutils#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:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status (known test failure)
  • Windows Build Status

@hidmic
Copy link
Contributor Author

hidmic commented Dec 14, 2020

Rebased on top of #99.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic hidmic force-pushed the hidmic/shared-library-relpaths branch from 89fa50e to 834c610 Compare December 14, 2020 21:19
@hidmic hidmic requested review from azeey and removed request for clalancette December 15, 2020 20:09
Copy link

@azeey azeey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hidmic
Copy link
Contributor Author

hidmic commented Dec 22, 2020

Re-running CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@hidmic
Copy link
Contributor Author

hidmic commented Dec 22, 2020

Merging!

@hidmic hidmic merged commit 64dd1be into master Dec 22, 2020
@delete-merged-branch delete-merged-branch bot deleted the hidmic/shared-library-relpaths branch December 22, 2020 20:59
@karthiknit
Copy link

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_msgs__rosidl_typesupport_fastrtps_cpp.so: 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, 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

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

Successfully merging this pull request may close these issues.

None yet

3 participants