Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(ci): symlink libopenblas.so.0 SONAME into ld.so search path

Louis Beaumontd1b6b155fc50
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index 6cdf38ce3..798190794 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -247,10 +247,23 @@ jobs:
sudo ln -sf "$REAL_SO" /usr/lib/x86_64-linux-gnu/liblibopenblas.so
[ -n "$REAL_A" ] && sudo ln -sf "$REAL_A" /usr/lib/x86_64-linux-gnu/liblibopenblas.a
+ # Runtime loader (ld.so) looks up the SONAME (`libopenblas.so.0`) in the
+ # default search path. The apt cache action restores the .so into the
+ # openblas-pthread/ subdir but may not install the ld.so.conf.d fragment
+ # or run ldconfig, so the binary exits 127 at startup with
+ # "error while loading shared libraries: libopenblas.so.0". Symlink the
+ # SONAME and the unsuffixed name into the default path.
+ SONAME="$(basename "$REAL_SO")" # e.g. libopenblas.so.0
+ sudo ln -sf "$REAL_SO" "/usr/lib/x86_64-linux-gnu/${SONAME}"
+ sudo ln -sf "$REAL_SO" /usr/lib/x86_64-linux-gnu/libopenblas.so
+ sudo ldconfig
+
# Sanity check: the symlinks must be non-dangling (-e follows links).
test -e /usr/lib/x86_64-linux-gnu/liblibopenblas.so
test -e /usr/lib/x86_64-linux-gnu/openblas/lib/liblibopenblas.so
- ls -la /usr/lib/x86_64-linux-gnu/liblibopenblas.* /usr/lib/x86_64-linux-gnu/openblas/lib/liblibopenblas.*
+ test -e "/usr/lib/x86_64-linux-gnu/${SONAME}"
+ ldconfig -p | grep libopenblas || true
+ ls -la /usr/lib/x86_64-linux-gnu/liblibopenblas.* /usr/lib/x86_64-linux-gnu/libopenblas.* /usr/lib/x86_64-linux-gnu/openblas/lib/liblibopenblas.*
CBLAS_HEADER="$(find /usr/include /usr/lib -name cblas.h 2>/dev/null | head -n1 || true)"
if [ -z "$CBLAS_HEADER" ]; then
CBLAS_HEADER="$(dpkg -L libopenblas-dev | grep -m1 '/cblas\.h$' || true)"