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=()