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

Dmitry Safonov dsafonov at virtuozzo.com
Wed Apr 20 07:49:02 PDT 2016


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'

  ARCH_DIR               := arch/$(SRCARCH)
  export ARCH_DIR


More information about the CRIU mailing list