-
Notifications
You must be signed in to change notification settings - Fork 24
cannot open input file 'deepspeech.lib' / Windows 10 #25
Comments
Have you added the directory with deepspeech.lib to your path? |
I didn't get any file called deepspeech.lib with the tar.gz file you mentioned on your README and the native_client version for Windows, and the native_client is added to my path. |
Hmm I see, that's a valid question. There is a .lib file in the windows native client but it's called differently. |
Indeed, there is a file called |
@LeSplooch if you clone this repo, and change the "deepspeech" in sys/build.rs to deepspeech.so, does it work then? |
Oh sorry I just saw your post, I'll try this asap and let you know about the result. |
@LeSplooch don't worry I got the idea just now and was already afraid you dismissed deepspeech completely. With rust-lang/rust#58713 we might make the usage of .lib files obsolete. Also if my suggestion doesnt work, try changing it to |
I was about to do it but I've never worked with folder crates yet, so I'd need a little help in order to import that into my code. I just |
@LeSplooch the docs for path dependencies are here: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies You could clone deepspeech-rs and then point to the local clone via path instead of the crates.io version. |
I'm really sorry for the delayed answer. So fn main() {
println!("cargo:rustc-link-lib=deepspeech.so");
} But now I have a problem : apparently, |
It's not needed any more, see 9876695 |
I still have a link.exe fatal error message with both
|
That issue is because the linker can't find those files. But they exist, you just have to tell the directory the downloaded precompiled library lies inside. Have you added it to the |
The absolute path to |
I'm also having this problem. |
I guess I should add something a little more helpful... I've changed #[cfg(target_os = "windows")]
fn main() {
println!("cargo:rustc-link-lib=libdeepspeech.so.if");
} It still doesn't work, even though the folder is in my path. EDIT: |
I got it! My local copy of // It's bugged on windows >:(
#[cfg(target_os = "windows")]
fn main() {
println!(r"cargo:rustc-link-search=C:\deepspeech");
println!("cargo:rustc-link-lib=libdeepspeech.so.if");
}
#[cfg(not(target_os = "windows"))]
fn main() {
println!("cargo:rustc-link-lib=deepspeech");
} I also have put the folder I downloaded where I marked above. (I had it deeper in my file tree, but my username has a space in it and Yay! Hope this helps @LeSplooch! |
@gamma-delta Awesome! Can you put this into a PR? |
Maybe! I'm not the best at Github. Probably what I'll do is set it up with an environment variable, and include in the install instructions to set it to wherever you put the files. Then |
For the record, if you want to tell the linker on Windows where you have libraries installed, you need to modify |
@retep998 If I understand you correctly, I should create a value containing a comma seperated array with the path to the folder where my |
I tried it and now I have another error, but I think it's a good sign, it looks like the libraries have been found but it can't handle them for some reason (I'm not familiar with linker errors). Here is the output :
|
I followed @gamma-delta's instructions but now I'm getting Summary of what I did:
At this point it compiles fine now that it can find the What's confusing me the most is I thought this would be statically linking the library so why is it looking for a DLL in the first place? |
I have met this issue like you, have you resolve this problem? |
oh, i have added set rustc-link-search= C:\deepspeech before I run cargo run --release --example client example/client can be run successfully. but In my scenario, I got another error:
|
Hello. After following the steps in your "Quickstart" section of the README.md, I tried compiling a crate using deepspeech-rs v0.6.1 on Windows 10, and I'm having the following error :
It looks like the compiler can't find a file but I don't know how to get it.
I'm really sorry if it's not the right place to talk about this but I can't find help anywhere else.
The text was updated successfully, but these errors were encountered: