Rust-GPU / Rust-GPU/rust-gpu

error: building from local source while `REQUIRED_RUST_TOOLCHAIN` doesn't match `rust-toolchain.toml`.

Open
#172 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
3.4k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Expected Behaviour

Build cargo run --bin example-runner-wgpu or cargo run --bin example-runner-ash successfully on macos.

Example & Steps To Reproduce
  1. Clone the repo on macos.
  2. Install rust environment etc.
  3. Run build command cargo run --bin example-runner-wgpu

System Info

  • Rust: [nightly-2024-04]
  • OS: [macOS 15.1.1]
  • GPU: [Apple M1 Max]
  • SPIR-V: [SPIRV-Tools v2024.4 v2024.4.rc1-0-g6dcc7e35, Target: SPIR-V 1.6]

Backtrace

Summary:

Error Cause: The rustc_codegen_spirv build script requires a specific Rust toolchain version, which does not match the version specified in rust-toolchain.toml.
Standard Output: A notification to rerun the build if the environment variable RUSTGPU_SKIP_TOOLCHAIN_CHECK changes.
Standard Error: Clearly states the toolchain mismatch as the cause of the build failure.

   Compiling internal-iterator v0.2.3
   Compiling pin-project-lite v0.2.15
   Compiling profiling v1.0.16
   Compiling same-file v1.0.6
   Compiling futures-task v0.3.31
   Compiling futures-io v0.3.31
   Compiling pin-utils v0.1.0
   Compiling longest-increasing-subsequence v0.1.0
   Compiling spirv-std-types v0.9.0 (/Users/nilg/Workspace/Code/Rust/rust-gpu/crates/spirv-std/shared)
   Compiling litrs v0.4.1
   Compiling futures-util v0.3.31
   Compiling spirv-std-macros v0.9.0 (/Users/nilg/Workspace/Code/Rust/rust-gpu/crates/spirv-std/macros)
   Compiling walkdir v2.5.0
   Compiling document-features v0.2.10
   Compiling crossbeam-channel v0.5.13
   Compiling block2 v0.3.0
   Compiling hashbrown v0.11.2
   Compiling smallvec v1.13.2
error: failed to run custom build command for `rustc_codegen_spirv v0.9.0 (/Users/nilg/Workspace/Code/Rust/rust-gpu/crates/rustc_codegen_spirv)`

Caused by:
  process didn't exit successfully: `/Users/nilg/Workspace/Code/Rust/rust-gpu/target/debug/build/rustc_codegen_spirv-901cad1f3df6d18a/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=RUSTGPU_SKIP_TOOLCHAIN_CHECK

  --- stderr
  error: building from local source while `REQUIRED_RUST_TOOLCHAIN` (defined in `crates/rustc_codegen_spirv/build.rs`) doesn't match `/Users/nilg/Workspace/Code/Rust/rust-gpu/rust-toolchain.toml`
warning: build failed, waiting for other jobs to finish...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with crates/rustc_codegen_spirv/build.rs, especially REQUIRED_RUST_TOOLCHAIN, and compare it with rust-toolchain.toml. Reproduce the issue by running cargo run --bin example-runner-wgpu or cargo run --bin example-runner-ash on macOS, then verify that the local build completes without the toolchain mismatch error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.