RPATH vs RUNPATH for ROS libraries (without LD_LIBRARY_PATH)

asked 2018-12-18 09:50:39 -0600

GuiHome gravatar image


With bionic/melodic, the cpp linker changed default behaviour, using RUNPATH instead of RPATH (see https://stackoverflow.com/questions/4... )

In ROS, LD_LIBRARY_PATH is used and resolves the indirect dependencies this way, so this is not necessarily a problem.


However, in case a ROS app needs some capabilities (for instance accessing NET RAW for doing ethercat stuff), then the LD_LIBRARY_PATH is directly dropped for security reasons (see https://stackoverflow.com/a/53835603/... ) and the app needs to rely on the "propagation" of the RPATH to the dependency libs and indirect dependencies lib.

In xenial this was working, but not in bionic where RUNPATH is used (that does not propagate) it does not, breaking ethercat usage for instance (ros_ethercat_loop or probably also pr2_ethercat) see https://github.com/shadow-robot/ether... for details.


Is it necessary to switch from RPATH to RUNPATH in all ros libraries since by default LD_LIBRARY_PATH is probably used most of the time (for nice overlays at development time for instance) ?

edit retag flag offensive close merge delete


This is a quite technical question touching on various parts of ROS that are a bit out of scope for ROS Answers I believe. That may be why there is little response here.

Perhaps @Dirk Thomas has an idea.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-21 06:40:30 -0600 )edit