From d1af35e660231fe3105618f2804f1c8394d11c33 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 22 Mar 2026 15:40:40 -0700 Subject: [PATCH] add shared library dependency check to distro tests After installing wheels in clean containers, ldd all binaries and .so files. Fails if any dependency is "not found", catching leaked build-host deps that would break on end-user systems. Co-Authored-By: Claude Opus 4.6 (1M context) --- test_wheels_in_image.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test_wheels_in_image.sh b/test_wheels_in_image.sh index 995aaac..7747770 100755 --- a/test_wheels_in_image.sh +++ b/test_wheels_in_image.sh @@ -36,6 +36,17 @@ docker run --rm -v "$PWD:/work" -w /work wheeltest bash -lc ' module="$(basename "$(dirname "$toml")" | tr "-" "_")" python -c "import $module; $module.smoketest()" && echo "$module: OK" done + + # Verify all binaries and shared libs are self-contained (no missing deps) + echo + echo "Checking shared library dependencies..." + ldd_out=$(find /tmp/venv -type f \( -executable -o -name "*.so*" \) -exec ldd {} + 2>/dev/null) || true + if echo "$ldd_out" | grep -q "not found"; then + echo "ERROR: binaries have missing shared library dependencies:" + echo "$ldd_out" | grep "not found" + exit 1 + fi + echo "All shared library deps OK" ' echo