[ros_ethercat_loop] RPATH issues when using ethercat_grant on bionic
guihomework opened this issue · 0 comments
guihomework commented
the bug is related to shadow-robot/ethercat_grant#4 when one starts the driver on bionic, some libs are not found through the RUNPATH.
process[sr_hand_robot-3]: started with pid [256937]
catkin_ws_shadow/devel/lib/ros_ethercat_loop/ros_ethercat_loop: error while loading shared libraries: librosconsole_bridge.so: cannot open shared object file: No such file or directory
[sr_hand_robot-3] process has died [pid 256937, exit code 127, cmd ethercat_grant catkin_ws_shadow/devel/lib/ros_ethercat_loop/ros_ethercat_loop -i ethercat2 -r robot_description __name:=sr_hand_robot
to fix this issue one can add the linker flag --disable-new-dtags
to use the old RPATH but the problem is explicitly a dependency of dependency (rosconsole_bridge is a dependency of liburdfdom which itself does not have use RPATH)
LD_DEBUG=files ldd catkin_ws_shadow/devel/lib/ros_ethercat_loop/ros_ethercat_loop
266364: file=librosconsole_bridge.so [0]; needed by /opt/ros/melodic/lib/liburdf.so [0]
so the trick is to explicitly request ros_ethercat_loop to use librosconsole_bridge itself and then find it via its own RPATH
a PR with these two patches will be provided