Skip to content

Commit d1af35e

Browse files
adeebshihadehclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 5457e99 commit d1af35e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test_wheels_in_image.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ docker run --rm -v "$PWD:/work" -w /work wheeltest bash -lc '
3636
module="$(basename "$(dirname "$toml")" | tr "-" "_")"
3737
python -c "import $module; $module.smoketest()" && echo "$module: OK"
3838
done
39+
40+
# Verify all binaries and shared libs are self-contained (no missing deps)
41+
echo
42+
echo "Checking shared library dependencies..."
43+
ldd_out=$(find /tmp/venv -type f \( -executable -o -name "*.so*" \) -exec ldd {} + 2>/dev/null) || true
44+
if echo "$ldd_out" | grep -q "not found"; then
45+
echo "ERROR: binaries have missing shared library dependencies:"
46+
echo "$ldd_out" | grep "not found"
47+
exit 1
48+
fi
49+
echo "All shared library deps OK"
3950
'
4051

4152
echo

0 commit comments

Comments
 (0)