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

Compiling with metal feature has ggml-metal.o linker failure #40

Open
tc-wolf opened this issue Mar 5, 2024 · 3 comments
Open

Compiling with metal feature has ggml-metal.o linker failure #40

tc-wolf opened this issue Mar 5, 2024 · 3 comments

Comments

@tc-wolf
Copy link

tc-wolf commented Mar 5, 2024

  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

@mikecvet
Copy link

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).

@5antelope
Copy link

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

@mikecvet
Copy link

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"

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