Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GGML_TARGET_DEFINES-NOTFOUND fix for builds without GGML_CDEF_PUBLIC #9338

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

Xarbirus
Copy link
Contributor

@Xarbirus Xarbirus commented Sep 6, 2024

In some builds I had an error with the message <command-line>: error: ISO C++11 requires whitespace after the macro name [-Werror].
After research it turned out that the reason is that llama-config.cmake contains

set(_llama_transient_defines "GGML_TARGET_DEFINES-NOTFOUND;GGML_SCHED_MAX_COPIES=4;$<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS>;GGML_USE_LLAMAFILE;_XOPEN_SOURCE=600;_GNU_SOURCE")

As you can see set contains GGML_TARGET_DEFINES-NOTFOUND. The reason for this was that I was building llama.cpp with a completely default CPU backend (without any bias and so on). I propose a fix that checks that the properties are set.

@github-actions github-actions bot added the build Compilation issues label Sep 6, 2024
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@ggerganov ggerganov merged commit 2a82511 into ggerganov:master Sep 12, 2024
52 checks passed
@Xarbirus Xarbirus deleted the ggml_transient_defines_fix branch September 12, 2024 11:59
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
* `GGML_TARGET_DEFINES-NOTFOUND` fix for builds without `GGML_CDEF_PUBLIC`

* Update CMakeLists.txt, spaces fix
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
* `GGML_TARGET_DEFINES-NOTFOUND` fix for builds without `GGML_CDEF_PUBLIC`

* Update CMakeLists.txt, spaces fix
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
* `GGML_TARGET_DEFINES-NOTFOUND` fix for builds without `GGML_CDEF_PUBLIC`

* Update CMakeLists.txt, spaces fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Compilation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants