From c72003e4cf4fac511c6c684be0cf0c93dc739819 Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 2 Nov 2026 17:48:02 +0800 Subject: [PATCH] rviz_ogre_vendor: use absolute install names on macOS 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 Signed-off-by: Maurice --- .../patch/ros2-rviz-ogre-vendor.osx.patch | 14 ++++++++++ distros/jazzy/pkg_additional_info.yaml | 26 ++++++++++++++++++- .../patch/ros2-rviz-ogre-vendor.osx.patch | 14 ++++++++++ distros/lyrical/pkg_additional_info.yaml | 26 ++++++++++++++++++- .../patch/ros2-rviz-ogre-vendor.osx.patch | 14 ++++++++++ distros/rolling/pkg_additional_info.yaml | 20 +++++++++++++- 6 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 distros/jazzy/patch/ros2-rviz-ogre-vendor.osx.patch create mode 100644 distros/lyrical/patch/ros2-rviz-ogre-vendor.osx.patch create mode 100644 distros/rolling/patch/ros2-rviz-ogre-vendor.osx.patch diff --git a/distros/jazzy/patch/ros2-rviz-ogre-vendor.osx.patch b/distros/jazzy/patch/ros2-rviz-ogre-vendor.osx.patch new file mode 100644 index 000000000..e98c25502 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-ogre-vendor.osx.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -83,3 +83,10 @@ + ++if(APPLE) ++ # Consumers record this path, so they find Ogre without an RPATH to opt/. ++ list(APPEND OGRE_CMAKE_ARGS ++ "-DCMAKE_INSTALL_NAME_DIR=${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor/lib" ++ -DCMAKE_MACOSX_RPATH:BOOL=OFF) ++endif() ++ + ament_vendor(ogre_vendor + VCS_URL https://github.com/OGRECave/ogre.git diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index 178a5e27e..0d1197db4 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -133,11 +133,35 @@ ament_cmake_gmock: # as ament_cmake_gtest build_number: 28 ament_cmake_gtest: # uses conda-forge's gtest instead of gtest_vendor's sources build_number: 28 +fuse_viz: + build_number: 28 +grid_map_rviz_plugin: + build_number: 28 gz_ogre_next_vendor: build_number: 28 +moveit_ros_visualization: + build_number: 28 +moveit_task_constructor_visualization: + build_number: 28 +nav2_rviz_plugins: + build_number: 28 +octomap_rviz_plugins: + build_number: 28 +rviz_2d_overlay_plugins: + build_number: 28 +rviz_common: + build_number: 28 +rviz_default_plugins: + build_number: 28 +rviz_imu_plugin: + build_number: 28 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" - build_number: 28 # built without the EXR codec (ros2-rviz-ogre-vendor.patch) + build_number: 29 # built without the EXR codec (ros2-rviz-ogre-vendor.patch), absolute install names on macOS (.osx.patch) +rviz_rendering: + build_number: 28 +rviz_satellite: + build_number: 28 urdf: # drop deprecated urdf_world/types.h include (ros2/urdf#54) for headers 3.x build_number: 28 urdf_parser_plugin: # use urdf_model/types.h (ros2/urdf#54) for headers 3.x diff --git a/distros/lyrical/patch/ros2-rviz-ogre-vendor.osx.patch b/distros/lyrical/patch/ros2-rviz-ogre-vendor.osx.patch new file mode 100644 index 000000000..f522f2b07 --- /dev/null +++ b/distros/lyrical/patch/ros2-rviz-ogre-vendor.osx.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,3 +45,10 @@ + ++if(APPLE) ++ # Consumers record this path, so they find Ogre without an RPATH to opt/. ++ list(APPEND OGRE_CMAKE_ARGS ++ "-DCMAKE_INSTALL_NAME_DIR=${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor/lib" ++ -DCMAKE_MACOSX_RPATH:BOOL=OFF) ++endif() ++ + ament_vendor(ogre_vendor + VCS_URL https://github.com/OGRECave/ogre.git diff --git a/distros/lyrical/pkg_additional_info.yaml b/distros/lyrical/pkg_additional_info.yaml index 4b86a8936..5aca11eec 100644 --- a/distros/lyrical/pkg_additional_info.yaml +++ b/distros/lyrical/pkg_additional_info.yaml @@ -113,6 +113,30 @@ urdfdom_headers: zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" # Remove build_number fields below on new full rebuild +fuse_viz: + build_number: 31 +grid_map_rviz_plugin: + build_number: 31 +moveit_ros_visualization: + build_number: 31 +moveit_task_constructor_visualization: + build_number: 31 +nav2_rviz_plugins: + build_number: 31 +rtabmap_rviz_plugins: + build_number: 31 +rviz_2d_overlay_plugins: + build_number: 31 +rviz_common: + build_number: 31 +rviz_default_plugins: + build_number: 31 +rviz_imu_plugin: + build_number: 31 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" - build_number: 31 # built without the EXR codec (ros2-rviz-ogre-vendor.patch) + build_number: 32 # built without the EXR codec (ros2-rviz-ogre-vendor.patch), absolute install names on macOS (.osx.patch) +rviz_rendering: + build_number: 31 +rviz_satellite: + build_number: 31 diff --git a/distros/rolling/patch/ros2-rviz-ogre-vendor.osx.patch b/distros/rolling/patch/ros2-rviz-ogre-vendor.osx.patch new file mode 100644 index 000000000..f522f2b07 --- /dev/null +++ b/distros/rolling/patch/ros2-rviz-ogre-vendor.osx.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,3 +45,10 @@ + ++if(APPLE) ++ # Consumers record this path, so they find Ogre without an RPATH to opt/. ++ list(APPEND OGRE_CMAKE_ARGS ++ "-DCMAKE_INSTALL_NAME_DIR=${CMAKE_INSTALL_PREFIX}/opt/rviz_ogre_vendor/lib" ++ -DCMAKE_MACOSX_RPATH:BOOL=OFF) ++endif() ++ + ament_vendor(ogre_vendor + VCS_URL https://github.com/OGRECave/ogre.git diff --git a/distros/rolling/pkg_additional_info.yaml b/distros/rolling/pkg_additional_info.yaml index 9f59fbccc..d2fce0bbb 100644 --- a/distros/rolling/pkg_additional_info.yaml +++ b/distros/rolling/pkg_additional_info.yaml @@ -71,6 +71,24 @@ urdfdom_headers: override_version: '3.0.0' zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" +fuse_viz: + build_number: 33 +moveit_ros_visualization: + build_number: 33 +moveit_task_constructor_visualization: + build_number: 33 +rviz_2d_overlay_plugins: + build_number: 33 +rviz_common: + build_number: 33 +rviz_default_plugins: + build_number: 33 +rviz_imu_plugin: + build_number: 33 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" - build_number: 33 # built without the EXR codec (ros2-rviz-ogre-vendor.patch) + build_number: 34 # built without the EXR codec (ros2-rviz-ogre-vendor.patch), absolute install names on macOS (.osx.patch) +rviz_rendering: + build_number: 33 +rviz_satellite: + build_number: 33