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

Unable to build rustc_codegen_spirv with nightly 2023-09-30 #1107

Closed
tmvkrpxl0 opened this issue Dec 11, 2023 · 5 comments
Closed

Unable to build rustc_codegen_spirv with nightly 2023-09-30 #1107

tmvkrpxl0 opened this issue Dec 11, 2023 · 5 comments
Labels
t: bug Something isn't working

Comments

@tmvkrpxl0
Copy link

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"]
  -------------

@tmvkrpxl0 tmvkrpxl0 added the t: bug Something isn't working label Dec 11, 2023
@tmvkrpxl0 tmvkrpxl0 changed the title Unable to build spriv with nightly 2023-09-30 Unable to build rustc_codegen_spirv with nightly 2023-09-30 Dec 11, 2023
@tmvkrpxl0
Copy link
Author

I think this using 2023-05-27 is related
https://github.com/EmbarkStudios/rust-gpu/tree/main/crates/spirv-builder

@LegNeato
Copy link
Contributor

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

@LegNeato
Copy link
Contributor

LegNeato commented Jan 2, 2024

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

@tmvkrpxl0
Copy link
Author

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

@Sp00ph
Copy link

Sp00ph commented Jun 27, 2024

I'm also having all kinds of issues getting spirv-builder to work (among which is the error complaining that I'm using 2023-09-30 instead of 2023-09-27, and when changing to that toolchain, there's other issues with -Zbuild-std), and I'm guessing the documentation for it is still outdated. Is there any up to date guide, or another place to get help with this?

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

3 participants