Skip to content

Commit 4843bc4

Browse files
rmusser01claude
andcommitted
ci: add libcuda.so.1 symlink + LDFLAGS rpath-link for CUDA executable link
The toolkit's stub ships as libcuda.so (no version suffix), but libggml-cuda.so has a NEEDED entry for libcuda.so.1 which ld's transitive shared-lib check can't resolve via LIBRARY_PATH alone. Symlink the stub to the versioned SONAME and pass rpath-link so ld's check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 38810c1 commit 4843bc4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ jobs:
6868
echo "/usr/local/cuda/bin" >> "$GITHUB_PATH"
6969
echo "CUDA_PATH=/usr/local/cuda" >> "$GITHUB_ENV"
7070
echo "LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH:-}" >> "$GITHUB_ENV"
71-
# Expose libcuda.so stub for link-time resolution of Driver API symbols
72-
# (cuMem*, etc.). The actual libcuda.so.1 comes from the NVIDIA driver
73-
# on the end user's machine at runtime.
74-
echo "LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LIBRARY_PATH:-}" >> "$GITHUB_ENV"
71+
# libggml-cuda.so has a NEEDED entry for libcuda.so.1 (Driver API).
72+
# The toolkit ships only libcuda.so (no .1 suffix) in its stubs dir,
73+
# so add a symlink with the expected SONAME and pass rpath-link to ld
74+
# so transitive shared-lib checks succeed. At runtime, libcuda.so.1
75+
# resolves from the end user's NVIDIA driver install.
76+
sudo ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
77+
echo "LDFLAGS=-Wl,-rpath-link,/usr/local/cuda/lib64/stubs -L/usr/local/cuda/lib64/stubs" >> "$GITHUB_ENV"
7578
7679
- name: Configure ggml
7780
shell: bash

0 commit comments

Comments
 (0)