using Pkg; Pkg.test("Gen") Package Gen errored during testing
I am using Gen in IJulia Notebook.
using Pkg; Pkg.test("Gen")
Package Gen errored during testing
Stacktrace: [1] pkgerror(::String, ::Vararg{String,N} where N) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:120 [2] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1357 [3] #test at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:0 [inlined] [4] #test#44(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:278 [5] test at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:263 [inlined] [6] #test#43 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:260 [inlined] [7] test at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:260 [inlined] [8] #test#42 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:259 [inlined] [9] test at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:259 [inlined] [10] #test#41 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:258 [inlined] [11] test(::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:258 [12] top-level scope at In[3]:1
using Gen results in a failure to precompile Gen [ea4f424c-a589-11e8-07c0-fd5c91b9da4a]
Stacktrace: [1] error(::String) at ./error.jl:33 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203 [3] _require(::Base.PkgId) at ./loading.jl:960 [4] require(::Base.PkgId) at ./loading.jl:858 [5] require(::Module, ::Symbol) at ./loading.jl:853 [6] top-level scope at In[23]:1
I noticed the same issue occurs inside Docker elaborated in this thread: https://github.com/probcomp/Gen.jl/issues/311
I just ran into this same error while trying to install and test Gen in a virtual machine. I was able to fix it by increasing the amount of RAM available to the VM (to 8GB up from 2GB). I think before that, the VM was running out of RAM which caused the error.
Thanks for sharing that changing the amount of available RAM seems to address the issue! It's weird that compilation is requiring so much memory in the first place, but we'll keep this in mind in case other people have similar issues - at some point we should probably add a "Troubleshooting" section to the documentation on installing Gen.
Note that our current recommended way of using Gen is to install Julia and Gen on your own system, instead of a virtual machine, and the Docker build we used to offer is now deprecated!