From a25b29ef9971978421b1b7cd588d81d78bb0c83f Mon Sep 17 00:00:00 2001 From: Krystie Date: Sat, 27 Jun 2026 16:23:03 -0700 Subject: [PATCH] ci: fix build-rocksdb sanity check (ldconfig strips patch version) The previous sanity check matched against `librocksdb.so.${ROCKSDB_VERSION}` (full semver like 8.9.1), but `ldconfig -p` only prints major.minor (e.g. `librocksdb.so.8.9`). The library was correctly installed but the check failed, killing the CI job before Configure could run. Check the versioned file on disk first (definitive), then ldconfig with the major.minor pattern (sanity for runtime linker). Both must pass. Discovered when investigating CI failure on PR #10. --- scripts/ci/build-rocksdb.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/ci/build-rocksdb.sh b/scripts/ci/build-rocksdb.sh index 9bb7c57..020689e 100755 --- a/scripts/ci/build-rocksdb.sh +++ b/scripts/ci/build-rocksdb.sh @@ -43,10 +43,19 @@ make install-shared PREFIX="${INSTALL_PREFIX}" ldconfig -# Sanity: installed library should be loadable and export the version -# macros we look for at configure time. -if ! ldconfig -p | grep -q "librocksdb.so.${ROCKSDB_VERSION}"; then - echo "!!! ldconfig did not pick up librocksdb.so.${ROCKSDB_VERSION}" >&2 +# Sanity: installed library should be on disk and registered with ldconfig. +# ldconfig strips the patch version from its output, so we check both: +# 1. File exists at the versioned path (definitive). +# 2. ldconfig shows a matching major.minor (sanity for runtime linker). +ROCKSDB_MAJOR_MINOR="${ROCKSDB_VERSION%.*}" +if [ ! -f "${INSTALL_PREFIX}/lib/librocksdb.so.${ROCKSDB_VERSION}" ]; then + echo "!!! librocksdb.so.${ROCKSDB_VERSION} not found at ${INSTALL_PREFIX}/lib/" >&2 + ls -l "${INSTALL_PREFIX}/lib/librocksdb"* 2>&1 || true + exit 1 +fi +if ! ldconfig -p | grep -q "librocksdb.so.${ROCKSDB_MAJOR_MINOR}"; then + echo "!!! ldconfig did not register librocksdb.so.${ROCKSDB_MAJOR_MINOR}" >&2 + ldconfig -p | grep -i rocksdb >&2 || true exit 1 fi