pykeio / ort

Fast ML inference & training for Rust with ONNX Runtime
https://ort.pyke.io/
Apache License 2.0
786 stars 91 forks source link

`rc.4` linker error #241

Closed McPatate closed 1 month ago

McPatate commented 1 month ago

Hello, I'm running into issues when running my app. I get the following error on cargo run (build & clippy work fine):

  = note: ld: warning: ignoring duplicate libraries: '-lc++'
          ld: library 'add_ort_library_path_or_enable_feature_download-binaries_see_ort_docs' not found
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here is the relevant part of my Cargo.toml dependencies:

[dependencies]
ort = { version = "=2.0.0-rc.2", default-features = false, features = [
  "copy-dylibs",
  "half",
  "ndarray",
  "onednn",
] }
ort-sys = "=2.0.0-rc.2"

Before fixing the version to =2.0.0-rc.2 (which worked fine before I updated to rc.4), I deleted my target directory, files in ~/.cargo/registry and my Cargo.lock.

Not sure what to do to fix this, would appreciate some help!

McPatate commented 1 month ago

Re-read the error and noticed that it mentioned download-binaries. Enabling the feature fixes the error.

I download files myself with hf-hub, so I didn't think I'd need the feature. Would be nice to be able to disable it as it brings quite a bunch of unneeded dependencies.

McPatate commented 1 month ago

😓