-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Rust-GPU/spirv-tools-rs
#26Description
Repo
- Have a project that uses cargo-gpu in a build script
- Clear your codgen cache
~/.cache/rust-gpu/codegen/* cargo clippy(NOcargo gpuor anything, just regular clippy)- observe codegen backend being build without C++ dependency, but not fail at build time
- observe fail when loading the codegen backend as an
*.so
error: failed to run
rustcto 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
- VERY IMPORTANT delete your
~/.cache/rust-gpu/codegenfolder, it's containing bad builds - use the branch from fix spirv-tools skipping C++ compile on install #141
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels