-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
Trying to compile Distances gives the following error:
julia> using PackageCompiler
julia> compile_package("Distances")
...
ERROR: LoadError: LoadError: LoadError: LoadError: UndefRefError: access to undefined reference
Stacktrace:
[1] getproperty at ./sysimg.jl:18 [inlined]
[2] getindex at ./refvalue.jl:32 [inlined]
[3] docm(::LineNumberNode, ::Module, ::Any) at ./docs/Docs.jl:500
[4] @doc(::LineNumberNode, ::Module, ::Vararg{Any,N} where N) at ./boot.jl:451
[5] include at ./boot.jl:317 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:1038
[7] include at ./sysimg.jl:29 [inlined]
[8] include(::String) at /Users/jack/.julia/packages/Distances/nLAdT/src/Distances.jl:3
[9] top-level scope at none:0
[10] include at ./boot.jl:317 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1038
[12] _require(::Base.PkgId) at ./loading.jl:950
[13] require(::Base.PkgId) at ./loading.jl:852
[14] macro expansion at ./logging.jl:311 [inlined]
[15] require(::Module, ::Symbol) at ./loading.jl:834
[16] top-level scope at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/sysimg/precompile.jl:4
[17] eval(::Module, ::Any) at ./boot.jl:319
[18] top-level scope at none:0
[19] include at ./boot.jl:317 [inlined]
[20] include_relative(::Module, ::String) at ./loading.jl:1038
[21] include(::Module, ::String) at ./sysimg.jl:29
[22] include(::String) at ./client.jl:388
[23] top-level scope at none:0
in expression starting at /Users/jack/.julia/packages/Distances/nLAdT/src/metrics.jl:328
in expression starting at /Users/jack/.julia/packages/Distances/nLAdT/src/metrics.jl:328
in expression starting at /Users/jack/.julia/packages/Distances/nLAdT/src/Distances.jl:100
in expression starting at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/sysimg/precompile.jl:2
ERROR: failed process: Process(`/Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia -Cnative -J/Users/jack/.julia/packages/PackageCompiler/Lt1dx/sysimg/backup/native/sys.dylib --compile=yes --depwarn=yes --startup-file=no --compiled-modules=no --output-o sys.a -e 'Base.__init__(); Sys.__init__() # initialize \`Base\` and \`Sys\` modules
pushfirst!(Base.DEPOT_PATH, "cache_ji_v1.0.0") # save precompiled modules locally
include("/Users/jack/.julia/packages/PackageCompiler/Lt1dx/sysimg/precompile.jl") # include Julia program file
'`, ProcessExited(1)) [1]
Stacktrace:
[1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
[2] pipeline_error at ./process.jl:695 [inlined]
[3] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:653
[4] run(::Cmd) at ./process.jl:651
[5] (::getfield(PackageCompiler, Symbol("##4#5")))() at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/static_julia.jl:262
[6] cd(::getfield(PackageCompiler, Symbol("##4#5")), ::String) at ./file.jl:96
[7] build_object(::String, ::String, ::String, ::Bool, ::String, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing) at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/static_julia.jl:261
[8] #static_julia#1(::Nothing, ::Bool, ::Bool, ::String, ::String, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::String, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::typeof(static_julia), ::String) at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/static_julia.jl:172
[9] #static_julia at ./none:0 [inlined]
[10] #build_sysimg#20(::Bool, ::Bool, ::Bool, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::typeof(PackageCompiler.build_sysimg), ::String, ::String) at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/api.jl:25
[11] #build_sysimg at ./none:0 [inlined]
[12] #compile_package#39(::Bool, ::Bool, ::Bool, ::Nothing, ::Function, ::Tuple{String,String}) at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/PackageCompiler.jl:109
[13] compile_package at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/PackageCompiler.jl:103 [inlined]
[14] #compile_package#36 at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/PackageCompiler.jl:92 [inlined]
[15] compile_package(::String) at /Users/jack/.julia/packages/PackageCompiler/Lt1dx/src/PackageCompiler.jl:86
[16] top-level scope at none:0
The error is coming from here: https://github.com/JuliaLang/julia/blob/a5bfabccd8d9c351cc3b0026992fe7314ff022db/base/docs/Docs.jl#L500
because Base.REPL_MODULE_REF is not initialized. I can fix it by adding using REPL; REPL.__init__() here: https://github.com/JuliaLang/PackageCompiler.jl/blob/master/src/static_julia.jl#L246
but I'm not sure if that's the right resolution. Thoughts?
Metadata
Metadata
Assignees
Labels
No labels