Anush008/fastembed-rs

Linking `cc` failed: exit status: 1

Adarsh999bh opened this issue · 9 comments

Hi I'm trying to run the sample mentioned in the README file but when I try to build I'm facing error linking cc failed: exit status: 1

Could you mention what platform you're on and the complete log please?

This is a similar issue to the one I'[m experiencing. Embeddings work well, and are now quite fast (even on CPU only) on Intel architecture machines. However, I would like to run this on an ARM based machine, and get the problem above. Diving into that some more it would seem that compiling onnxruntime_c_api.cc is a particular problem.

Could we have a version of fastembed that optionally uses onnxruntime. If the choice is made to not use it, given CPU only processing is fast enough now, not use onnx. It would simplify things considerably too.

What are your platform specifications?

Also, I didn't quite get your suggestion about optional ONNX runtime. It the the only runtime FastEmbed-rs supports.

Hi @Anush008 it seems that after installing libstdc++6 it was working fine.!

Thanks anyways.!👍

Thanks Adarsh, I'll try libstdc++6.
Anush, I'm suggesting that ONNX is not necessary and this code runs reasonably fast now on a CPU only (this was not true for early versions). So you don't strictly need ONNX.

But the code that is running on your CPU(If Fastembed-rs) is using ONNX via the ort library (Downloads binaries automatically by default).

Or maybe I am totally misunderstanding what you mean.

Yes it is. There is this line in Cargo.toml: ort = { version = "2.0.0-rc.0", default-features = false, features = [ "ndarray" ] }

If all references to ort are commented out in Cargo.toml and a build done, then there are only 6 compilation errors. I was thinking that you could just use ndarray directly and miss out ort/onnx etc giving you a pure Rust implementation without a dependency on C/C++. However, I've just realised , from looking at the errors, ort helps you by handling the data file(s) that support the embeddings and you would not want to rewrite that.

So sorry, just a thought (I'm old school and don't like lot's of complicated dependencies that bloat code, especially in another language). Ignore me.

Thanks to you both, Chris

Glad this was sorted.

Regards @intelligentnet and @Adarsh999bh.