You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some shaders that used to compile on revision 2aa4d4f8a8ba73103501562cfca17b8163e5a887, On revision 08f98a7335ae7e2ac4ec9423a9b1acf9270f2a65 they no longer compile with this error.
Caused by:
process didn't exit successfully: `/home/makogan/.rustup/toolchains/nightly-2025-06-30-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -Zcodegen-backend=/home/makogan/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu_+08f98a73/librustc_codegen_spirv.so -Zbinary-dep-depinfo -Csymbol-mangling-version=v0 '-Zcrate-attr=feature(register_tool)' '-Zcrate-attr=register_tool(rust_gpu)' -Coverflow-checks=off -Cdebug-assertions=off -Zinline-mir=off -Zmir-enable-passes=-GVN -Zshare-generics=off '-Cllvm-args=--module-output=multiple --spirv-metadata=full' --target /home/makogan/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu_+08f98a73/target-specs/spirv-unknown-vulkan1.2.json --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg -Wwarnings` (exit status: 1)
--- stderr
error: error loading target specification: `unknown` os can only be used on particular targets; use `none` for bare-metal targets
|
= help: run `rustc --print target-list` for a list of built-in targets
[2026-01-17T19:38:56Z ERROR cargo_gpu] build failed
Error: build failed
Based on the error it seems like some type has been changed to use an option and it's not receiving the expected option.
That error is caused by incorrect "target spec" aka target specification json files. This is something you as an end user shouldn't have to worry about, as spirv-builder and cargo-gpu will take care of that for you.
Which begs the question: are you using cargo-gpu via the cmdline, cargo-gpu in a build script or spirv-builder directly? And if cargo-gpu, which version?
We recently changed target spec handling, but it shouldn't have broken anything eg. for an older cargo-gpu version until we update target specs again: #484
Both suggested working revs are before this PR was merged.
That error is caused by incorrect "target spec" aka target specification json files. This is something you as an end user shouldn't have to worry about, as spirv-builder and cargo-gpu will take care of that for you.
Which begs the question: are you using cargo-gpu via the cmdline, cargo-gpu in a build script or spirv-builder directly? And if cargo-gpu, which version?
I am invoking cargo gpu through the command interface of a rust program. I am using cargo-gpu 0.1.0
Sorry, but I need the rev of cargo-gpu via cargo gpu show commitsh, cause it's build from the repo where every single one is version 0.1.0. And I don't think we have functionality to print the rev of the build. You can probably try to reinstall cargo-gpu from main and that may just fix it.
No that's it: you need to install the new version of cargo-gpu.
I've swapped the "support direction":
An old version of cargo-gpu can't support rust-gpu versions after target-specs v3 cause it'll misinterpret the dependency structure and think it's like a rev from shortly after 0.9, giving it the wrong target specs.
Instead, we made sure the newest version of cargo-gpu still supports building older rust-gpu versions, so people upgrading cargo-gpu can still build older projects and gradually update.
(Apart from like a handful of revs just prior of 2025 edition, all contained within one PR, so there really shouldn't be anybody using those. Like you've more likely to run into issues with cargo update not respecting msrv yet in those old versions.)
Activity
[-](my bug report)[/-][+]Compilation breaks on latest revision[/+]Makogan commentedon Jan 17, 2026
A more recent commit that I can verify compiles is
e97524f6b4816056b3edaa70c3e0e0c656392c05Firestar99 commentedon Jan 17, 2026
That error is caused by incorrect "target spec" aka target specification json files. This is something you as an end user shouldn't have to worry about, as spirv-builder and cargo-gpu will take care of that for you.
Which begs the question: are you using cargo-gpu via the cmdline, cargo-gpu in a build script or spirv-builder directly? And if cargo-gpu, which version?
Firestar99 commentedon Jan 17, 2026
We recently changed target spec handling, but it shouldn't have broken anything eg. for an older cargo-gpu version until we update target specs again: #484
Both suggested working revs are before this PR was merged.
Makogan commentedon Jan 19, 2026
I am invoking cargo gpu through the command interface of a rust program. I am using
cargo-gpu 0.1.0Firestar99 commentedon Jan 19, 2026
Sorry, but I need the rev of cargo-gpu via
cargo gpu show commitsh, cause it's build from the repo where every single one is version0.1.0.And I don't think we have functionality to print the rev of the build.You can probably try to reinstall cargo-gpu from main and that may just fix it.Firestar99 commentedon Jan 19, 2026
No that's it: you need to install the new version of cargo-gpu.
I've swapped the "support direction":
An old version of cargo-gpu can't support rust-gpu versions after target-specs v3 cause it'll misinterpret the dependency structure and think it's like a rev from shortly after 0.9, giving it the wrong target specs.
Instead, we made sure the newest version of cargo-gpu still supports building older rust-gpu versions, so people upgrading cargo-gpu can still build older projects and gradually update.
(Apart from like a handful of revs just prior of 2025 edition, all contained within one PR, so there really shouldn't be anybody using those. Like you've more likely to run into issues with cargo update not respecting msrv yet in those old versions.)