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

First cargo run in the book should be *after* dependencies #2773

Closed
l0b0 opened this issue Sep 5, 2021 · 2 comments
Closed

First cargo run in the book should be *after* dependencies #2773

l0b0 opened this issue Sep 5, 2021 · 2 comments
Labels
C-Docs An addition or correction to our documentation

Comments

@l0b0
Copy link

l0b0 commented Sep 5, 2021

How can Bevy's documentation be improved?

https://bevyengine.org/learn/book/getting-started/ suggests trying to run an example game before having mentioned the dependencies. As someone new to Bevy I ran into a relatively cryptic error message when trying to follow the Getting Started section:

$ cargo run --example breakout
   Compiling syn v1.0.65
   Compiling libm v0.2.1
   Compiling lock_api v0.4.5
   Compiling hexasphere v3.4.0
   Compiling khronos-egl v3.0.2
   Compiling num-traits v0.2.14
   Compiling ash v0.31.0
   Compiling alsa-sys v0.3.1
   Compiling libudev-sys v0.1.4
   Compiling wgpu-core v0.7.1
   Compiling mio v0.7.13
   Compiling net2 v0.2.37
   Compiling iovec v0.1.4
   Compiling gpu-alloc-types v0.2.0
error: failed to run custom build command for `alsa-sys v0.3.1`

Caused by:
  process didn't exit successfully: `/home/username/dev/bevy/target/debug/build/alsa-sys-ec09432a62eb389c/build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=ALSA_STATIC
  cargo:rerun-if-env-changed=ALSA_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'Failed to run `"pkg-config" "--libs" "--cflags" "alsa"`: No such file or directory (os error 2)', /home/username/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/alsa-sys-0.3.1/build.rs:13:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

A quick search found #330, which was fixed with some very nice documentation (even for NixOS, thanks!). However, this documentation should be referenced before asking the user to compile an example, to avoid friction.

@l0b0 l0b0 added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Sep 5, 2021
@alice-i-cecile alice-i-cecile removed the S-Needs-Triage This issue needs to be labelled label Sep 5, 2021
@malachid
Copy link

I just ran into this as well.

I think the root cause is the wording on this page:

If you want to dive in immediately and you already have a working Rust setup, feel free to follow this "quick start" guide. Otherwise, move on to the next page.

I have a working Rust setup having worked through the Rust examples and the Hands-on Rust book. I do not, however, have a working Bevy install. I think changing the above wording to "a working Bevy setup" would clarify the actual expectations.

@alice-i-cecile
Copy link
Member

This is addressed on the new-book branch, so I'm going to close this out :) Should see a release for 0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation
Projects
None yet
Development

No branches or pull requests

3 participants