-
-
Notifications
You must be signed in to change notification settings - Fork 134
[Question]: Linking onnxruntime, shared library hell on MacOs #388
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
Comments
I'd say just override sherpa's |
My current solution:
Are there any other solutions to my problem? I would like |
I don't know if sherpa uses
Why? |
FYI: To build sherpa-onnx with a different version of onnxruntime, please have a look at |
Hi,
Right now I'm working on porting a Python service that uses
silero-vad
andsherpa-onnx
to Rust. For model inference in the Rust version of the application, I’m using:Example of how the libraries are included:
At the moment, I’ve run into an issue that could be described as “shared library hell,” as mentioned in the documentation:
sherpa-rs
copies its own version oflibonnxruntime.dylib
(version 1.17) into target/debug.ort
apparently detects thatlibonnxruntime.dylib
is already loaded and doesn’t try to load its own.At runtime, when I call the
ort
API, I get the error:"The requested API version [20] is not available, only API versions [1, 17] are supported in this build"
.This brings me to a couple of questions:
Where does
ort
getlibonnxruntime.dylib
from, and why doesn’t it appear intarget/debug
even when I’m only usingort
?My current hypothesis is that
ort
looks it up from somewhere in the cache:/Library/Caches/ort.pyke.io/dfbin/x86_64-apple-darwin/{hash}/onnxruntime/lib/libonnxruntime.a
.What is the recommended way to configure
ort
in my case?So far, it seems like I need to manually download a matching ONNX Runtime distribution and specify its path using
ORT_DYLIB_PATH
.Thanks
The text was updated successfully, but these errors were encountered: