Skip to content

Improve Error Message When Missing SPIR-V tools #51

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

Closed
XAMPPRocky opened this issue Oct 13, 2020 · 2 comments · Fixed by #58
Closed

Improve Error Message When Missing SPIR-V tools #51

XAMPPRocky opened this issue Oct 13, 2020 · 2 comments · Fixed by #58

Comments

@XAMPPRocky
Copy link
Member

Currently if you're missing the SPIR-V tools it gives you a No such file error along with an ICE. Both of these error messages don't really tell you how to solve the issue, and the ICE is a bit misleading since it's not a bug in Rust. It would be nice if it could exit gracefully with a message asking to install SPIR-V tools.

  thread 'rustc' panicked at 'spirv-val failed to execute: Os { code: 2, kind: NotFound, message: "No such file or directory" }', rustc_codegen_spirv/src/link.rs:158:25
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  error: internal compiler error: unexpected panic

  note: the compiler unexpectedly panicked. this is a bug.

  note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

  note: rustc 1.49.0-nightly (8dae8cdcc 2020-10-12) running on x86_64-apple-darwin

  note: compiler flags: -Z unstable-options -Z codegen-backend=librustc_codegen_spirv.dylib -C opt-level=3 -C embed-bitcode=no --crate-type dylib

  note: some of the compiler flags provided by cargo are hidden

  error: could not compile `example-shader`

  To learn more, run the command again with --verbose.
  Error: BuildFailed
@khyperia
Copy link
Contributor

Speaking of, the compiler is very much a WIP, and there are going to be a lot of ICEs, especially before #43 is complete. Is there a way to disable the standard ICE message, so we don't spam the rust-lang folks with our garbage? (not a question for @XAMPPRocky, just noting in general)

@repi
Copy link
Contributor

repi commented Oct 13, 2020

Ah you mean something like if we build a binary of this and distribute it, and we have caused the ICE, that should be reported to this repo and not to the Rust one.

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.

3 participants