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

Compiling with metal feature has `ggml-metal.o` linker failure

Open tc-wolf opened this issue 2 years ago • 3 comments

  error occurred: Command ZERO_AR_DATE="1" "ar" "cq" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/libbinding.a" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/./llama.cpp/common/common.o" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/./llama.cpp/llama.o" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/./binding.o" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/llama.cpp/ggml.o" "/home/tc-wolf/rust-llama.cpp/target/release/build/llama_cpp_rs-75252caa56296e09/out/llama.cpp/ggml-metal.o" with args "ar" did not execute successfully (status code exit status: 1).

This is because the cc-rs crate adds a hash to the generated object file name to avoid collisions if there is another file in a subdirectory with the same name.

Should be fixed by #39

tc-wolf avatar Mar 05 '24 20:03 tc-wolf

Same issue here

error occurred: Command ZERO_AR_DATE="1" "ar" "cq" 
[...]
target/debug/build/llama_cpp_rs-7523fd9532577412/out/llama.cpp/ggml.o" with args "ar" did not execute successfully (status code exit status: 1).

mikecvet avatar Mar 13 '24 05:03 mikecvet

Same error, what's the work around for this?

5antelope avatar Mar 22 '24 08:03 5antelope

In my project, which depends on rust-llama.cpp, I fixed this by pinning the upstream cc dependency in my Cargo.toml:

[dependencies]
cc = "=1.0.83"

mikecvet avatar Mar 22 '24 14:03 mikecvet