-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
There's a race condition when running multiple instances of cargo-zigbuild
(when for example compiling to multiple targets at the same time)
Error: Failed to collect `zig cc` options
Caused by:
Failed to run `zig cc -v` with status exit status: 1: clang version 19.1.7
Target: x86_64-unknown-linux4.19.0-gnu2.31.0
Thread model: posix
InstalledDir: /nix/store/jb7n26fqzkbvqqwz0wm69gx0rm4cw9lg-zig-0.14.1/bin
zig: error: no such file or directory: '/root/.cache/cargo-zigbuild/0.20.0/.intentionally-empty-file.c'
It can happen here:
Lines 686 to 688 in f903aaa
if !empty_file_path.exists() { | |
fs::write(&empty_file_path, "")?; | |
} |
Or potentially here?
Line 695 in f903aaa
fs::remove_file(&empty_file_path).ok(); |
I don't really understand why this is necessary, but I guess one easy way to fix this would be to randomly generate the file name.
andriygm and dupu222
Metadata
Metadata
Assignees
Labels
No labels