JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
609 stars 251 forks source link

NVTX artifact has mismatch on Windows #3856

Closed jgreener64 closed 3 months ago

jgreener64 commented 3 months ago

If I do add NVTX in a fresh environment I get:

   Resolving package versions...
 Downloading artifact: NVTX
┌ Warning: Unable to open C:\Users\Joe\.julia\artifacts\jl_VUiaSz\bin\libnvToolsExt.dll for hashing; git-tree-sha1 likely suspect
  Downloaded artifact: NVTX
 Downloading artifact: NVTX
┌ Warning: Unable to open C:\Users\Joe\.julia\artifacts\jl_QeJ2v4\bin\libnvToolsExt.dll for hashing; git-tree-sha1 likely suspect
  Downloaded artifact: NVTX
ERROR: Unable to automatically download/install artifact 'NVTX' from sources listed in 'C:\Users\Joe\.julia\packages\NVTX_jll\W9h82\Artifacts.toml'.
Sources attempted:
- https://pkg.julialang.org/artifact/b4eeaf094ffb6aacf1b20ee5d2ac9aa1818fc732
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   b4eeaf094ffb6aacf1b20ee5d2ac9aa1818fc732
  Calculated git-tree-sha1: f4753646315b88155d87c481264b6839453b8f71

- https://github.com/JuliaBinaryWrappers/NVTX_jll.jl/releases/download/NVTX-v3.1.0+2/NVTX.v3.1.0.x86_64-w64-mingw32.tar.gz
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   b4eeaf094ffb6aacf1b20ee5d2ac9aa1818fc732
  Calculated git-tree-sha1: f4753646315b88155d87c481264b6839453b8f71

Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\Artifacts.jl:467
  [3] download_artifacts(env::Pkg.Types.EnvCache; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:755
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1394
  [5] add
    @ C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1376 [inlined]
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::@Kwargs{io::Base.TTY})
    @ Pkg.API C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\API.jl:278
  [7] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})
    @ Pkg.API C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [8] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\API.jl:148
  [9] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\REPLMode\REPLMode.jl:412
 [10] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\REPLMode\REPLMode.jl:390
 [11] do_cmd
    @ C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\REPLMode\REPLMode.jl:380 [inlined]
 [12] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\Pkg\src\REPLMode\REPLMode.jl:557
 [13] #invokelatest#2
    @ .\essentials.jl:892 [inlined]
 [14] invokelatest
    @ .\essentials.jl:889 [inlined]
 [15] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\LineEdit.jl:2656
 [16] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:1312
 [17] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL C:\Users\Joe\AppData\Local\Programs\Julia-1.10.2\share\julia\stdlib\v1.10\REPL\src\REPL.jl:386

F-Secure is also doing something, this might be causing the problem too:

image

If I set ENV["JULIA_PKG_IGNORE_HASHES"] = "true" it installs but then complains about a missing file during precompilation.

Julia is as below, installed from the installer on the Julia website.

Julia Version 1.10.2
Commit bd47eca2c8 (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 4 × Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
KristofferC commented 3 months ago

My guess is that your Antivirus had a false positive and corrupted the download.

jgreener64 commented 3 months ago

This does appear to be the case, I disabled my antivirus and it seems to work. Thanks.