JuliaStats / Rmath.jl

Archive of functions that emulate R's d-p-q-r functions for probability distributions
Other
16 stars 13 forks source link

Build Rmath takes forever #38

Closed baggepinnen closed 7 years ago

baggepinnen commented 7 years ago

I seem to have issues building Rmath. After having waited several minutes after the output INFO: Building Rmath and interrupting the process, I get the following stack trace. Is this supposed to take several minutes or is something wrong?

julia> Pkg.add("Rmath")
INFO: Installing Rmath v0.2.0
INFO: Building Rmath
^CERROR (unhandled task failure): InterruptException:
Stacktrace:
 [1] process_events at ./libuv.jl:82 [inlined]
 [2] wait() at ./event.jl:216
 [3] wait(::Condition) at ./event.jl:27
 [4] stream_wait(::Timer, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
 [5] wait(::Timer) at ./event.jl:357
 [6] (::Base.##300#301{PyCall.##7#8{PyCall.PyObject},Timer})() at ./event.jl:430
ERROR: InterruptException:
Stacktrace:
 [1] try_yieldto(::Base.##296#297{Task}, ::Task) at ./event.jl:189
 [2] wait() at ./event.jl:234
 [3] wait(::Condition) at ./event.jl:27
 [4] wait(::Task) at ./task.jl:181
 [5] sync_end() at ./task.jl:274
 [6] macro expansion at ./task.jl:303 [inlined]
 [7] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
 [8] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
 [9] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
 [10] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
 [11] add(::String) at ./pkg/pkg.jl:117
julia> versioninfo()
Julia Version 0.6.0
Commit 9036443 (2017-06-19 13:05 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Pkg.status("Rmath")
 - Rmath                         0.2.0
simonbyrne commented 7 years ago

Could you try:

cd(joinpath(Pkg.dir("Rmath"),"deps"))
include("build.jl")
baggepinnen commented 7 years ago

No luck, it's the line libRmath = library_dependency("libRmathjulia", aliases=["libRmath-julia"], validate = validate_Rmath) that stalls, if that helps

simonbyrne commented 7 years ago

Can you post the stack trace from when you cancelled it?

baggepinnen commented 7 years ago

It's the stacktrace from the first post, I cancel it at the line ^CERROR (unhandled task failure): InterruptException:

julia> include("build.jl")
^CERROR: LoadError: InterruptException:
Stacktrace:
 [1] process_events at ./libuv.jl:82 [inlined]
 [2] wait() at ./event.jl:216
 [3] wait(::Condition) at ./event.jl:27
 [4] stream_wait(::Base.PipeEndpoint, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
 [5] close(::Base.PipeEndpoint) at ./stream.jl:326
 [6] #eachline#379(::Bool, ::Function, ::Cmd, ::Base.DevNullStream) at ./process.jl:556
 [7] (::Base.#kw##eachline)(::Array{Any,1}, ::Base.#eachline, ::Cmd, ::Base.DevNullStream) at ./<missing>:0
 [8] read_sonames() at /local/home/fredrikb/.julia/v0.6/BinDeps/src/dependencies.jl:382
 [9] lookup_soname(::String) at /local/home/fredrikb/.julia/v0.6/BinDeps/src/dependencies.jl:415
 [10] #_find_library#46(::Type{T} where T, ::Function, ::BinDeps.LibraryDependency) at /local/home/fredrikb/.julia/v0.6/BinDeps/src/dependencies.jl:683
 [11] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /local/home/fredrikb/.julia/v0.6/BinDeps/src/dependencies.jl:895 (repeats 2 times)
 [12] macro expansion at /local/home/fredrikb/.julia/v0.6/BinDeps/src/dependencies.jl:950 [inlined]
 [13] anonymous at ./<missing>:?
 [14] include_from_node1(::String) at ./loading.jl:569
 [15] include(::String) at ./sysimg.jl:14
while loading /local/home/fredrikb/.julia/v0.6/Rmath/deps/build.jl, in expression starting on line 42
simonbyrne commented 7 years ago

@tkelman Any ideas?

tkelman commented 7 years ago

Try Pkg.pin("BinDeps", v"0.6.0"). If that works, we revert https://github.com/JuliaLang/BinDeps.jl/pull/277 and close the corresponding base PR that's proposing to delete the old code that didn't freeze, unless Jameson can fix the new code.

baggepinnen commented 7 years ago

That did the trick!

julia> Pkg.pin("BinDeps", v"0.6.0")
INFO: Creating BinDeps branch pinned.264e0860.tmp
INFO: No packages to install, update or remove

julia> Pkg.build("Rmath")
WARNING: No working GUI backend found for matplotlib
INFO: Building Rmath

julia> 

Thanks a lot, this has been bugging me for a while!

vtjnash commented 7 years ago

@tkelman This is a bug in Julia. Please don't revert an unrelated bugfix in reaction. Will https://github.com/JuliaLang/julia/pull/22886 be backported soon? I believe that should fix the issue.

tkelman commented 7 years ago

BinDeps 0.7.0 should then have a minimum version requirement of julia 0.6.1

tkelman commented 7 years ago

given the old code works on released versions of julia and the new code doesn't, it should still be reverted for those versions of julia subject to the bug

simonbyrne commented 7 years ago

This should be fixed now: please reopen if not fixed by Pkg.update().