Skip to content

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

Open
@nilanjan

Description

@nilanjan

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions