Fix #28491 linking bug when compiling with BUILD_SHARED_LIBS=OFF - #28492
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Member
|
@ryan5rdx If this PR is correct, let us know so that we can fast-merge it :) |
Contributor
yup this LGTM! I don't have an older macOS machine to verify this, but it still builds fine on tahoe |
taronaeo
approved these changes
Sep 12, 2026
ggerganov
approved these changes
Sep 12, 2026
1 task done
pl752
pushed a commit
to pl752/llama.cpp
that referenced
this pull request
Sep 15, 2026
quimmedes
pushed a commit
to quimmedes/cafe-llama.cpp
that referenced
this pull request
Sep 16, 2026
zsogitbe
pushed a commit
to zsogitbe/llama.cpp
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
When building in MacOS with BUILD_SHARED_LIBS=OFF post commit 2bf0415, ggml-rpc is a static archive and never links so librdma symbols stay undefined and compilation aborts with a linker error (#28491).
Additional information
Fix is simple, make target link option public. In ggml/src/ggml-rpc/CMakeLists.txt change
target_link_options(ggml-rpc PRIVATE "LINKER:-weak_library,${RDMA_LIB}")withtarget_link_options(ggml-rpc PUBLIC "LINKER:-weak_library,${RDMA_LIB}")Requirements