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).

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