Skip to content
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

Cargo builds deepspeech twice? #8435

Closed
bhamilton2591 opened this issue Jul 1, 2020 · 5 comments
Closed

Cargo builds deepspeech twice? #8435

bhamilton2591 opened this issue Jul 1, 2020 · 5 comments
Labels
C-bug Category: bug

Comments

@bhamilton2591
Copy link

Problem
I first ran this problem by the people responsible for deepspeech-rs. After review, I was told this appeared to be a cargo problem and to open an issue here.

~/deepspeech-rs $ cargo run --verbose --release --example client /home/pi/Downloads/ /home/pi/Downloads/audio/2830-3980-0043.wav
Fresh hound v3.4.0
Fresh alac v0.3.3
Fresh sample v0.9.1
Fresh claxon v0.4.2
Fresh byteorder v1.3.4
Fresh libc v0.2.71
Fresh deepspeech-sys v0.7.0
Fresh deepspeech-sys v0.7.0 (/home/pi/deepspeech-rs/sys)
Fresh deepspeech v0.7.0
Fresh ogg v0.5.1
Fresh caf v0.1.0
Fresh lewton v0.7.0
Fresh audrey v0.2.0
Compiling deepspeech v0.7.0 (/home/pi/deepspeech-rs)
Running rustc --crate-name client examples/client.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=45c9c7b6f4f5974a -C extra-filename=-45c9c7b6f4f5974a --out-dir /home/pi/deepspeech-rs/target/release/examples -L dependency=/home/pi/deepspeech-rs/target/release/deps --extern audrey=/home/pi/deepspeech-rs/target/release/deps/libaudrey-04d87e6302404fc9.rlib --extern deepspeech=/home/pi/deepspeech-rs/target/release/deps/libdeepspeech-8c31f94611999af5.rlib --extern deepspeech=/home/pi/deepspeech-rs/target/release/deps/libdeepspeech-f5785e43f263827b.rlib --extern deepspeech_sys=/home/pi/deepspeech-rs/target/release/deps/libdeepspeech_sys-175b4a4ae9f8bf87.rlib --extern libc=/home/pi/deepspeech-rs/target/release/deps/liblibc-660d6d0feecc043c.rlib
error[E0465]: multiple rlib candidates for deepspeech found
--> examples/client.rs:1:1
|
1 | extern crate deepspeech;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
note: candidate #1: /home/pi/deepspeech-rs/target/release/deps/libdeepspeech-8c31f94611999af5.rlib
--> examples/client.rs:1:1
|
1 | extern crate deepspeech;
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2: /home/pi/deepspeech-rs/target/release/deps/libdeepspeech-f5785e43f263827b.rlib
--> examples/client.rs:1:1
|
1 | extern crate deepspeech;
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0463]: can't find crate for deepspeech
--> examples/client.rs:1:1
|
1 | extern crate deepspeech;
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to 2 previous errors
Steps

  1. Download native_client from deepspeech from github
    2.clone deepspeech-rs from github
  2. from deepspeech-rs directory, execute cargo run --verbose --release --example client

Possible Solution(s)

Notes

Output of cargo version: cargo 1.44.1 (88ba857 2020-06-11)

rust version: rustc 1.44.1 (c7087fe00 2020-06-17)
platform: raspberry pi 4 8GB ram, raspberry pi OS buster

@bhamilton2591 bhamilton2591 added the C-bug Category: bug label Jul 1, 2020
@alexcrichton
Copy link
Member

THanks for the report! Can you expand a bit on the reproduction steps? I'm not entirely sure what repositories are in play here?

@bhamilton2591
Copy link
Author

THanks for the report! Can you expand a bit on the reproduction steps? I'm not entirely sure what repositories are in play here?

Deepspeech-rs is a Rust wrapper for deepspeech which is a Mozilla speech to text library written in python.
Clone the deepspeech-rs github repository, https://github.com/RustAudio/deepspeech-rs.git.
From the deepseech-rs directory, there is a Cargo.toml that will build everything needed. The README.md file that contains the steps to build and run a sample program.

You can now invoke the example via:
cargo run --release --example client

@ehuss
Copy link
Contributor

ehuss commented Jul 1, 2020

Something is fishy from the output. I see these odd things:

  • deepspeech and deepspeech-sys are included twice, once from the local git checkout, and once from crates.io.
  • libc is using version 0.2.71, but it is currently locked at 0.2.70.

Can you run cargo tree, to maybe see how this is happening? Are you on commit 3f7043c8052e29b63f934b1bacc503e9e44db3b8? Are there any local changes, particularly to Cargo.lock? Do you have any cargo configs, like source replacement?

(FWIW, I cannot reproduce this locally.)

@bhamilton2591
Copy link
Author

I looked at Cargo.lock, which I haven't examined before, and it had both deepspeech-sys and deepspeech twice. I removed deepspeech-sys from my machine and cloned it again. The Cargo.lock didn't have duplication that the old one did.

I still can't successfully build deepspeech-sys but a different error that I"m still researching, I'm closing this issue.

@bhamilton2591
Copy link
Author

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants