From e0b418a7baf4b009560441542eb04f7fb8f4e57d Mon Sep 17 00:00:00 2001 From: "Christian Holler (:decoder)" Date: Wed, 21 Apr 2021 16:53:07 +0200 Subject: [PATCH] Set rpath on js binary to properly resolve included libraries on runner (#5646) --- projects/spidermonkey/Dockerfile | 3 ++- projects/spidermonkey/build.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/spidermonkey/Dockerfile b/projects/spidermonkey/Dockerfile index 9c74dce54..226091bcc 100644 --- a/projects/spidermonkey/Dockerfile +++ b/projects/spidermonkey/Dockerfile @@ -21,7 +21,8 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \ libc++abi1 \ m4 \ yasm \ - python + python \ + patchelf # This wrapper of cargo seems to interfere with our build system. RUN rm -f /usr/local/bin/cargo diff --git a/projects/spidermonkey/build.sh b/projects/spidermonkey/build.sh index bf2e03bfc..ddee98df1 100755 --- a/projects/spidermonkey/build.sh +++ b/projects/spidermonkey/build.sh @@ -41,3 +41,6 @@ cp dist/bin/js $OUT mkdir -p $OUT/lib cp -L /usr/lib/x86_64-linux-gnu/libc++.so.1 $OUT/lib cp -L /usr/lib/x86_64-linux-gnu/libc++abi.so.1 $OUT/lib + +# Make sure libs are resolved properly +patchelf --set-rpath '$ORIGIN/lib' $OUT/js