JuliaPackaging / BinaryBuilderBase.jl

https://juliapackaging.github.io/BinaryBuilderBase.jl/stable
MIT License
11 stars 31 forks source link

Tree Hash Mismatch error with artifact install #379

Open jd-foster opened 3 months ago

jd-foster commented 3 months ago

Environment:

  [12aac903] BinaryBuilder v0.5.8

Command line Invocation:

$JULIAUP_PATH/julia +1.7 --color=yes --project=~/julia/envs/build --startup-file=no build_tarballs.jl --debug --verbose x86_64-w64-mingw32

I'm getting error messages of this type when missing a shard:

 Downloading artifact: PlatformSupport-x86_64-w64-mingw32.v2023.6.10.x86_64-linux-musl.unpacked
[ Info: Unpacking /var/folders/yz/pmmqjrk509q_6ny0yjys606r00_2rz/T/jl_K1Ni5u-download.gz into /
  Downloaded artifact: PlatformSupport-x86_64-w64-mingw32.v2023.6.10.x86_64-linux-musl.unpacked
 Downloading artifact: GCCBootstrap-x86_64-w64-mingw32.v11.1.0.x86_64-linux-musl.unpacked
[ Info: Unpacking /var/folders/yz/pmmqjrk509q_6ny0yjys606r00_2rz/T/jl_yclWiQ-download.gz into /Users/~/.julia/artifacts/jl_5HrQmP...
┌ Error: Tree Hash Mismatch!
│   Expected git-tree-sha1:   0be19c0bf53b6b5374ac33407c799c934b7a13c1
│   Calculated git-tree-sha1: e7b0e6e45dd1a5e90c50c6e0c15fa8e953c18359
└ @ Pkg.Artifacts /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.
  Downloaded artifact: GCCBootstrap-x86_64-w64-mingw32.v11.1.0.x86_64-linux-musl.unpacked
 Downloading artifact: GCCBootstrap-x86_64-w64-mingw32.v11.1.0.x86_64-linux-musl.unpacked
[ Info: No hash cache found
[ Info: Calculated hash 1f2cf768e2f1b9a6b27245717e275b51403b797856eb0d22ea7271878769dbb4 for file /var/folders/yz/pmmqjrk509q_6ny0yjys606r00_2rz/T/jl_Nwjk2x-download.gz
[ Info: Unpacking /var/folders/yz/pmmqjrk509q_6ny0yjys606r00_2rz/T/jl_Nwjk2x-download.gz into /Users/~/.julia/artifacts/jl_SXOVs5...
┌ Error: Tree Hash Mismatch!
│   Expected git-tree-sha1:   0be19c0bf53b6b5374ac33407c799c934b7a13c1
│   Calculated git-tree-sha1: 482b8d411e5c74f471fd127ba582258579e86dd8
└ @ Pkg.Artifacts /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.
  Downloaded artifact: GCCBootstrap-x86_64-w64-mingw32.v11.1.0.x86_64-linux-musl.unpacked
ERROR: LoadError: Unable to automatically install 'GCCBootstrap-x86_64-w64-mingw32.v11.1.0.x86_64-linux-musl.unpacked' from '/Users/~/.julia/packages/BinaryBuilderBase/tGUXK/Artifacts.toml'

Note that this seems occur downloading any missing shard not on the system.

I can overwrite the git-tree-sha1 in BinaryBuilderBase/tGUXK/Artifacts.toml to get it running, i.e I can resolve by manually overwriting with the Calculated git-tree-sha1 value in the BinaryBuilderBase Artifacts.toml, but obviously not ideal. Thanks.

Edit: perhaps to do with macOS creating .DS_Store files?

julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
eschnett commented 3 months ago

I received a similar error a while back when I ran out of disk space. The artifacts can require many Gigabytes of disk space. Could it be that either your home or your tmp directory are full? Or have been full recently, and something that was downloaded when is now broken?

If you post your build_tarballs.jl then I can try to build it locally (Intel-based Apple system) to see whether I can reproduce this.

jd-foster commented 3 months ago

I'm trying to get https://github.com/JuliaPackaging/Yggdrasil/pull/8671 building. I tried to get a "clean" state, and removed all shards from BB artifact installation. Now any new shard gives the error, so it's probably not an issue with BB-Base but with Pkg.Artifacts somewhere.