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

Can't find 7zip.exe on fresh Julia 1.3.0 install #293

Closed
NicholasWMRitchie opened this issue Nov 30, 2019 · 5 comments · Fixed by #294
Closed

Can't find 7zip.exe on fresh Julia 1.3.0 install #293

NicholasWMRitchie opened this issue Nov 30, 2019 · 5 comments · Fixed by #294

Comments

@NicholasWMRitchie
Copy link

PackageCompiler fails to build on Windows 10. The system already has 7Zip installed (in C:\Program Files\7-Zip) but 7zip.exe is missing from "C:\Users\nicho\AppData\Local\Julia-1.3.0\bin" where the build expects it. Placing a copy of 7zip.exe in "C:\Users\nicho\AppData\Local\Julia-1.3.0\bin" allows the build to complete.

'julia> Pkg.build("PackageCompiler")
Building LibCURL ────────→ C:\Users\nicho\.julia\packages\LibCURL\lWJxD\deps\build.log
Building WinRPM ─────────→ C:\Users\nicho\.julia\packages\WinRPM\Y9QdZ\deps\build.log
Building PackageCompiler → C:\Users\nicho\.julia\packages\PackageCompiler\CJQcs\deps\build.log
┌ Error: Error building PackageCompiler:
│ [ Info: Installing GCC
│ [ Info: Multiple package candidates found for mingw64-unistd-pthread-devel, picking newest.
│ ┌ Info: Packages to install:
│ └ join(names(todo), ", ") = "libgcc_s_seh1, libwinpthread1, headers, winpthreads-devel, libmpc3, runtime, binutils, cpp, libmpfr4, zlib1, libgmp10, gcc"
│ ┌ Info: Downloading:
│ └ name = "libgcc_s_seh1"
│ ┌ Info: Extracting:
│ └ name = "libgcc_s_seh1"
│ ERROR: LoadError: IOError: could not spawn 'C:\Users\nicho\AppData\Local\Julia-1.3.0\bin\7z.exe' x -y 'C:\Users\nicho\.julia\packages\WinRPM\Y9QdZ\cache\2\noarch%2Fmingw64-libgcc_s_seh1-8.2.0-2.8.noarch.rpm' '-oC:\Users\nicho\.julia\packages\WinRPM\Y9QdZ\cache\2': no such file or directory (ENOENT)
│ Stacktrace:
│ [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
│ [2] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at .\process.jl:112
│ [3] _spawn at .\process.jl:111 [inlined]
│ [4] #open#563(::Bool, ::Bool, ::typeof(open), ::Cmd, ::Base.DevNull) at .\process.jl:370
│ [5] open at .\process.jl:361 [inlined]
│ [6] open(::Cmd, ::String, ::Base.DevNull) at .\process.jl:341
│ [7] open at .\process.jl:338 [inlined]
│ [8] do_install(::WinRPM.Package) at C:\Users\nicho.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:482
│ [9] do_install at C:\Users\nicho.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│ [10] #install#19(::Bool, ::typeof(WinRPM.install), ::WinRPM.Package) at C:\Users\nicho.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:403
│ [11] #install at .\tuple.jl:0 [inlined]
│ [12] #install#17 at C:\Users\nicho.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│ [13] #install at .\none:0 [inlined] (repeats 2 times)
│ [14] build() at C:\Users\nicho.julia\packages\PackageCompiler\CJQcs\deps\build.jl:43
│ [15] top-level scope at C:\Users\nicho.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
│ [16] include at .\boot.jl:328 [inlined]
│ [17] include_relative(::Module, ::String) at .\loading.jl:1105
│ [18] include(::Module, ::String) at .\Base.jl:31
│ [19] include(::String) at .\client.jl:424
│ [20] top-level scope at none:5
│ in expression starting at C:\Users\nicho.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649
false'

@aminya
Copy link
Contributor

aminya commented Dec 13, 2019

What should be done to fix this? @staticfloat suggests a solution like this:

searchpath = ENV["PATH"]
if isdefined(Base, :LIBEXECDIR)
	sepchar = Sys.iswindows() ? ";" : ":"
	searchpath = string(joinpath(Sys.BINDIR, Base.LIBEXECDIR), sepchar, searchpath)
end
7z_path = withenv("PATH" => searchpath) do
	Sys.which(`7z`)
end
run(`\$7z_path ...`)

aminya added a commit to aminya/PackageCompiler.jl that referenced this issue Dec 14, 2019
Should fix JuliaLang#293.

WinRPM 0.4.3 should be merged to general registry (JuliaRegistries/General#6375).
@aminya aminya mentioned this issue Dec 14, 2019
1 task
aminya added a commit to aminya/PackageCompiler.jl that referenced this issue Dec 16, 2019
@JianghuiDu
Copy link

I have the same problem and the code doesn't work. I also try to update to WinRPM 0.4.3 but I can't because it doesn't work with BinDeps.

@aminya
Copy link
Contributor

aminya commented Dec 20, 2019

I have the same problem and the code doesn't work. I also try to update to WinRPM 0.4.3 but I can't because it doesn't work with BinDeps.

You should try the latest PackageCompiler. Try updating PackageCompiler, it will update WinRPM automatically.

@JianghuiDu
Copy link

Doesn't work either:

julia> Pkg.add(Pkg.PackageSpec(;name="PackageCompiler", version="0.6.5"))
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PackageCompiler [9b87118b]:
 PackageCompiler [9b87118b] log:
 ├─possible versions are: [0.5.0-0.5.1, 0.6.0-0.6.5] or uninstalled
 ├─restricted to versions 0.6.5 by an explicit requirement, leaving only versions 0.6.5
 └─restricted by compatibility requirements with WinRPM [c17dfb99] to versions: [0.5.0-0.5.1, 0.6.0-0.6.4] or uninstalled — no versions left
   └─WinRPM [c17dfb99] log:
     ├─possible versions are: [0.3.3, 0.4.0-0.4.3] or uninstalled
     └─restricted to versions 0.4.2 by an explicit requirement, leaving only versions 0.4.2
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::typeof(Pkg.GraphType.propagate_constraints!), ::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1007
 [2] propagate_constraints! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:948 [inlined]
 [3] #simplify_graph!#121(::Bool, ::typeof(Pkg.GraphType.simplify_graph!), ::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462
 [4] simplify_graph! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462 [inlined] (repeats 2 times)
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:321
 [6] #add#112(::Bool, ::Pkg.BinaryPlatforms.Windows, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:1010
 [7] #add at .\none:0 [inlined]
 [8] #add#25(::Bool, ::Pkg.BinaryPlatforms.Windows, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:102
 [9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:72
 [10] #add#24 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [11] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [12] #add#20 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66 [inlined]
 [13] add(::Pkg.Types.PackageSpec) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
 [14] top-level scope at none:0

Can't update WinRPM for some reason:

julia> Pkg.add(Pkg.PackageSpec(;name="WinRPM", version="0.4.3"))
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package BinDeps [9e28174c]:
 BinDeps [9e28174c] log:
 ├─possible versions are: [0.7.0, 0.8.9-0.8.10, 1.0.0] or uninstalled
 ├─restricted to versions 0.8.10 by an explicit requirement, leaving only versions 0.8.10
 └─restricted by compatibility requirements with WinRPM [c17dfb99] to versions: 1.0.0 — no versions left
   └─WinRPM [c17dfb99] log:
     ├─possible versions are: [0.3.3, 0.4.0-0.4.3] or uninstalled
     └─restricted to versions 0.4.3 by an explicit requirement, leaving only versions 0.4.3
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::typeof(Pkg.GraphType.propagate_constraints!), ::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1007
 [2] propagate_constraints! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:948 [inlined]
 [3] #simplify_graph!#121(::Bool, ::typeof(Pkg.GraphType.simplify_graph!), ::Pkg.GraphType.Graph, ::Set{Int64}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462
 [4] simplify_graph! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\GraphType.jl:1462 [inlined] (repeats 2 times)
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:321
 [6] #add#112(::Bool, ::Pkg.BinaryPlatforms.Windows, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:1010
 [7] #add at .\none:0 [inlined]
 [8] #add#25(::Bool, ::Pkg.BinaryPlatforms.Windows, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:102
 [9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:72
 [10] #add#24 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [11] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
 [12] #add#20 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66 [inlined]
 [13] add(::Pkg.Types.PackageSpec) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
 [14] top-level scope at none:0

@aminya
Copy link
Contributor

aminya commented Dec 20, 2019

It says for BinDeps that:

─restricted to versions 0.8.10 by an explicit requirement, leaving only versions 0.8.10

What is imposing this requirement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants