Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

spirv-tools 0.13.1 broke cargo-gpu install #140

@Firestar99

Description

@Firestar99

Repo

  1. Have a project that uses cargo-gpu in a build script
  2. Clear your codgen cache ~/.cache/rust-gpu/codegen/*
  3. cargo clippy (NO cargo gpu or anything, just regular clippy)
  4. observe codegen backend being build without C++ dependency, but not fail at build time
  5. observe fail when loading the codegen backend as an *.so

error: failed to run rustc to learn about target-specific information
[...] undefined symbol: spvValidate

Full error

cargo::warning=error: failed to run `rustc` to learn about target-specific information
  cargo::warning=
  cargo::warning=Caused by:
  cargo::warning=  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-2025-06-30-x86_64-unknown-linux-gnu/bin/clippy-driver /home/runner/.rustup/toolchains/nightly-2025-06-30-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -Zcodegen-backend=/home/runner/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e7e447a9/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=--spirv-metadata=name-variables -Ctarget-feature=+GroupNonUniformArithmetic,+GroupNonUniformBallot,+GroupNonUniformShuffle --target /home/runner/work/abundance/abundance/target/debug/build/ab-proof-of-space-gpu-72a58becdd113ae6/out/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)
  cargo::warning=  --- stderr
  cargo::warning=  error: couldn't load codegen backend /home/runner/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e7e447a9/librustc_codegen_spirv.so: undefined symbol: spvValidate
  cargo::warning=

see https://github.com/nazar-pc/abundance/actions/runs/21952451102/job/63474350343

@fee1-dead just FYI, I'll fix it cause this is a weird interaction between cargo-gpu and spirv-tools and should be fixed on cargo-gpu's side IMO.

Workaround

  1. VERY IMPORTANT delete your ~/.cache/rust-gpu/codegen folder, it's containing bad builds
  2. use the branch from fix spirv-tools skipping C++ compile on install #141

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions