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

CMake Bugfix: Windows ggml find_package fix in llama-config.cmake.in file #11466

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Emreerdog
Copy link
Contributor

@Emreerdog Emreerdog commented Jan 28, 2025

Review Complexity: Easy

Problem

In llama-config.cmake.in file, we are looking for the ggml cmake config file through find_package function in CMake which works normal in UNIX file architecture since cmake looks for config modules under lib/cmake directories.

However in Windows, since the library is installed under C:\Program Files\llama.cpp or C:\Program Files (x86)\llama.cpp folder, CMake looks for config modules based off of the names of the folders under the program files directory and it can't find the ggml library since it is not installed as an individual project on its own.

Fix

Adding a lookup hint location where the llama-config.cmake and ggml-config.cmake file reside together.

@github-actions github-actions bot added the build Compilation issues label Jan 28, 2025
@slaren slaren requested a review from bandoti January 28, 2025 21:23
@bandoti
Copy link
Collaborator

bandoti commented Jan 28, 2025

@Emreerdog Any chance you would provide the basic command you used to build/install? I am planning on adding some regression tests to the CI, and this would give me something to throw in the mix.

@Emreerdog
Copy link
Contributor Author

@Emreerdog Any chance you would provide the basic command you used to build/install? I am planning on adding some regression tests to the CI, and this would give me something to throw in the mix.

@bandoti I normally create the build directory under llama.cpp and do the compile and install:

mkdir build
cd build
cmake ..
cmake --build . --config Release -j

After the compilation is finished, I call this under the build directory:

cmake --install .

The local installation requires admin privileges though.

@bandoti
Copy link
Collaborator

bandoti commented Jan 28, 2025

Okay great. Thanks for the contribution.

@bandoti bandoti merged commit 794fe23 into ggerganov:master Jan 28, 2025
2 checks passed
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.

2 participants