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.o missing. #44

Open
vnermolaev opened this issue Aug 16, 2024 · 2 comments
Open

ggml.o missing. #44

vnermolaev opened this issue Aug 16, 2024 · 2 comments

Comments

@vnermolaev
Copy link

Hi,

I've created a blank Rust project with a single dependency:

llama_cpp_rs = "0.3.0"

However, when I tried to compile it, the build failed with the following error:

cargo:warning=ar: /Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/llama.cpp/ggml.o: No such file or directory

  --- stderr

  error occurred: Command ZERO_AR_DATE="1" "ar" "cq" "/Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/libbinding.a"
"/Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/073db387043af495-common.o"
"/Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/30b5508d68fcb5a8-llama.o"
"/Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/8f1a5a601f45df90-binding.o"
"/Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/llama.cpp/ggml.o" with args ar did not execute successfully (status code exit status: 1).

I checked the folder /Users/.../llm-test/target/debug/build/llama_cpp_rs-fbb4c38a7b53ae1d/out/ and found that there was no llama.cpp subfolder, nor the expected files.

Interestingly, when I cloned the llama_cpp_rs repository directly and compiled it, the build succeeded without any issues. As a workaround, I copy-pasted the missing files into my blank project and retried the compilation—it worked.

Is there something I’m doing wrong, or could this be a configuration issue with my system? Any advice on resolving this without using the manual workaround would be greatly appreciated.

Host: Apple M2 Pro
OS: macOS Sonoma 14.5
Rust: rustc 1.80.1 (3f5fd8dd4 2024-08-06)

@kaorlol
Copy link

kaorlol commented Aug 25, 2024

same issue

@ramintoosi
Copy link

  • Clone the repository in your project root.
git clone --recurse-submodules https://github.com/mdrokz/rust-llama.cpp
  • cd to folder
cd rust-llama.cpp/
  • Build the project
cargo build

or

cargo build -- release
  • Add dependency in your toml file like this:
[dependencies]
llama_cpp_rs = {path = "rust-llama.cpp"}

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

No branches or pull requests

3 participants