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

Documenting some additional prerequisites on Linux. #8

Open
follower opened this issue Feb 17, 2021 · 0 comments
Open

Documenting some additional prerequisites on Linux. #8

follower opened this issue Feb 17, 2021 · 0 comments

Comments

@follower
Copy link

Quick list of prerequisites I seemed to need in order to build hello_world.rs (within a fresh project).

This was a relatively fresh Elementary OS Linux install (based on Ubuntu 18.04) so it's likely clang would be necessary for most wrapper crates so many people would already have it installed,

(In connection with emilk/egui#167 (comment) and https://gitlab.com/RancidBacon/egui-and-tts).

Hope to write up more later but hopefully this might be useful to others as is.

1. libclang1

Needed:

$ pkcon install   libclang1

to avoid:

   Compiling speech-dispatcher-sys v0.5.2
error: failed to run custom build command for `speech-dispatcher-sys v0.5.2`

Caused by:
  process didn't exit successfully: `/home/philip/Projects/rust-related/egui-and-tts/target/debug/build/speech-dispatcher-sys-24c24f7d3c015663/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=speechd

  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\', \'libclang-*.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/philip/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.57.0/src/lib.rs:1975:31

2. libspeechd-dev

Needed:

$ pkcon install libspeechd-dev

to avoid:

$ cargo run
   Compiling speech-dispatcher-sys v0.5.2
error: failed to run custom build command for `speech-dispatcher-sys v0.5.2`

Caused by:
  process didn't exit successfully: `/home/philip/Projects/rust-related/egui-and-tts/target/debug/build/speech-dispatcher-sys-24c24f7d3c015663/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=speechd

  --- stderr
  wrapper.h:1:10: fatal error: 'speech-dispatcher/libspeechd.h' file not found
  wrapper.h:1:10: fatal error: 'speech-dispatcher/libspeechd.h' file not found, err: true
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', /home/philip/.cargo/registry/src/github.com-1ecc6299db9ec823/speech-dispatcher-sys-0.5.2/build.rs:22:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

3. clang

Needed:

$ pkcon install clang

to avoid (probably would solve first issue also):

$ cargo run
   Compiling speech-dispatcher-sys v0.5.2
error: failed to run custom build command for `speech-dispatcher-sys v0.5.2`

Caused by:
  process didn't exit successfully: `/home/philip/Projects/rust-related/egui-and-tts/target/debug/build/speech-dispatcher-sys-24c24f7d3c015663/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=speechd

  --- stderr
  /usr/include/stdio.h:33:10: fatal error: 'stddef.h' file not found
  /usr/include/stdio.h:33:10: fatal error: 'stddef.h' file not found, err: true
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', /home/philip/.cargo/registry/src/github.com-1ecc6299db9ec823/speech-dispatcher-sys-0.5.2/build.rs:22:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

4. env_logger (or removing line)

Needed:

//    env_logger::init();

To avoid:

$ cargo run
   Compiling egui-and-tts v0.1.0 (/home/philip/Projects/rust-related/egui-and-tts)
error[E0433]: failed to resolve: use of undeclared crate or module `env_logger`
  --> src/main.rs:14:5
   |
14 |     env_logger::init();
   |     ^^^^^^^^^^ use of undeclared crate or module `env_logger`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: could not compile `egui-and-tts`

To learn more, run the command again with --verbose.

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

No branches or pull requests

1 participant