Repository navigation
Conversation
`find_library(MATH_LIBRARY m)` was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would prefer `find_library` over the standard `-lm` approach. This commit is also meant to start a discussion if there is a valid reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC. Signed-off-by: Adrien Gallouët <[email protected]>
Member
Author
|
ok: #22237, im going to dig that |
Signed-off-by: Adrien Gallouët <[email protected]>
Member
|
Some of the builds are failing |
Signed-off-by: Adrien Gallouët <[email protected]>
Signed-off-by: Adrien Gallouët <[email protected]>
angt
force-pushed
the
ggml-revert-to-lm-linking-instead-of-find_library
branch
from
April 27, 2026 08:05
54cc6ea to
d1792ae
Compare
Member
Author
Fixed, we need to fallback for |
IntelNav
pushed a commit
to IntelNav/llama.cpp
that referenced
this pull request
Apr 29, 2026
* ggml : revert to -lm linking instead of find_library `find_library(MATH_LIBRARY m)` was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would prefer `find_library` over the standard `-lm` approach. This commit is also meant to start a discussion if there is a valid reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC. Signed-off-by: Adrien Gallouët <[email protected]> * ggml : use MATH_LIBRARY only if defined Signed-off-by: Adrien Gallouët <[email protected]> * ggml : fix initial broken condition Signed-off-by: Adrien Gallouët <[email protected]> * ggml : always respect MATH_LIBRARY when defined Signed-off-by: Adrien Gallouët <[email protected]> --------- Signed-off-by: Adrien Gallouët <[email protected]>
baramofme
pushed a commit
to baramofme/llama-cpp-turboquant
that referenced
this pull request
May 23, 2026
* ggml : revert to -lm linking instead of find_library `find_library(MATH_LIBRARY m)` was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would prefer `find_library` over the standard `-lm` approach. This commit is also meant to start a discussion if there is a valid reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC. Signed-off-by: Adrien Gallouët <[email protected]> * ggml : use MATH_LIBRARY only if defined Signed-off-by: Adrien Gallouët <[email protected]> * ggml : fix initial broken condition Signed-off-by: Adrien Gallouët <[email protected]> * ggml : always respect MATH_LIBRARY when defined Signed-off-by: Adrien Gallouët <[email protected]> --------- Signed-off-by: Adrien Gallouët <[email protected]>
MrLordCat
referenced
this pull request
in MrLordCat/llama.cpp-rdna-lab
Jul 16, 2026
* ggml : revert to -lm linking instead of find_library `find_library(MATH_LIBRARY m)` was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would prefer `find_library` over the standard `-lm` approach. This commit is also meant to start a discussion if there is a valid reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC. Signed-off-by: Adrien Gallouët <[email protected]> * ggml : use MATH_LIBRARY only if defined Signed-off-by: Adrien Gallouët <[email protected]> * ggml : fix initial broken condition Signed-off-by: Adrien Gallouët <[email protected]> * ggml : always respect MATH_LIBRARY when defined Signed-off-by: Adrien Gallouët <[email protected]> --------- Signed-off-by: Adrien Gallouët <[email protected]>
zommiommy
pushed a commit
to zommiommy/llama.cpp
that referenced
this pull request
Aug 18, 2026
* ggml : revert to -lm linking instead of find_library `find_library(MATH_LIBRARY m)` was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would prefer `find_library` over the standard `-lm` approach. This commit is also meant to start a discussion if there is a valid reason to keep `find_library(MATH_LIBRARY m)`, we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC. Signed-off-by: Adrien Gallouët <[email protected]> * ggml : use MATH_LIBRARY only if defined Signed-off-by: Adrien Gallouët <[email protected]> * ggml : fix initial broken condition Signed-off-by: Adrien Gallouët <[email protected]> * ggml : always respect MATH_LIBRARY when defined Signed-off-by: Adrien Gallouët <[email protected]> --------- Signed-off-by: Adrien Gallouët <[email protected]>
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
find_library(MATH_LIBRARY m)was introduced recently, but it breaks CUDA compilation with GGML_STATIC. I could not find any valid use case where we would preferfind_libraryover the standard-lmapproach.This commit is also meant to start a discussion if there is a valid reason to keep
find_library(MATH_LIBRARY m), we should clarify what problem it was solving and find an alternative fix that does not break CUDA with GGML_STATIC.Additional information
Found with installama.sh: https://github.com/angt/installama.sh/actions/runs/24885620138/job/72864816848
Requirements