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
This commit is contained in:
@@ -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/<module> over the binary_pkgs store), not
|
||||
# as .JASPModule bundles, so check that every module that built got installed.
|
||||
unstaged=()
|
||||
|
||||
Reference in New Issue
Block a user