This repository was archived by the owner on Mar 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
Cannot build for dynamic loading #44
Copy link
Copy link
Open
Labels
Description
Problem:
When we try to build the library with dynamic loading support, it emits the following error at build time:
C:\dev\git\deepspeech-rs> cargo build --features dynamic
Compiling deepspeech v0.9.0 (C:\dev\git\deepspeech-rs)
warning: type `size_t` should have an upper camel case name
--> src\dynamic_bindings.rs:1:10
|
1 | pub type size_t = :: std :: os :: raw :: c_ulong ;
| ^^^^^^ help: convert the identifier to upper camel case: `SizeT`
|
= note: `#[warn(non_camel_case_types)]` on by default
warning: type `DeepSpeech_Error_Codes` should have an upper camel case name
--> src\dynamic_bindings.rs:73:11
|
73 | pub type DeepSpeech_Error_Codes = :: std :: os :: raw :: c_uint ;
| ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `DeepSpeechErrorCodes`
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
--> src\dynamic_bindings.rs:79:40
|
79 | let inner = std :: sync :: Arc :: new (libloading :: Library :: new (& path) ?) ;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error: aborting due to previous error; 2 warnings emitted
For more information about this error, try `rustc --explain E0133`.
error: could not compile `deepspeech`
To learn more, run the command again with --verbose.
Environment:
rustc --version --verbose
rustc 1.53.0 (53cb7b09b 2021-06-17)
binary: rustc
commit-hash: 53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
commit-date: 2021-06-17
host: x86_64-pc-windows-msvc
release: 1.53.0
LLVM version: 12.0.1