Skip to content

rviz_ogre_vendor: use absolute install names on macOS (jazzy, lyrical, rolling) - #185

Draft
mini-1235 wants to merge 1 commit into
RoboStack:mainfrom
mini-1235:fix/rviz-ogre-rpath-osx
Draft

mini-1235 wants to merge 1 commit into
RoboStack:mainfrom
mini-1235:fix/rviz-ogre-rpath-osx

Conversation

@mini-1235

@mini-1235 mini-1235 commented Nov 2, 2026 •

Copy link
Copy Markdown

Problem

On macOS, vendored Ogre is installed in opt/rviz_ogre_vendor/lib but identifies itself as @rpath/libOgreMain_rviz.1.12.10.dylib. Any binary without an RPATH to that private directory fails to load. rviz2 has one, which hides the issue. moveit_setup_assistant does not:

dyld: Library not loaded: @rpath/libOgreMain_rviz.1.12.10.dylib

rviz_ogre_vendor is the only vendor package here with libraries in opt/; the gz_* vendors use conda-forge packages in lib/.

Change

  • Add ros2-rviz-ogre-vendor.osx.patch to Jazzy, Lyrical and Rolling. It sets CMAKE_INSTALL_NAME_DIR and CMAKE_MACOSX_RPATH=OFF for Ogre, so consumers record the absolute path. Packaging rewrites it to the install prefix.
  • Bump rviz_ogre_vendor and the packages that link it. The list comes from scanning the otool -L output of released osx-arm64 packages, because metadata is not reliable here: moveit_ros_visualization only declares rviz2. The bumps rebuild these packages on every platform, though the patch only applies on macOS.

Consumers not rebuilt keep the old @rpath reference, so they behave as they do today.

Validation

  • check-patches for ros2-rviz-ogre-vendor and pixi run rs check pass.
  • Local osx-arm64 builds of rviz-ogre-vendor, rviz-rendering, rviz-common, rviz-default-plugins and moveit-ros-visualization, on all three distros.
  • Installed at a new prefix: Ogre references point to that prefix.
  • ros2 launch moveit_setup_assistant setup_assistant.launch.py crashes with released Jazzy packages. With this change it opens on Jazzy, Lyrical and Rolling, confirmed by capturing the app window. A Lyrical/Rolling run without this change was not repeated.
  • rviz2 stays running on Lyrical and Rolling.

Not tested: osx-64, the other bumped packages, loading a robot in Setup Assistant, the 3D view, or rviz2 on Jazzy with this change.

Screenshots

moveit_setup_assistant with this change:

Jazzy

Setup Assistant on jazzy

Lyrical

Setup Assistant on lyrical

Rolling

Setup Assistant on rolling

An upstream ros2/rviz PR is still to come; this patch can be dropped once that is released.

This description was AI-generated by Claude Opus 5.5.

🤖 Generated with Claude Code

@mini-1235
mini-1235 marked this pull request as draft November 2, 2026 08:20
@mini-1235

mini-1235 commented Nov 2, 2026 •

Copy link
Copy Markdown
Author

Ah sorry I think this only partially fixes the issue, let me dig into it

xref: https://discord.com/channels/1082332781146800168/1566567033590775949/1566567033590775949

Vendored Ogre lives in opt/rviz_ogre_vendor/lib but identifies itself as
@rpath/..., so any library or executable without an RPATH to that private
directory fails to load, such as moveit_setup_assistant. Give Ogre absolute
install names, which packaging rewrites to the install prefix, and rebuild
every package whose released macOS binaries reference it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Maurice <[email protected]>
@mini-1235 mini-1235 changed the title rviz: add Ogre vendor rpath on macOS (jazzy, lyrical, rolling) rviz_ogre_vendor: use absolute install names on macOS (jazzy, lyrical, rolling) Nov 2, 2026
@mini-1235
mini-1235 force-pushed the fix/rviz-ogre-rpath-osx branch from bffb1b1 to c72003e Compare November 2, 2026 09:48
@mini-1235

Copy link
Copy Markdown
Author

@traversaro @Tobias-Fischer I believe this fixes the issue reported in discord, but I am not sure if this is the cleanest solution. Could you please take a look?

@Tobias-Fischer

Copy link
Copy Markdown
Collaborator

That's one for our cmake guru @traversaro ..

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.

2 participants