Skip to content

Conversation

@loci-dev
Copy link

Mirrored from ggml-org/llama.cpp#17581

#17091 introduced an issue where when building with -DGGML_BACKEND_DL=ON on macOS you get this error:

c++: error: invalid argument '-current_version 0.9.4' only allowed with '-dynamiclib'
make[2]: *** [bin/libggml-blas.so] Error 1
make[1]: *** [ggml/src/ggml-blas/CMakeFiles/ggml-blas.dir/all] Error 2

It appears that building a module library with a version is not supported on macOS (CMake ticket), so this PR makes the build skip setting a version for backend module libraries on macOS.

@loci-agentic-ai
Copy link

Explore the complete analysis inside the Version Insights

Performance Analysis Summary - PR #354

Project: llama.cpp
PR #354: cmake: fix macOS build with -DGGML_BACKEND_DL=ON

This PR modifies only the CMake build configuration file (ggml/src/CMakeLists.txt) to conditionally skip version property assignment for backend MODULE libraries on macOS when dynamic loading is enabled. The change addresses a CMake limitation where MODULE libraries cannot have VERSION/SOVERSION properties on macOS. No source code modifications were made to any C/C++ files. Performance analysis confirms 0.0% change across all 16 binaries, with power consumption remaining identical between versions. No functions show measurable changes in response time or throughput.

@loci-dev loci-dev force-pushed the main branch 8 times, most recently from e4a4e1d to d0b408b Compare November 30, 2025 02:46
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.

3 participants