I am trying to install Gtk on linux (RedHatEnterprise 8.8) with Julia 1.10.2 from a clean slate (I purged ~/.julia) and add fails when fetching “Wayland_protocols_jll”
So I tried simply ]add Wayland_protocols_jll and that fails with hash mismatch:
Downloaded artifact: Wayland_protocols
ERROR: Unable to automatically download/install artifact 'Wayland_protocols' from sources listed in '/home/fessler/.julia/packages/Wayland_protocols_jll/bXHUY/Artifacts.toml'.
Sources attempted:
- https://pkg.julialang.org/artifact/97ba5172167298b990339cda263370d192688f61
Error: Tree Hash Mismatch!
Expected git-tree-sha1: 97ba5172167298b990339cda263370d192688f61
Calculated git-tree-sha1: db4da094e21fb0d44033a9f6d789a8315bc31fe2
- https://github.com/JuliaBinaryWrappers/Wayland_protocols_jll.jl/releases/download/Wayland_protocols-v1.31.0+0/Wayland_protocols.v1.31.0.any.tar.gz
Error: Tree Hash Mismatch!
Expected git-tree-sha1: 97ba5172167298b990339cda263370d192688f61
Calculated git-tree-sha1: db4da094e21fb0d44033a9f6d789a8315bc31fe2
I never had such a failure before. How does one diagnose this and where would one even report an issue?
The tree hash check depends on the filesystem, and it hasn’t been tested on uncommon filesystems like AFS, so it’s possible the implementation is incorrect for that system. In this case you can set the environment variable JULIA_PKG_IGNORE_HASHES:
export JULIA_PKG_IGNORE_HASHES="true"
before starting julia to ignore that test.
To anyone else reading this: do not pre-emptively set JULIA_PKG_IGNORE_HASHES unless you’re 100% certain it solves a real issue (and in that case please report it to Pkg.jl), as you’d ignore potential security issues!
After invoking export JULIA_PKG_IGNORE_HASHES="true" then ]test Tar works fine.
It still reports the tree hash mismatch, but then proceeds (as expected):
Environment variable $JULIA_PKG_IGNORE_HASHES is true: ignoring hash mismatch and moving artifact to the expected location
└ @ Pkg.Artifacts /usr/um/julia-1.10.2/share/julia/stdlib/v1.10/Pkg/src/Artifacts.jl:360
I am happy to help with any tests you suggest to make it work safely on AFS. Thanks so much! BTW, should I report an issue in Pkg.jl?
Your home directory is actually not in AFS anymore (it used it be for decades). It is on a cifs mounted network file server that is extremely not really posix / linux. Everything has fake 600 permissions no matter what (chmod does nothing at all) and it is (among other things) somewhat case insensitive. Agreed that doing it correctly on that volume is likely impossible.
As an aside about AFS: chmod would have worked fine in AFS and permissions for group and other permissions bits can be set in AFS via chmod even if they are ignored for actually determining permissions.