rust-llama.cpp icon indicating copy to clipboard operation
rust-llama.cpp copied to clipboard

`ggml.o` missing.

Open vnermolaev opened this issue 1 year ago • 2 comments

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)

vnermolaev avatar Aug 16 '24 10:08 vnermolaev

same issue

namecallfilter avatar Aug 25 '24 04:08 namecallfilter

  • 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"}

ramintoosi avatar Sep 30 '24 07:09 ramintoosi