cargo vendor breakage on nixos 20.09 #112

Closed
opened 2020-10-08 09:17:32 +08:00 by sb10q · 2 comments
  • hash has changed
  • when putting the new hash, some crates are missing from the vendored sources, and build fails
  • also affects zynq-rs
* hash has changed * when putting the new hash, some crates are missing from the vendored sources, and build fails * also affects zynq-rs
Poster
Owner

Example error message:

Vendoring volatile-register v0.2.0 (/build/zynq-rs/cargo-home.R33/registry/src/github.com-1ecc6299db9ec823/volatile-register-0.2.0) to experiments-vendor.tar.gz/volatile-register
To use vendored sources, add this to your .cargo/config for this project:

installing
hash mismatch in fixed-output derivation '/nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz':
  wanted: sha256:1f2psa1g41pl2j8n60hhik2s2pqdfjhr5capimvajf81kxrnn2ck
  got:    sha256:0ma6lg460agiyar04m6symnbxymf503h4r6a46ppf3rc0cbwc7z4
cannot build derivation '/nix/store/3s6xw6gkp8bpq15swlwnbfjavjyzvrvy-experiments.drv': 1 dependencies couldn't be built
error: build of '/nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv', '/nix/store/3s6xw6gkp8bpq15swlwnbfjavjyzvrvy-experiments.drv', '/nix/store/9k0y820frarfb9rccy25my55372gafc5-experiments.drv', '/nix/store/jk4pjvl8wkcw5888g4r6fr0wwwkqkgph-szl.drv', '/nix/store/xs4x8lvikr1kylhp9w9wmv3aalhi9zn7-experiments.drv' failed


sb@vulcan ~/zynq-rs (master) [102]> vi default.nix # fixing hash


sb@vulcan ~/zynq-rs (master)> nix-build
these derivations will be built:
  /nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv
  /nix/store/yxk8k84w6vad8mr2bpl7l74cg5ch4h3l-binutils-arm-none-eabi-2.30.drv
  /nix/store/zn7japwdzr0rkflq8b3whh7vryakjlbl-gcc-arm-none-eabi-9.1.0.drv
  /nix/store/fdv1fvd0wq7z48g5rh24ihxsmbl9gzxs-newlib-3.1.0.drv
  /nix/store/zxsbp07dwl0k3h8v0gb476gs94900k3n-binutils-arm-none-eabi-2.30.drv
  /nix/store/pfk47z1ahj3m2w35s5hb6g8r1gad4v37-gcc-arm-none-eabi-9.1.0.drv
  /nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv
  /nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv
  /nix/store/diwnhdicl2ccxm0h97r5wwbab1pmcfi0-szl-vendor.tar.gz.drv
  /nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv
  /nix/store/zm9am23p5wb6gz2d8nhsvw5fjq4bpb1b-szl.drv
building '/nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv'...
building '/nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv'...
building '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv'...
building '/nix/store/diwnhdicl2ccxm0h97r5wwbab1pmcfi0-szl-vendor.tar.gz.drv'...
building '/nix/store/yxk8k84w6vad8mr2bpl7l74cg5ch4h3l-binutils-arm-none-eabi-2.30.drv'...
unpacking sources
unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs
unpacking sources
unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs
unpacking sources
unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs
unpacking sources
unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs
source root is zynq-rs
source root is zynq-rs
unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz
source root is zynq-rs
unpacking sources
unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz
unpacking source archive /nix/store/16bz7vzc97nsxrrrwi22fk3w31znd6zr-binutils-2.30.tar.bz2
unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz
patching sources
Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock
configuring
building
/build/zynq-rs/experiments /build/zynq-rs
patching sources
Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock
configuring
source root is zynq-rs
building
/build/zynq-rs/experiments /build/zynq-rs
patching sources
Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock
configuring
building
/build/zynq-rs/experiments /build/zynq-rs
patching sources
building
    Updating crates.io index
WARNING: There is no root package to read the cargo-xbuild config from.
WARNING: There is no root package to read the cargo-xbuild config from.
WARNING: There is no root package to read the cargo-xbuild config from.
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `rustc-std-workspace-core`

Caused by:
  Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core

Caused by:
  failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildwHEldQ/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `rustc-std-workspace-core`

Caused by:
  Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core

Caused by:
  failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to load source for dependency `rustc-std-workspace-core`

Caused by:
  Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core

Caused by:
  failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildMoF3Hc/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildeW931Z/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
builder for '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv' failed with exit code 1
error: build of '/nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv', '/nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv', '/nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv', '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv', '/nix/store/zm9am23p5wb6gz2d8nhsvw5fjq4bpb1b-szl.drv' failed
Example error message: ```text Vendoring volatile-register v0.2.0 (/build/zynq-rs/cargo-home.R33/registry/src/github.com-1ecc6299db9ec823/volatile-register-0.2.0) to experiments-vendor.tar.gz/volatile-register To use vendored sources, add this to your .cargo/config for this project: installing hash mismatch in fixed-output derivation '/nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz': wanted: sha256:1f2psa1g41pl2j8n60hhik2s2pqdfjhr5capimvajf81kxrnn2ck got: sha256:0ma6lg460agiyar04m6symnbxymf503h4r6a46ppf3rc0cbwc7z4 cannot build derivation '/nix/store/3s6xw6gkp8bpq15swlwnbfjavjyzvrvy-experiments.drv': 1 dependencies couldn't be built error: build of '/nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv', '/nix/store/3s6xw6gkp8bpq15swlwnbfjavjyzvrvy-experiments.drv', '/nix/store/9k0y820frarfb9rccy25my55372gafc5-experiments.drv', '/nix/store/jk4pjvl8wkcw5888g4r6fr0wwwkqkgph-szl.drv', '/nix/store/xs4x8lvikr1kylhp9w9wmv3aalhi9zn7-experiments.drv' failed sb@vulcan ~/zynq-rs (master) [102]> vi default.nix # fixing hash sb@vulcan ~/zynq-rs (master)> nix-build these derivations will be built: /nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv /nix/store/yxk8k84w6vad8mr2bpl7l74cg5ch4h3l-binutils-arm-none-eabi-2.30.drv /nix/store/zn7japwdzr0rkflq8b3whh7vryakjlbl-gcc-arm-none-eabi-9.1.0.drv /nix/store/fdv1fvd0wq7z48g5rh24ihxsmbl9gzxs-newlib-3.1.0.drv /nix/store/zxsbp07dwl0k3h8v0gb476gs94900k3n-binutils-arm-none-eabi-2.30.drv /nix/store/pfk47z1ahj3m2w35s5hb6g8r1gad4v37-gcc-arm-none-eabi-9.1.0.drv /nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv /nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv /nix/store/diwnhdicl2ccxm0h97r5wwbab1pmcfi0-szl-vendor.tar.gz.drv /nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv /nix/store/zm9am23p5wb6gz2d8nhsvw5fjq4bpb1b-szl.drv building '/nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv'... building '/nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv'... building '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv'... building '/nix/store/diwnhdicl2ccxm0h97r5wwbab1pmcfi0-szl-vendor.tar.gz.drv'... building '/nix/store/yxk8k84w6vad8mr2bpl7l74cg5ch4h3l-binutils-arm-none-eabi-2.30.drv'... unpacking sources unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs unpacking sources unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs unpacking sources unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs unpacking sources unpacking source archive /nix/store/h4k84pvnkb15zi7nn22cz6gdwx477vk1-zynq-rs source root is zynq-rs source root is zynq-rs unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz source root is zynq-rs unpacking sources unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz unpacking source archive /nix/store/16bz7vzc97nsxrrrwi22fk3w31znd6zr-binutils-2.30.tar.bz2 unpacking source archive /nix/store/b9gz49sx64wf6y77mqi6b0mg7j7820hf-experiments-vendor.tar.gz patching sources Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock configuring building /build/zynq-rs/experiments /build/zynq-rs patching sources Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock configuring source root is zynq-rs building /build/zynq-rs/experiments /build/zynq-rs patching sources Validating consistency between /build/zynq-rs/Cargo.lock and /build/experiments-vendor.tar.gz/Cargo.lock configuring building /build/zynq-rs/experiments /build/zynq-rs patching sources building Updating crates.io index WARNING: There is no root package to read the cargo-xbuild config from. WARNING: There is no root package to read the cargo-xbuild config from. WARNING: There is no root package to read the cargo-xbuild config from. error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index` Caused by: failed to load source for dependency `rustc-std-workspace-core` Caused by: Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core Caused by: failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml` Caused by: No such file or directory (os error 2) error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildwHEldQ/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101) note: run with `RUST_BACKTRACE=1` for a backtrace error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index` Caused by: failed to load source for dependency `rustc-std-workspace-core` Caused by: Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core Caused by: failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml` Caused by: No such file or directory (os error 2) error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index` Caused by: failed to load source for dependency `rustc-std-workspace-core` Caused by: Unable to update /nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core Caused by: failed to read `/nix/store/yfdvz7af49nphh2wr4j3m1r75583132a-rust-5ef299e/src/rustc-std-workspace-core/Cargo.toml` Caused by: No such file or directory (os error 2) error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildMoF3Hc/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101) note: run with `RUST_BACKTRACE=1` for a backtrace error: `"/nix/store/w5klmdpqshkwnvjr5n0lmy5d3cfd0pra-rust/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/build/cargo-xbuildeW931Z/Cargo.toml" "--target" "/build/zynq-rs/armv7-none-eabihf.json" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101) note: run with `RUST_BACKTRACE=1` for a backtrace builder for '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv' failed with exit code 1 error: build of '/nix/store/0lk9jhdymg7yb3xdwhj4bdi8y63i27x6-experiments.drv', '/nix/store/2n48dg4cpczzbyfslcbl4hrwrwwg7iy5-zc706-fsbl.drv', '/nix/store/99ch106pips3d9x72cbihbn1s5m6pqkm-experiments.drv', '/nix/store/mw7ap457ijl6bandls8z02xcmpwrlc5a-experiments.drv', '/nix/store/zm9am23p5wb6gz2d8nhsvw5fjq4bpb1b-szl.drv' failed ```
Poster
Owner

fixed

fixed
sb10q closed this issue 2020-10-13 23:57:28 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#112
There is no content yet.