RPATH vs RUNPATH for ROS libraries (without LD_LIBRARY_PATH)
Context:
With bionic/melodic, the cpp linker changed default behaviour, using RUNPATH instead of RPATH (see https://stackoverflow.com/questions/47117443/dynamic-linking-with-rpath-not-working-under-ubuntu-17-10)
In ROS, LDLIBRARYPATH is used and resolves the indirect dependencies this way, so this is not necessarily a problem.
Problem
However, in case a ROS app needs some capabilities (for instance accessing NET RAW for doing ethercat stuff), then the LDLIBRARYPATH is directly dropped for security reasons (see https://stackoverflow.com/a/53835603/10801865) 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 (rosethercatloop or probably also pr2ethercat) see https://github.com/shadow-robot/ethercatgrant/issues/4 for details.
Question
Is it necessary to switch from RPATH to RUNPATH in all ros libraries since by default LDLIBRARYPATH is probably used most of the time (for nice overlays at development time for instance) ?
Asked by GuiHome on 2018-12-18 10:50:39 UTC
Comments
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.
Asked by gvdhoorn on 2018-12-21 07:40:30 UTC