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
{{ message }}
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
I have CARGO_TARGET_DIR set to ~/.cache/cargo/target and got the following error:
error: failed to run custom build command for `ab-proof-of-space-gpu v0.1.0 (...-gpu)`
Caused by:
process didn't exit successfully: `~/.cache/cargo/target/debug/build/ab-proof-of-space-gpu-357b2b9096a9b5d9/build-script-build` (exit status: 1)
--- stdout
🦀 Compiling `rustc_codegen_spirv` from source https://github.com/Rust-GPU/rust-gpu+e6d017d5
--- stderr
Updating git repository `https://github.com/Rust-GPU/rust-gpu`
Updating crates.io index
Locking 119 packages to latest compatible versions
Compiling rustc_codegen_spirv_dummy v0.1.0 (~/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e6d017d5)
Finished `release` profile [optimized] target(s) in 0.92s
[2025-06-25T10:09:01Z ERROR cargo_gpu::install] could not find ~/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e6d017d5/target/release/librustc_codegen_spirv.so
Error: `rustc_codegen_spirv` build failed
BTW, it was hard to debug due to the fact that logging is only happening when configured and I didn't have it in my build script initially, so I had no idea what failed and why.
Once I did, it was clear that the code thinks it is building in ~/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e6d017d5 but because I set CARGO_TARGET_DIR environment variable, it was actually building in a different place.
I think the solution here is to set CARGO_TARGET_DIR to desired value like ~/.cache/rust-gpu/codegen/https___github_com_Rust-GPU_rust-gpu+e6d017d5 explicitly before building.
I think the solution here is to set CARGO_TARGET_DIR...
I'll look into this the coming days. We'll probably also need to change Spirvbuilder to be resilient against that env var. Actually, spirv-builder isn't affected and will happily use ${CARGO_TARGET_DIR}/spirv-builder as it's target dir.
Activity
Firestar99 commentedon Jun 25, 2025
I'll look into this the coming days.
We'll probably also need to change Spirvbuilder to be resilient against that env var.Actually, spirv-builder isn't affected and will happily use${CARGO_TARGET_DIR}/spirv-builderas it's target dir.