punctually removing an rpath

20 views
Skip to first unread message

PIOTR LESNICKI

unread,
Jan 14, 2021, 10:30:17 AM1/14/21
to Spack
Hi,

I'm using a set of applications compiled with spack for non-regression tests of a library.
In this use-case, I don't want to recompile applications each time I change the library. so I would like to unset rpath for just this library in all applications. I tested this on an application by removing the rpath afterwards with chrpath and I get what I wanted.

Can I do the same beforhand, and prevent just this prefix.lib to be added to the rpath of downstream applications ?

PIOTR LESNICKI

unread,
Feb 4, 2021, 6:53:06 AM2/4/21
to Spack
After some search it seems that is not possible: spack automatically adds prefix.lib and prefix.lib64 of all link depencies to rpath
To my knowledge there seems no way for a package to control its rpaths (maybe only adding something might be possible through libs).

Marc Mengel

unread,
Feb 6, 2021, 9:57:29 AM2/6/21
to PIOTR LESNICKI, Spack
You would have to do something Evil like monkeypatch the PackageBase.rpath() method to make
that happen consistently... 

--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/59db8b58-fb47-4fe1-bce4-293b49a1b2a6n%40googlegroups.com.

Gamblin, Todd

unread,
Feb 8, 2021, 4:42:15 PM2/8/21
to Marc Mengel, PIOTR LESNICKI, Spack
The other option here is to configure Spack to use RUNPATH instead of RPATH.  See the shared_linking option in config.yaml:


You can set this in an environment or in any of the config scopes.  Using RUNPATH lets you set LD_LIBRARY_PATH and override any RUNPATHs set on the binary.  RPATH has higher precedence than LD_LIBRARY_PATH.

-Todd


Reply all
Reply to author
Forward
0 new messages