Skip to content

AppImage (all distros) missing RMW provider .so — dlopen'd libs not captured by ldd bundling #10

Description

@kyrie2to11

Summary

All three prebuilt AppImages from release 0.9.0 fail to start on a clean machine (no system ROS):

terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  failed to initialize rcl init options: failed to load any RMW implementations

Tested with both pj_bridge_ros2-humble-x86_64.AppImage and pj_bridge_ros2-jazzy-x86_64.AppImage (kilted uses the same workflow). Ubuntu 24.04.

Reproduce

chmod +x pj_bridge_ros2-jazzy-x86_64.AppImage
env -i HOME=$HOME PATH=/usr/bin:/bin ./pj_bridge_ros2-jazzy-x86_64.AppImage --ros-args -p port:=9090

Root cause

In .github/workflows/appimage.yaml, conda deps are bundled via ldd:

ldd AppDir/usr/bin/pj_bridge_ros2 | grep "$CONDA_PREFIX" | awk '{print $3}' | xargs -I{} cp ... AppDir/usr/lib/
# then a second pass over AppDir/usr/lib/*.so*

The RMW provider libraries (librmw_fastrtps_cpp.so, librmw_cyclonedds_cpp.so, …) are loaded by dlopen at runtime, so they don't appear in ldd output and are never copied. The image ends up with librmw_implementation.so (linked) and the ament_index markers (copied via share/ament_index), but no provider .so — so rmw_implementation finds the index entry, fails to dlopen the provider, and aborts.

Confirming on the extracted image:

$ find squashfs-root -name 'librmw_*.so'
squashfs-root/usr/lib/librmw_implementation.so        # loader only, no provider
$ find squashfs-root -iname '*fastrtps*.so' -o -iname '*cyclonedds*.so'
(empty)
$ find squashfs-root -path '*rmw_typesupport_cpp*'
squashfs-root/usr/share/ament_index/resource_index/rmw_typesupport_cpp/rmw_fastrtps_cpp
...                                                                 # index markers present, libs absent

Suggested fix

Explicitly copy the RMW provider .so(s) into AppDir/usr/lib/ and pin one in AppRun, e.g.:

cp "$CONDA_PREFIX"/lib/librmw_fastrtps_cpp.so* AppDir/usr/lib/
cp "$CONDA_PREFIX"/lib/librmw_fastrtps_shared_cpp.so* AppDir/usr/lib/ 2>/dev/null || true

and in AppRun:

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

Workaround (for users)

  • The .deb (ros-jazzy-pj-bridge_0.9.0-0noble_amd64.deb) works — it links against system /opt/ros/<distro> and uses the system RMW provider.
  • pixi global install pj-bridge-ros2-* also works (conda env ships the provider).

Activity

  1. facontidavide commented on Sep 20, 2026

    @facontidavide
    Contributor

    Fixed in #15, released in 0.10.0.

    Your diagnosis was exactly right: ldd only reports link-time dependencies, so the RMW providers and the rosidl_typesupport_* libraries — all dlopen'd — were never copied into the AppDir.

    What changed:

    • Bundling moved out of the workflow YAML into packaging/make_appdir.sh, so it can be run and tested locally rather than only in CI.
    • Both RMW providers (rmw_fastrtps_cpp, rmw_cyclonedds_cpp) and every rosidl_typesupport_* flavour are now copied, along with their transitive dependencies. The dependency walk runs against the original files, because a copy's $ORIGIN rpath no longer resolves — that silently truncated the closure on the first attempt.
    • RMW_IMPLEMENTATION is deliberately not pinned in AppRun, contrary to the suggestion in your report: the vendor has to match the user's other nodes, so forcing one would break anyone running CycloneDDS. Shipping both providers and leaving the variable to the environment covers both cases.

    Verified with your exact repro — a clean ubuntu:24.04 container with no ROS — on the CI-built artifact, not just a local build. Also checked end-to-end: host publishers, bridge in the container, three topics streaming at 20 Hz, with RMW_IMPLEMENTATION unset and set to rmw_cyclonedds_cpp.

    One caveat worth stating explicitly: the AppImage still isn't self-sufficient for custom message types. AMENT_PREFIX_PATH appends the bundle after the user's entries, so a sourced workspace keeps priority; the bundled definitions are only a fallback for common types. A topic whose type isn't resolvable is skipped with an error rather than taking the bridge down.

    Thanks for the precise report — the find squashfs-root output made this quick to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions