JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.42k stars 190 forks source link

PackageCompiler broke my julia installation :/ #424

Closed chelseas closed 3 years ago

chelseas commented 4 years ago

Was trying to create a sysimage with all of my many dependencies for my project. It worked successfully (see below) but then the next time I tried to start a julia repl, it failed with the following error:

julia> packages  = [:Flux, 
                   :Intervals, 
                   :IterTools, 
                   :Calculus, 
                   :NLsolve, 
                   :Roots, 
                   :Plots, 
                   :Interpolations, 
                   :MacroTools, 
                   :SymEngine, 
                   :JuMP, 
                   :MathProgBase, 
                   :GLPK, 
                   :LazySets, 
                   :Parameters, 
                   :Gurobi, 
                   :Dates, 
                   :MathOptInterface, 
                   :Crayons, 
                   :OhMyREPL]
julia> PackageCompiler.create_sysimage(packages; precompile_statements_file="test_precompile.jl", replace_default=true)
[ Info: PackageCompiler: creating system image object file, this might take a while...
[ Info: PackageCompiler: default sysimg replaced, restart Julia for the new sysimg to be in effect

julia> 
(base) ChelseaUnicorn2:OVERT Chelsea$ julia1.4
┌ Warning: Package OhMyREPL does not have REPL in its dependencies:
│ - If you have OhMyREPL checked out for development and have
│   added REPL as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with OhMyREPL
└ Loading REPL into OhMyREPL from project dependency, future warnings for OhMyREPL are suppressed.
fatal: error thrown and no exception handler available.
#<null>
require at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1700 [inlined]
call_require at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:399 [inlined]
eval_import_path at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:436
jl_toplevel_eval_flex at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:656
jl_parse_eval_all at /Users/julia/buildbot/worker/package_macos64/build/src/ast.c:872
jl_load at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:872 [inlined]
jl_load_ at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:879
include at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
__init__ at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jfptr___init___15609 at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1700 [inlined]
jl_module_run_initializer at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:74
_julia_init at /Users/julia/buildbot/worker/package_macos64/build/src/init.c:788
main at /Applications/Julia-1.4.app/Contents/Resources/julia/bin/julia (unknown line)

If you'd like to see it, my test_precompile.jl file is attached. test_precompile.jl.zip

Wish I could give the output of versioninfo() but I can't start julia. It's version 1.4.? and I'm running on macos Catalina.

carlosal1015 commented 4 years ago

@chelseas Please, in the future consider use

(@v1.5) pkg> activate .
(@v1.5) pkg> add "Package1"
julia> using Pkg; Pkg.activate("")

isolate environment before to test.

KristofferC commented 3 years ago

replace_default is not recommended and will probably get removed (https://github.com/JuliaLang/PackageCompiler.jl/pull/546). Since issues with it are known, I'll close this.