tshort / StaticCompiler.jl

Compiles Julia code to a standalone library (experimental)
Other
490 stars 31 forks source link

StaticCompiler won't start on master #29

Closed MasonProtter closed 3 years ago

MasonProtter commented 4 years ago
(@v1.5) pkg> st
     Status `~/.julia/environments/v1.5/Project.toml`
   81625895 StaticCompiler v0.1.0 `~/.julia/dev/StaticCompiler`

julia> versioninfo()
Julia Version 1.5.0-DEV.505
Commit e3e9def429 (2020-03-24 17:47 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 5 2600 Six-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, znver1)
Environment:
  JULIA_NUM_THREADS = 6

julia> using StaticCompiler 
[ Info: Precompiling StaticCompiler [81625895-6c0f-48fc-b932-11a18313743c]
ERROR: LoadError: LoadError: could not load symbol "julia_type_to_llvm":
/home/mason/build/julia/usr/bin/julia: undefined symbol: julia_type_to_llvm
Stacktrace:
 [1] julia_to_llvm(::Any) at /home/mason/.julia/dev/StaticCompiler/src/utils.jl:5
 [2] top-level scope at /home/mason/.julia/dev/StaticCompiler/src/utils.jl:8
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include at ./Base.jl:368 [inlined]
 [5] include(::String) at /home/mason/.julia/dev/StaticCompiler/src/StaticCompiler.jl:1
 [6] top-level scope at /home/mason/.julia/dev/StaticCompiler/src/StaticCompiler.jl:18
 [7] include(::Function, ::Module, ::String) at ./Base.jl:380
 [8] include(::Module, ::String) at ./Base.jl:368
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:331 [inlined]
 [11] eval(::Expr) at ./client.jl:451
 [12] top-level scope at ./none:3
in expression starting at /home/mason/.julia/dev/StaticCompiler/src/utils.jl:8
in expression starting at /home/mason/.julia/dev/StaticCompiler/src/StaticCompiler.jl:18
ERROR: Failed to precompile StaticCompiler [81625895-6c0f-48fc-b932-11a18313743c] to /home/mason/.julia/compiled/v1.5/StaticCompiler/9DKHt_hMN01.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1288
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
tshort commented 4 years ago

Jameson's update to compilation broke things here (https://github.com/JuliaLang/julia/pull/25984). That PR is going to be great to have. I've been eagerly awaiting that update. We should now be able to compile code that does recursion, and the PR cleaned up some other things that might help us.

I've started on changes to accommodate this. I got stuck because of some of the compilation changes. It'll take some work to get it in shape. When I get a minute, I'll push the (mostly still non-working) branch.