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
Attempting to build a package that depends on libz-sys 1.1.7 with crane results in the following error:
thread 'main' panicked at /nix/store/46npxq26b5hy0q80hclj8a9cx3qzfp1v-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/libz-sys-1.1.17/build.rs:150:61:
called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
The most recent version of libz-sys introduced some lines to the build script that do fs::copy($path_in_src, $path_in_out_dir). Looking at the build log, it appears that the build script is being run twice: first as part of cargo check and then as part of cargo build. This looks very similar to the situation described here, where the first fs::copy is preserving the -r permissions on the file in the src directory, preventing the second fs::copy from overwriting the output file.
Even if I force Cargo to build a lock file with the yanked version, adding libz as a build input makes the build succeed so I suspect this is an issue with that particular release:
I'm going to resolve this as I don't think there is anything we can do here (plus there is a fix in the works for libz-sys here: rust-lang/libz-sys#195) but feel free to reopen if I've gotten something wrong!
Describe the bug
Attempting to build a package that depends on
libz-sys
1.1.7 with crane results in the following error:The most recent version of
libz-sys
introduced some lines to the build script that dofs::copy($path_in_src, $path_in_out_dir)
. Looking at the build log, it appears that the build script is being run twice: first as part ofcargo check
and then as part ofcargo build
. This looks very similar to the situation described here, where the firstfs::copy
is preserving the-r
permissions on the file in the src directory, preventing the secondfs::copy
from overwriting the output file.Reproduction
Cargo.toml
:flake.nix
:nix build .
Full log with CARGO_TERM_VERBOSE=true:
The text was updated successfully, but these errors were encountered: