From 28acdc4f1025ce62b6c9beff102566fe33cca244 Mon Sep 17 00:00:00 2001 From: Dawn Date: Tue, 27 Oct 2026 11:23:00 +0100 Subject: [PATCH] crystfel: fix hdf5 unpack (tarball entries start with ./), silence uv hardlink warning --strip-components=1 only stripped "." so ./configure was one level deeper; unpack plain and cd through hdf5/hdf5-*/ instead. Co-Authored-By: Claude Fable 5.1 --- crystfel/build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crystfel/build b/crystfel/build index 9b7f7b9..30f1fe3 100755 --- a/crystfel/build +++ b/crystfel/build @@ -24,6 +24,8 @@ crystfel::env() { UV="${UV:-/usr/bin/uv}" # ~/.cache/uv hits the home disk quota; shared cache reuses wheels across MX builds export UV_CACHE_DIR="/opt/psi/MX/.uv-cache" + # cache (/opt/psi) and venv (tmpdir) are on different filesystems: uv can't hardlink, don't warn + export UV_LINK_MODE=copy export UV_PROJECT_ENVIRONMENT="${SRC_DIR}/../meson-venv" export UV_PYTHON_INSTALL_DIR="${SRC_DIR}/../uv-python" # venv first (meson, ninja), then PREFIX (h5cc for meson's hdf5 lookup) @@ -45,13 +47,15 @@ pbuild::configure() { # HDF5_CONFIG_ABORT makes configure die when zlib is missing instead of # silently building without deflate; szip is not on Ra, so it is switched off # rather than aborting on it. - mkdir -p hdf5 && tar -xzf hdf5-*.tar.gz -C hdf5 --strip-components=1 \ + # no --strip-components: the GitHub tarball's entries start with ./hdf5-x.y.z/, + # so a fixed strip count lands configure one level off; cd through a glob instead + mkdir -p hdf5 && tar -xzf hdf5-*.tar.gz -C hdf5 \ || std::die 42 "hdf5 tarball unpack failed - is hdf5-*.tar.gz in ${SRC_DIR}? (prep copies it there)" - ( cd hdf5 \ + ( cd hdf5/hdf5-*/ \ && HDF5_CONFIG_ABORT=yes ./configure --prefix="${PREFIX}" --libdir="${PREFIX}/lib64" \ --enable-build-mode=production --disable-tests --with-zlib=yes --with-szlib=no \ && make -j"${JOBS}" && make install ) \ - || std::die 42 "hdf5 build failed - see ${SRC_DIR}/hdf5/config.log (zlib-devel missing?)" + || std::die 42 "hdf5 build failed - see ${SRC_DIR}/hdf5/hdf5-*/config.log (zlib-devel missing?)" [[ -x "${PREFIX}/bin/h5cc" ]] || std::die 42 "h5cc missing from ${PREFIX}/bin - meson cannot find hdf5 without it" meson setup build --prefix="${PREFIX}" --libdir=lib64 \