ndarilek / tts-rs

115 stars 25 forks source link

Can't compile on Ubuntu (still) #48

Closed subalterngames closed 1 year ago

subalterngames commented 1 year ago

I'm starting a new issue because I don't have an option to re-open the previous issue: https://github.com/ndarilek/tts-rs/issues/47

Having set speech_dispatcher_0_9, I still get errors. Tested on Ubuntu 18 this time, not Ubuntu 20.

Cargo.toml:

[dependencies.tts]
version = "0.25.1"
features = ["speech_dispatcher_0_9"]

Result:

Compiling speech-dispatcher v0.16.0
error[E0425]: cannot find value `SPD_PUNCT_MOST` in module `SPDPunctuation`
    --> /home/esther/.cargo/registry/src/index.crates.io-6f17d22bba15001f/speech-dispatcher-0.16.0/src/lib.rs:103:28
     |
103  |     Most = SPDPunctuation::SPD_PUNCT_MOST,
     |                            ^^^^^^^^^^^^^^ help: a constant with a similar name exists: `SPD_PUNCT_NONE`
     |
    ::: /home/esther/cacophony/target/debug/build/speech-dispatcher-sys-d9157396e7a58d6d/out/speech_dispatcher_sys.rs:1849:5
     |
1849 |     pub const SPD_PUNCT_NONE: Type = 1;
     |     ------------------------------ similarly named constant `SPD_PUNCT_NONE` defined here

error[E0425]: cannot find value `v` in this scope
   --> /home/esther/.cargo/registry/src/index.crates.io-6f17d22bba15001f/speech-dispatcher-0.16.0/src/lib.rs:421:25
    |
421 |         c_int_to_result(v)
    |                         ^ not found in this scope

error[E0425]: cannot find value `v` in this scope
   --> /home/esther/.cargo/registry/src/index.crates.io-6f17d22bba15001f/speech-dispatcher-0.16.0/src/lib.rs:429:25
    |
429 |         c_int_to_result(v)
    |                         ^ not found in this scope

error[E0425]: cannot find value `v` in this scope
   --> /home/esther/.cargo/registry/src/index.crates.io-6f17d22bba15001f/speech-dispatcher-0.16.0/src/lib.rs:437:25
    |
437 |         c_int_to_result(v)
    |                         ^ not found in this scope

error[E0081]: discriminant value `1` assigned more than once
   --> /home/esther/.cargo/registry/src/index.crates.io-6f17d22bba15001f/speech-dispatcher-0.16.0/src/lib.rs:100:1
    |
100 | pub enum Punctuation {
    | ^^^^^^^^^^^^^^^^^^^^
...
103 |     Most = SPDPunctuation::SPD_PUNCT_MOST,
    |            ------------------------------ `1` assigned here
104 |     Some = SPDPunctuation::SPD_PUNCT_SOME,
105 |     None = SPDPunctuation::SPD_PUNCT_NONE,
    |            ------------------------------ `1` assigned here

Some errors have detailed explanations: E0081, E0425.
For more information about an error, try `rustc --explain E0081`.
error: could not compile `speech-dispatcher` (lib) due to 5 previous errors
subalterngames commented 1 year ago

Fixed! I had to disable default-features:

[dependencies.tts]
version = "0.25.5"
default-features = false
features = ["speech_dispatcher_0_9"]