add -Wl,--rpath,FOO sets RUNPATH rather than RPATH for new linkers

Issue #2677 new
Roland Haas created an issue

The elf RPATH variable has been declared obsolete and instead RUNPATH introduced. The latter only affects the search path of the actual executable and not that of any libraries it loads. While maybe a good idea from the point of view of not having the top level executable changing search path for its libraries, this does not work on all clusters.

On frontera the module provided libraries do not set RUNPATH at all and instead rely on a module load and LD_LIBRARY_PATH to set up correct search paths. Which can be annoying if one wants to avoid simfactory to run simulations (which would load the modules).

One can pass an options -Wl,--disable-new-dtags to make a new linker use the old meaning of -Wl,--rpath. This may be something to consider for Cactus' configuration scripts.

See https://stackoverflow.com/questions/70149080/ldd-shows-so-not-found-but-runpath-contains-the-lib for references on this https://stackoverflow.com/questions/52018092/how-to-set-rpath-and-runpath-with-gcc-ld#comment90987961_52018092

Comments (0)

  1. Log in to comment