Skip to content
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

Fresh install Julia 1.6.0-rc2 on Windows, error trying to add a package #40000

Closed
sairus7 opened this issue Mar 12, 2021 · 10 comments · Fixed by #40026
Closed

Fresh install Julia 1.6.0-rc2 on Windows, error trying to add a package #40000

sairus7 opened this issue Mar 12, 2021 · 10 comments · Fixed by #40026
Labels
system:windows Affects only Windows

Comments

@sairus7
Copy link
Contributor

sairus7 commented Mar 12, 2021

If I open Julia 1.6 console without admin privileges, I get the following error when trying to install a package.
(With admin it installs with no errors.)

(@v1.6) pkg> add ImPlot
    Updating registry at `C:\Users\user\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
  Downloaded artifact: XML2
  Downloaded artifact: XML2
ERROR: Unable to automatically install 'XML2' from 'C:\Users\user\.julia\packages\XML2_jll\Slt3Q\Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:436
  [3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:501
  [4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:702
  [5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:680
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1235
  [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:197
  [8] add
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:148 [inlined]
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73
 [10] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72
 [11] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:408
 [12] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:386
 [13] do_cmd
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:550
 [15] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [16] invokelatest
    @ .\essentials.jl:706 [inlined]
 [17] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [18] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [19] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:406
@ararslan ararslan added the system:windows Affects only Windows label Mar 12, 2021
@ararslan
Copy link
Member

@musm, any ideas?

@sairus7
Copy link
Contributor Author

sairus7 commented Mar 13, 2021

Maybe that's because I have changed install path for Julia to C:\Julia\1.6.0-rc2? Maybe there are some relative paths involved? (I am looking to strange path C:\buildbot\worker\... that doesn't exist on my machine.)
Or because I have 1.5 already installed?

@musm
Copy link
Contributor

musm commented Mar 13, 2021

I can't reproduce. For reference I also installed Julia to C:\Julia to try and reproduce this.

@giordano
Copy link
Contributor

The fact is that installation of artifacts swallows all errors: JuliaLang/Pkg.jl#1659.

Unless you find out what's the actual error, there is nothing that can be done. DebugArtifacts.jl tries to replicate installation steps in a more verbose way

@anandijain
Copy link
Contributor

I installed Windows 1.6.0rc2 with run as admin but then ran julia without admin. This might be how to repro

@musm
Copy link
Contributor

musm commented Mar 13, 2021

Oh that would be the issue. No need to install as Admin, even in a non-standard directory.

@anandijain
Copy link
Contributor

sure... there is a note during installer roughly saying "if you want to install everywhere, rerun installer with admin", so I did

@anandijain
Copy link
Contributor

image
@giordano

@KristofferC
Copy link
Member

KristofferC commented Mar 14, 2021

The error message locally is:

ERROR: MethodError: no method matching !(::Int64)
Closest candidates are:
  !(::Bool) at bool.jl:33
  !(::Function) at operators.jl:969
  !(::Missing) at missing.jl:101
Stacktrace:
  [1] symlink(target::String, link::String; dir_target::Bool)
    @ Base.Filesystem .\file.jl:1042
  [2] symlink
    @ .\file.jl:1010 [inlined]
  [3] can_symlink(dir::String)
    @ Tar C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Tar\src\Tar.jl:25
  [4] #75
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Tar\src\Tar.jl:198 [inlined]
  [5] arg_mkdir(f::Tar.var"#75#78"{Base.Process, Base.DevNull, Tar.var"#1#2"}, arg::String)
    @ ArgTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\ArgTools\src\ArgTools.jl:163
  [6] #74
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Tar\src\Tar.jl:196 [inlined]
  [7] arg_read(f::Tar.var"#74#77"{Base.DevNull, Tar.var"#1#2", String}, arg::Base.Process)
    @ ArgTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\ArgTools\src\ArgTools.jl:61
  [8] extract(predicate::Function, tarball::Base.Process, dir::String; skeleton::Nothing, copy_symlinks::Nothing)
    @ Tar C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Tar\src\Tar.jl:195

Looking at the bame for the place that throws, I will guess #39491 is the cause of this. Specifically in

if !(flags & UV_FS_SYMLINK_JUNCTION) && err == UV__EPERM

it looks like the first condition is an Int.

cc @staticfloat

@KristofferC
Copy link
Member

Closing in favour of #40024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:windows Affects only Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants