Skip to content

Fix --package runtime dependency resolution for user-prefix Chrono and ROS-provided urdfdom - #20

Draft
salhus with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-cmake-install-runtime-dependencies
Draft

salhus with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-cmake-install-runtime-dependencies

Conversation

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown

install(TARGETS ... RUNTIME_DEPENDENCIES) uses file(GET_RUNTIME_DEPENDENCIES), which ignores LD_LIBRARY_PATH by design and only searches the binary's INSTALL_RPATH ($ORIGIN/../lib, empty at install time) plus system paths. Packaging therefore fails to resolve libChrono_core.so (user prefix) and liburdfdom_model.so.4.0 (ROS, in lib/x86_64-linux-gnu/), even though the build and link succeed.

Changes (top-level CMakeLists.txt)

  • Search the Chrono library directory explicitly — new SEASTACK_RUNTIME_DEP_DIRS cache variable for user-supplied paths, augmented with the directory derived from Chrono::Chrono_core's IMPORTED_LOCATION_RELEASE/IMPORTED_LOCATION, passed as DIRECTORIES to both the APPLE and non-APPLE install calls. Chrono is SEA-Stack's own dependency and stays in the bundle.
  • Exclude ROS from the bundle^/opt/ros/ added to POST_EXCLUDE_REGEXES. urdfdom arrives transitively through Chrono::Chrono_parsers; ROS is an external runtime requirement, and vendoring it would make the archive distro-specific.
  • _seastack_dep_dirs is unset alongside _seastack_dep_exclude.
install(TARGETS run_seastack
    RUNTIME_DEPENDENCIES
        DIRECTORIES ${_seastack_dep_dirs}
        POST_EXCLUDE_REGEXES ${_seastack_dep_exclude}
    CONFIGURATIONS Release
    RUNTIME DESTINATION bin COMPONENT runtime
    LIBRARY DESTINATION lib COMPONENT runtime)

With no Chrono target and an empty cache variable, DIRECTORIES expands to nothing, leaving the default system-Chrono path behaviour unchanged.

Note: a full --package run could not be exercised here (no Eigen3/Chrono in the environment); the install block was validated standalone, including the empty-DIRECTORIES case.

…kaging

Co-authored-by: salhus <84348506+salhus@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix runtime dependencies resolution in package step for SEA-Stack Fix --package runtime dependency resolution for user-prefix Chrono and ROS-provided urdfdom Sep 17, 2026
Copilot AI requested a review from salhus September 17, 2026 14:33
@salhus
salhus requested a review from dav-og September 17, 2026 16:59
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.

--package fails to resolve runtime dependencies when Chrono is in a user prefix and urdfdom comes from ROS

2 participants