whitebox-tools
whitebox-tools copied to clipboard
Cargo.lock and Cargo.toml are not in sync so build fails in a chroot
Operating System
- Arch Linux 64-bit
Dependencies
- Rust 1.59.0
- Python 3.10.2
- tk 8.16.12
Problem
When trying to build and pre-fetch the libraries with:
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
I get the error that the lock file /build/whitebox-tools/src/whitebox-tools-2.0.0/Cargo.lock needs to be updated
I can run cargo update before running cargo fetch but that means that the build in Arch Linux is un-reproducible being built in a chroot.
If building a VCS package for an upstream source project that does not keep its Cargo.lock file in sync with Cargo.toml between release cycles, add cargo update before running cargo fetch. All other aspects of the build should work as documented here, although the result will not be a fully reproducible build because the dependencies will be resolved at build time.