Homebrew.jl icon indicating copy to clipboard operation
Homebrew.jl copied to clipboard

can't build JLD in Windows 10-- problem with Homebrew.jl

Open StephenVavasis opened this issue 6 years ago • 2 comments

To @staticfloat I was not able to run Pkg.add("JLD") in the recent 0.7.0-alpha. An error arose in Homebrew.jl. Here is an excerpt from build.log in the deps subfolder:

WARNING: Could not download/extract https://github.com/Homebrew/brew/tarball/master into C:\Users\vavasis\.julia\packages\Homebrew\IgU0\deps\usr!
ERROR: LoadError: InitError: could not spawn `curl '-#' -L https://github.com/Homebrew/brew/tarball/master`: no such file or directory (ENOENT)
Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,Base.Libc.WindowsRawSocket,RawFD}) at .\process.jl:370
 [2] (::getfield(Base, Symbol("##501#502")){Cmd})(::Tuple{RawFD,Base.Libc.WindowsRawSocket,RawFD}) at .\process.jl:512
 [3] setup_stdio(::getfield(Base, Symbol("##501#502")){Cmd}, ::Tuple{RawFD,Base.Libc.WindowsRawSocket,RawFD}) at .\process.jl:493
 [4] #_spawn#500(::Base.ProcessChain, ::Function, ::Cmd, ::Tuple{RawFD,Base.Libc.WindowsRawSocket,RawFD}) at .\process.jl:511
 [5] (::getfield(Base, Symbol("#kw##_spawn")))(::NamedTuple{(:chain,),Tuple{Base.ProcessChain}}, ::typeof(Base._spawn), ::Cmd, ::Tuple{RawFD,Base.Libc.WindowsRawSocket,RawFD}) at .\<missing>:0
 [6] #_spawn#498(::Nothing, ::Function, ::Base.OrCmds, ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:414
 [7] _spawn at .\process.jl:409 [inlined]
 [8] #run#511 at .\process.jl:669 [inlined]
 [9] run(::Base.OrCmds) at .\process.jl:668
 [10] install_brew() at C:\Users\vavasis\.julia\packages\Homebrew\IgU0\src\private_API.jl:33
 [11] __init__() at C:\Users\vavasis\.julia\packages\Homebrew\IgU0\src\Homebrew.jl:38
 [12] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:655
 [13] _require_from_serialized(::String) at .\loading.jl:717
 [14] _require(::Base.PkgId) at .\loading.jl:1008
 [15] require(::Base.PkgId) at .\loading.jl:878
 [16] require(::Module, ::Symbol) at .\loading.jl:873
 [17] include at .\boot.jl:314 [inlined]
 [18] include_relative(::Module, ::String) at .\loading.jl:1071
 [19] include(::Module, ::String) at .\sysimg.jl:29
 [20] include(::String) at .\client.jl:393
 [21] top-level scope
during initialization of module Homebrew
in expression starting at C:\Users\vavasis\.julia\packages\Homebrew\IgU0\deps\build.jl:1

StephenVavasis avatar Jun 04 '18 05:06 StephenVavasis

IIUC this arises because the new Pkg system doesn't handle OS-conditional dependencies yet. Similar annoyances arise for Linux users. I'd like to ask @staticfloat if it is reasonable to wrap the real functionality in deps/build.jl in if is_apple() ... end ? (v0.7 syntax will be Sys.isapple())

It's fair to require other packages to avoid actually importing Homebrew unless running under OSX, but this is currently a problem out of their control. Perhaps @KristofferC could say if there is a better solution.

RalphAS avatar Jun 23 '18 22:06 RalphAS

Some discussion can be read here https://github.com/JuliaLang/Pkg.jl/issues/165.

I agree that the package should just do their best to build themselves no matter the environment and it is up to the user to determine when to run it. This means that indeed we need OS specific deps. I'm not sure but I think @StefanKarpinski is looking at that?

KristofferC avatar Jun 24 '18 08:06 KristofferC