EmbarkStudios / rust-gpu

๐Ÿ‰ Making Rust a first-class language and ecosystem for GPU shaders ๐Ÿšง

Home Page:https://shader.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build rustc_codegen_spirv with nightly 2023-09-30

tmvkrpxl0 opened this issue ยท comments

Expected Behaviour

I expected it to build without issue on 2023-09-30

Example & Steps To Reproduce

rustc_codegen_spirv fails to build because I'm using nightly 2023-09-30 instead of 2023-05-27.
Reviewing the commit history I think I'm using correct nightly version.

  1. Clone this repo: https://codeberg.org/tmvkrpxl0/voxelray
  2. run cargo build
  3. it fails

System Info

  • Rust: rustc 1.74.0-nightly (8ce4540bd 2023-09-29) (I don't know why it says 09-29 but commit hash is indeed correct)
  • OS: KDE Neon 5.27
  • GPU: Radeon 4500U
  • SPIR-V: SPIRV-Tools v2022.2-dev unknown hash, 2022-02-16T16:37:15

Backtrace

Backtrace

error: failed to run custom build command for `rustc_codegen_spirv v0.9.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
  process didn't exit successfully: `/home/tmvkrpxl0/CLionProjects/voxelray/target/debug/build/rustc_codegen_spirv-49de613843eff39a/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=RUSTGPU_SKIP_TOOLCHAIN_CHECK
  --- stderr
  error: wrong toolchain detected (found commit hash `8ce4540bd6fe7d58d4bc05f1b137d61937d3cf72`, expected `1a5f8bce74ee432f7cc3aa131bc3d6920e06de10`).
  Make sure your `rust-toolchain.toml` file contains the following:
  -------------
  [toolchain]
  channel = "nightly-2023-05-27"
  components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
  -------------

FWIW following your steps rust-gpu seems to work but I get the following error:

error: `#[panic_handler]` function required, but not found

error: language item required, but not found: `eh_personality`
  |
  = note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
  = help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`

error: could not compile `shader` (lib) due to 2 previous errors

You also might want to check out #1109 if you want a newer nightly.

Turns out the doc was outdated and People in discord helped me out.