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

Following Getting Started hits error #667

Closed
alecmce opened this issue Jun 11, 2021 · 2 comments
Closed

Following Getting Started hits error #667

alecmce opened this issue Jun 11, 2021 · 2 comments
Labels
t: bug Something isn't working

Comments

@alecmce
Copy link

alecmce commented Jun 11, 2021

Expected Behaviour

Following the getting started build from https://embarkstudios.github.io/rust-gpu/book/building-rust-gpu.html, I expected to see the build getting started project.

Example & Steps To Reproduce

  1. I followed the getting started guide here: https://embarkstudios.github.io/rust-gpu/book/building-rust-gpu.html
  2. I didn't have rust installed (yes, this was my first time), so I ran brew install rust (and brew install spirv-tools)
  3. I then ran cargo run --bin example-runner-wgpu
  4. It crashed with the error:
error[E0277]: `[&str; 5]` is not an iterator
  --> examples/runners/wgpu/build.rs:30:15
   |
30 |           .args([
   |  _______________^
31 | |             "run",
32 | |             "--release",
33 | |             "-p",
34 | |             "example-runner-wgpu-builder",
35 | |             "--target-dir",
36 | |         ])
   | |_________^ expected an implementor of trait `IntoIterator`
   |
   = note: the trait bound `[&str; 5]: IntoIterator` is not satisfied
   = note: required because of the requirements on the impl of `IntoIterator` for `[&str; 5]`
help: consider borrowing here
   |
30 |         .args(&[
31 |             "run",
32 |             "--release",
33 |             "-p",
34 |             "example-runner-wgpu-builder",
35 |             "--target-dir",
 ...

System Info

Mac OSX 11.4
rustc -V: rustc 1.52.1
spir-val --version: comand not found: spir-val -- not sure how to get that going?

Perhaps it's because I don't have my machine configured properly yet? ... but I also see no way of working out how to configure it.

@alecmce alecmce added the t: bug Something isn't working label Jun 11, 2021
@DJMcNab
Copy link
Contributor

DJMcNab commented Jun 11, 2021

I suspect the root cause issue is brew install rust.

rustc -V giving rustc 1.52.1 suggests that your setup is ignoring the rust-toolchain file at the root, presumably because you are not using rustup.

However, that being said, IntoIterator for [&str; 5] should be present in that version of rustc, so something else strange is afoot - that is, the rustc -V line is extremely confusing

I'd recommend installing rustup from https://rustup.rs/ and trying again.

@alecmce
Copy link
Author

alecmce commented Jun 11, 2021

Yes, that does it. Curious that homebrew borks the install. Oh well, thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants