Skip to content

Fix macOS @rpath install-name id for ros_type_introspection - #564

Merged
traversaro merged 3 commits into
RoboStack:mainfrom
ovaag:osx-ros-type-introspection-rpath
Jul 21, 2026
Merged

Fix macOS @rpath install-name id for ros_type_introspection#564
traversaro merged 3 commits into
RoboStack:mainfrom
ovaag:osx-ros-type-introspection-rpath

Conversation

@ovaag

@ovaag ovaag commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for this great project!

I tested loading a ros1 .bag into plotjuggler from a ros-noetic-plotjuggler-ros mamba install and got the following on macOS:

Loading compatible plugins from directory:  "/Users/myuser/miniforge3/envs/noetic/lib/plotjuggler"
"libDataLoadCSV.dylib is a DataLoader plugin"
"libDataLoadMCAP.dylib is a DataLoader plugin"
"libDataLoadULog.dylib is a DataLoader plugin"
"libDataStreamSample.dylib is a DataStreamer plugin"  ...disabled, unless option -t is used
"libDataStreamUDP.dylib is a DataStreamer plugin"
"libDataStreamWebSocket.dylib is a DataStreamer plugin"
"libDataStreamZMQ.dylib is a DataStreamer plugin"
"libParserDataTamer.dylib is a MessageParser plugin"
"libParserROS1.dylib is a MessageParser plugin"
"libParserROS2.dylib is a MessageParser plugin"
"libProtobufParser.dylib is a MessageParser plugin"
"libPublisherCSV.dylib is a StatePublisher plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxFFT.dylib is a Toolbox plugin"
"libToolboxLuaEditor.dylib is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxQuaternion.dylib is a Toolbox plugin"
Number of plugins loaded:  14

Loading compatible plugins from directory:  "/Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros"
"libDataLoadROS.dylib" :  "Cannot load library /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataLoadROS.dylib: (dlopen(/Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataLoadROS.dylib, 0x0085): Library not loaded: libros_type_introspection.dylib\n  Referenced from: <0AE4A756-4FB6-3A89-9BE3-3FF7193A5BF6> /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataLoadROS.dylib\n  Reason: tried: 'libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibros_type_introspection.dylib' (no such file), 'libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file))"
"libDataStreamROS.dylib" :  "Cannot load library /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataStreamROS.dylib: (dlopen(/Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataStreamROS.dylib, 0x0085): Library not loaded: libros_type_introspection.dylib\n  Referenced from: <3060550A-767D-34F1-B824-21105EB5A5C1> /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libDataStreamROS.dylib\n  Reason: tried: 'libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibros_type_introspection.dylib' (no such file), 'libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file))"
"libRosoutPublisher.dylib is a StatePublisher plugin"
"libRosTopicPublisher.dylib" :  "Cannot load library /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libRosTopicPublisher.dylib: (dlopen(/Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libRosTopicPublisher.dylib, 0x0085): Library not loaded: libros_type_introspection.dylib\n  Referenced from: <046227DC-E270-3113-8A1E-24165C735005> /Users/myuser/miniforge3/envs/noetic/lib/plotjuggler_ros/libRosTopicPublisher.dylib\n  Reason: tried: 'libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibros_type_introspection.dylib' (no such file), 'libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file), '/Users/myuser/Sources/YY/XX_ros/libros_type_introspection.dylib' (no such file))"
Number of plugins loaded:  1

Loading compatible plugins from directory:  "/Users/myuser/Library/Application Support/PlotJuggler"
Number of plugins loaded:  0

Plotjuggler application opened as normal, but it did not allowing us to open a .bag

The dylib was built with a bare install-name id
('libros_type_introspection.dylib') because the old cmake_minimum_required leaves policy CMP0042 = OLD (MACOSX_RPATH off). Consumers then record the bare dependency name and dyld cannot resolve it from the environment lib dir, so all plotjuggler-ros plugins (DataLoadROS / DataStreamROS / RosTopicPublisher) fail to dlopen on osx-64 and osx-arm64 -- PlotJuggler ends up with no .bag loader.

Set CMAKE_MACOSX_RPATH ON so the library advertises an @rpath/libros_type_introspection.dylib install name. This fixes all consumers at the source. No-op on Linux/Windows.

ovaag and others added 3 commits July 20, 2026 16:01
The dylib was built with a bare install-name id
('libros_type_introspection.dylib') because the old
cmake_minimum_required leaves policy CMP0042 = OLD (MACOSX_RPATH off).
Consumers then record the bare dependency name and dyld cannot resolve
it from the environment lib dir, so all plotjuggler-ros plugins
(DataLoadROS / DataStreamROS / RosTopicPublisher) fail to dlopen on
osx-64 and osx-arm64 -- PlotJuggler ends up with no .bag loader.

Set CMAKE_MACOSX_RPATH ON so the library advertises an
@rpath/libros_type_introspection.dylib install name. This fixes all
consumers at the source. No-op on Linux/Windows.
Added ros_type_introspection with build number.
@Tobias-Fischer

Copy link
Copy Markdown
Collaborator

LGTM, thanks. What do you think @traversaro?

@traversaro traversaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@traversaro
traversaro merged commit c5d54fe into RoboStack:main Jul 21, 2026
5 checks passed
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.

3 participants