Skip to content

Disable shared object versioning#1346

Merged
martindevans merged 1 commit intoSciSharp:masterfrom
m0nsky:fix/soname-versioning
Mar 3, 2026
Merged

Disable shared object versioning#1346
martindevans merged 1 commit intoSciSharp:masterfrom
m0nsky:fix/soname-versioning

Conversation

@m0nsky
Copy link
Contributor

@m0nsky m0nsky commented Mar 3, 2026

Shared object versioning was added in llama.cpp on November 11, 2025 (see this PR).

Due to the way we distribute our binaries (no versioned filenames), this was causing issues on platforms that did not use glibc (musl), or the dependency loader (for example, applications distributed with the .so libs in the executable root).

m0nsky@m0nsky-g14:~/publish$ ldd libggml.so
        linux-vdso.so.1 (0x00007ffdfb93d000)
        libggml-cpu.so.0 => not found
        libggml-cuda.so.0 => not found
        libggml-base.so.0 => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000735f13e00000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000735f141c8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000735f13a00000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000735f140dd000)
        /lib64/ld-linux-x86-64.so.2 (0x0000735f1420c000)

I've compared the possible approaches to counter this (patchelf, update the CMakeLists or symlinks), and I think this is the cleanest approach that will not break if llama.cpp starts distributing additional libs in the future.

This PR disables shared object versioning for the deps, I've ran an Update Binaries action over at my fork which succeeded, and confirmed this fixes the issue on Ubuntu 24.04.

Before:

m0nsky@m0nsky-g14:~/publish$ objdump -p libggml-cuda.so | grep SONAME
  SONAME               libggml-cuda.so.0

After:

m0nsky@m0nsky-g14:~/publish$ objdump -p libggml-cuda.so | grep SONAME
  SONAME               libggml-cuda.so

@martindevans martindevans merged commit 1e0234a into SciSharp:master Mar 3, 2026
3 of 6 checks passed
@m0nsky m0nsky deleted the fix/soname-versioning branch March 3, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants