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

OpenBSD: cargo build --release fails with unresolved imports #31

Open
holsta opened this issue Apr 4, 2024 · 4 comments · May be fixed by #32
Open

OpenBSD: cargo build --release fails with unresolved imports #31

holsta opened this issue Apr 4, 2024 · 4 comments · May be fixed by #32

Comments

@holsta
Copy link

holsta commented Apr 4, 2024

Hi,

I know nothing about Rust, so I will be grateful for any clues on how to proceed here.

$ uname -a
OpenBSD x395.sweet.home 7.5 GENERIC.MP#82 amd64
$ cargo --version
cargo 1.77.0
$ rustc --version
rustc 1.77.0 (aedd173a2 2024-03-17) (built from a source tarball)
$ cargo build --release
[..]
error[E0432]: unresolved imports `backend::MidiInputPort`, `backend::MidiInput`, `backend::MidiInputConnection`, `backend::MidiOutputPort`, `backend::MidiOutput`, `backend::MidiOutputConnection`
  --> /home/holsta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/midir-0.9.1/src/common.rs:5:5
   |
5  |     MidiInputPort as MidiInputPortImpl,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInputPort` in `backend`
6  |     MidiInput as MidiInputImpl,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInput` in `backend`
7  |     MidiInputConnection as MidiInputConnectionImpl,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiInputConnection` in `backend`
8  |     MidiOutputPort as MidiOutputPortImpl,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutputPort` in `backend`
9  |     MidiOutput as MidiOutputImpl,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutput` in `backend`
10 |     MidiOutputConnection as MidiOutputConnectionImpl
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MidiOutputConnection` in `backend`
   |
   = help: consider importing this struct through its public re-export instead:
           MidiInputPort
   = help: consider importing this struct through its public re-export instead:
           MidiInput
   = help: consider importing this struct through its public re-export instead:
           MidiInputConnection
   = help: consider importing this struct through its public re-export instead:
           MidiOutputPort
   = help: consider importing this struct through its public re-export instead:
           MidiOutput
   = help: consider importing this struct through its public re-export instead:
           MidiOutputConnection

For more information about this error, try `rustc --explain E0432`.
error: could not compile `midir` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@subalterngames subalterngames linked a pull request May 4, 2024 that will close this issue
@subalterngames
Copy link
Owner

@holsta See PR. Try this:

  1. Install jack
  2. git checkout midir_bsd
  3. cargo run --release --features jack

@holsta
Copy link
Author

holsta commented May 4, 2024

Thank you for working on this! I get a new error now:

   [...]
   Compiling chrono v0.4.31
   Compiling id3 v1.7.0
error[E0425]: cannot find value `tts` in this scope
   --> /home/holsta/.cargo/git/checkouts/tts-rs-be2f993ab8b6c5ca/a0c6cba/src/lib.rs:357:9
    |
261 | pub struct Tts(Arc<RwLock<Box<dyn Backend>>>);
    | ---------------------------------------------- similarly named tuple struct `Tts` defined here
...
357 |         tts
    |         ^^^ help: a tuple struct with a similar name exists: `Tts`

error[E0282]: type annotations needed for `Result<_, E>`
   --> /home/holsta/.cargo/git/checkouts/tts-rs-be2f993ab8b6c5ca/a0c6cba/src/lib.rs:270:13
    |
270 |         let backend = match backend {
    |             ^^^^^^^
...
310 |             if let Some(id) = backend.0.read().unwrap().id() {
    |                               ------- type must be known at this point
    |
help: consider giving `backend` an explicit type, where the placeholders `_` are specified
    |
270 |         let backend: Result<_, E> = match backend {
    |                    ++++++++++++++

Some errors have detailed explanations: E0282, E0425.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `tts` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Let me know if you need me to do anything else to provide logs.

@subalterngames
Copy link
Owner

Try installing and enabling speech dispatcher.

If that works, or if you get a different compiler error message, please send the steps required to set up speech dispatcher

@subalterngames
Copy link
Owner

@holsta Once you've installed speech dispatcher, you'll need to compile with an additional flag, depending on whether it's version 0.11 or 0.9:

cargo run --release --features jack speech_dispatcher_0_11

cargo run --release --features jack speech_dispatcher_0_9

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

Successfully merging a pull request may close this issue.

2 participants