[CRIU] [PATCH] criu: add a shell wrapper

Adrian Reber adrian at lisas.de
Thu Apr 21 00:13:04 PDT 2016


On Wed, Apr 20, 2016 at 05:49:02PM +0300, Dmitry Safonov wrote:
> On 04/20/2016 05:28 PM, Andrew Vagin wrote:
> >On Wed, Apr 20, 2016 at 08:06:12AM +0300, Pavel Emelyanov wrote:
> >>Yes, the problem exists, I agree. But this solution is awful :(
> >>Can we better export the LD_LIBRARY_PATH in the zdtm.py script?
> >As far as I know Kir took the idea from autotools, so it's a standard
> >solution.
> >
> >We can set LD_LIBRARY_PATH, but eachone who need to execute from
> >from source, will have to do this.
> >
> >I don't know why you think it's awful:). It just works.
> 
> I may suggest - can we use ld's -rpath option?
> That will add directory to runtime library search path.
> I mean, something like that (completely untested):
> 
> --->8---
> diff --git a/criu/Makefile b/criu/Makefile
> index 1836bde5e1d3..14bf6d3c08f6 100644
> --- a/criu/Makefile
> +++ b/criu/Makefile
> @@ -1,6 +1,7 @@
>  # here is a workaround for a bug in libnl-3:
>  # 6a8d90f5fec4 "attr: Allow attribute type 0"
>  LDFLAGS                        += -Wl,--wrap=nla_parse,--wrap=nlmsg_parse
> +LDFLAGS                        += -Wl,-rpath,'$$ORIGIN/../soccr'

This sounds like a bad idea from the packaging stand point of view.
For the criu binary installed under /usr this will be the wrong path.

		Adrian


More information about the CRIU mailing list