-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree hash mismatch error when installing on WSL #193
Comments
@staticfloat any ideas? |
What's your umask? This looks like a duplicate of JuliaPackaging/BinaryBuilder.jl#527 |
This is the output:
|
Doesn't umask |
Sorry, I forgot that the on bits are the ones that get turned off in the result. Not sure what's going on. |
Windows Subsystem for Linux? Does your Julia report itself as running on Windows or running on Linux? What is your |
If it thinks its running on Linux, I bet that the branches we have for |
It seems like its running on Linux:
|
What does |
Yep; this is a problem. It thinks its linux and thereby thinks that the filesystem will behave in a Linux-like fashion (e.g. having reasonable Could I ask you to do the following test for me: using Pkg.Artifacts
function create_file(dir::String, exe::Bool = false)
foo_path = joinpath(dir, "foo")
open(foo_path, "w") do io
println(io, "hello")
end
if exe
chmod(foo_path, 0o775)
end
mode = string(stat(foo_path).mode, base=8)
is_exe = Sys.isexecutable(foo_path)
@info("make exectuable: $(exe)", mode, is_exe)
end
first_hash = create_artifact(dir -> create_file(dir, false))
@show first_hash
second_hash = create_artifact(dir -> create_file(dir, true))
@show second_hash Running that script should give you an output such as the following:
|
Here is the output of the script:
|
Yep; that's the problem. The filesystem is built upon a foundation of lies. This is actually a really pathological case for us since even our intended designs to fix The immediate workaround that I can think of is to have The downside to these workarounds is that they only hide the problem; the fact of the matter is that Windows machines are "blind" to permissions differences, and so the hashes they calculate are different from those that the rest of the world calculates. This means that when attempting to create and bind an artifact on Windows, everything works until we try to share the artifact elsewhere. We are relying on the fact that most people are authoring on Linux, and we're just overriding the hash check on Windows. Not an ideal situation at all. |
@MaximeBouton after reading up on the WSL filesystem setup, what happens if you set your |
It worked! Thanks @staticfloat ! edit: I changed it to |
@MaximeBouton is there any documentation you read to get Julia working on WSL? If so, we should add this little bit of wisdom into the instructions so that others know not to do what you did. :) |
I have naively followed the linux installation instruction and it just worked before. I am not sure where the best place would be for a WSL specific documentation. |
I am getting the same issue, trying to install Plots.jl on an external ssd drive in WSL.
I tried both versions 1.5.3 and the latest nightly. The issue appears on both. I am having the issue on WSL 1 (to which I am tied because of WSL issue #5911). @MaximeBouton was the original issue on WSL 1 or WSL 2? If it was WSL 1, does anyone know if the issue is still there on WSL 2? |
Really it doesn't work on nightly? Your issue sounds like JuliaLang/Pkg.jl#2317, which should have been fixed |
Ok sorry it does work now. I missed the |
@marcopigg it was on WSL 1, I have not tried on WSL 2 yet |
Can you clarify exactly where you put the JULIA_PKG_IGNORE_HASHES = 1 flag? Is it ok to type this in the session or does it have to be appended to a specific sytem file? |
I am getting a
Tree Hash Mismatch!
error when trying to install SpecialFunctions.Setup:
Full error message with step to reproduce:
The text was updated successfully, but these errors were encountered: