Closed David-OConnor closed 1 year ago
I believe that you will want OPENVINO_INSTALL_DIR
to be set to C:\Program Files (x86)\Intel\openvino_2023
, the top-level directory. And you will probably want to build with the equivalent of --features runtime-linking
, IIRC. The openvino-finder
crate should be able to find the *.dll
then:
That file also logs all the paths it checks if you want to troubleshoot what paths have been tried, etc.
Thank you. Unfortunately, it looks like it's still giving the same message. Latest config doing it is as follows:
OPENVINO_INSTALL_DIR = C:\Program Files (x86)\Intel\openvino_2023
(env var)setupvars.bat
each terminal open. (Success)[dependencies] openvino = { version = "^0.5.0", features = ["runtime-linking"] }
Error is as above.
How do I check the logs? I didn't see any generated file or printed text to console.
Ah, interesting. Well, here's some thoughts:
openvino-rs
emits log messages that need to be printed by some other code, e.g., env_logger (env_logger::init();
).{ git = "https://github/intel/openvino-rs", features = ["runtime-linking"] }
? I think that is the correct syntax, but this is authoritative. If that fixes the issue then I'll just push a new version.Could be it; I appreciate it. Not sure if this error is before or after the previous one, but am now getting this, using the Git dependency:
error: failed to get `openvino` as a dependency of package `face v0.1.0 (C:\Users\david\strike\face2)`
Caused by:
failed to load source for dependency `openvino`
Caused by:
Unable to update https://github.com/intel/openvino-rs
Caused by:
failed to update submodule `crates/upstream`
Caused by:
failed to update submodule `tools/pot/thirdparty/open_model_zoo`
Caused by:
path too long: 'C:/Users/david/.cargo/git/checkouts/openvino-rs-c4e388d557d9d335/536280a/crates/openvino-sys/upstream/thirdparty/open_model_zoo/models/intel/formula-recognition-polynomials-handwritten-0001/formula-recognition-polynomials-handwritten-0001-decoder/.gitattributes'; class=Filesystem (30)
PS C:\Users\david\face2>
Windows path lengths... that is annoying. You could try to retrieve the Git repository elsewhere and refer to it with path
in your Cargo.toml
? For reference, only the top-level upstream
submodule is necessary; the child submodules of that repository are not and are just being recursively retrieved by some Cargo default.
Very puzzling, and thank you again. Of note: It compiled using your approach of git clone + path dependency. (No more name length error). But... No env logger errors, and same error message as before. Was worth a shot!
Is the code you're running available somewhere for me to attempt to reproduce? If you send me a GitHub repository and the command that you see the failure on I will try it out. I don't tend to see many issues on Linux, so I'm interested in troubleshooting some of these other platforms (Windows, MacOS).
Appreciate it - Repo with the latest from this discussion: https://github.com/David-OConnor/openvino_rust_test
Ok, I am not able to reproduce this... I did the following:
Set things up in a CLI environment:
C:\...> set OPENVINO_INSTALL_DIR=C:\...\w_openvino_toolkit_windows_2023.1.0.12185.47b736f63ed_x86_64
C:\...> C:\...\w_openvino_toolkit_windows_2023.1.0.12185.47b736f63ed_x86_64\setupvars.bat
Warning: Python is not installed. Please install one of Python 3.7 - 3.11 (64-bit) from https://www.python.org/downloads/
[setupvars.bat] OpenVINO environment initialized
Ran your example successfully:
C:\...\openvino_rust_test>cargo run
...
warning: unused variable: `core`
--> src\main.rs:10:9
|
10 | let core = openvino::Core::new(None).expect("to instantiate the OpenVINO library");
| ^^^^ help: if this is intentional, prefix it with an underscore: `_core`
|
= note: `#[warn(unused_variables)]` on by default
warning: `face` (bin "face") generated 1 warning (run `cargo fix --bin "face"` to apply 1 suggestion)
Finished dev [unoptimized + debuginfo] target(s) in 16.01s
Running `target\debug\face.exe`
OV version: 2023.1.0-12185-9e6b00e51cd-releases/2023/1
Perhaps the missing piece is calling the setupvars.bat
script to set up the path for Windows to find the dependent libraries?
Thank you for the help! I appreciate you trying it; helps narrow it down. Of note, that archive you posted is the exact one I'm using.
OK, I think you're onto something with the setupvars.bat
. It works if I use the old school cmd prompt, but not if I use powershell...
OK, I think you're onto something with the
setupvars.bat
. It works if I use the old school cmd prompt, but not if I use powershell...
Ah, weird that you mention that: I vaguely recall running into something like that while working on https://github.com/abrown/install-openvino-action. If PowerShell is something you use frequently maybe opening an issue on the https://github.com/openvinotoolkit/openvino could resolve that?
Thank you! Will open an issue there, since it doesn't seem to be something fixable here. I appreciate it.
Of note in particular: https://github.com/openvinotoolkit/openvino/issues/7475, from 2021
Error:
Currently running with dynamic linking disabled in
Cargo.toml
. Windows 11. Have OpenVINO installed with PYPI, and it works on the Python version. Installed the standalone using the ARCHIVES distribution (Which distribution to choose was a bit confusing, but this seemed like a good bet given it supports all the hardware targets), unpacked toC:\Program Files (x86)\Intel\openvino_2023\
. I've configuredOPENVINO_INSTALL_DIR
andOPENVINO_BUILD_DIR
toC:\Program Files (x86)\Intel\openvino_2023\runtime\bin\intel64\Release
. Is this right? Have been runningsetupvars.bat
each terminal window. Any ideas? Thank you!