From 5f28b2e2bbb14054f50fca4ffe7c8fd03e2c1c5f Mon Sep 17 00:00:00 2001 From: agw Date: Wed, 30 Sep 2026 20:50:00 +0200 Subject: [PATCH] Refuse to ship a JASP whose rpath misses the bundled R A tarball went out with rpath /opt/jasp-desktop/lib only (a stale bundle-libs.sh on the runner host). libR.so then resolved to the user's system R 4.6 through ld.so.conf, which lacks utf8clen, so grDevices and every module failed to load. Check both binaries' rpath before packing. Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9 --- build/build-jasp.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/build-jasp.sh b/build/build-jasp.sh index 6b47f92..1221525 100755 --- a/build/build-jasp.sh +++ b/build/build-jasp.sh @@ -520,6 +520,14 @@ staged_r="$STAGE_DIR$PREFIX/R/lib/R/lib" for lib in libR.so libRblas.so libRlapack.so; do [[ -f "$staged_r/$lib" ]] || { echo "error: staged tree lacks $lib" >&2; exit 1; } done +# Without the bundled R's lib dir on the rpath, libR.so falls through to the +# user's system R (Arch's `r` puts itself in ld.so.conf), whose libR lacks +# internals like utf8clen: grDevices fails to load and so does every module. +for bin in JASP JASPEngine; do + rp="$(patchelf --print-rpath "$STAGE_DIR$PREFIX/bin/$bin")" + [[ ":$rp:" == *":$PREFIX/R/lib/R/lib:"* ]] || { + echo "error: $bin rpath '$rp' lacks $PREFIX/R/lib/R/lib" >&2; exit 1; } +done # Modules ship installed (module_libs/ over the binary_pkgs store), not # as .JASPModule bundles, so check that every module that built got installed. unstaged=()