`compile=no`?

Hello!

I’m experimenting with Julia compile switch. Setting it to no gives an errors for simplest programs like print(1):

code missing for Base.pointer(Base.#pointer, Array{UInt8, 1}, UInt64)  sysimg may not have been built with --compile=all
code missing for Base.convert(Base.#convert, Type{Ptr{Int32}}, Ptr{UInt8})  sysimg may not have been built with --compile=all
code missing for Base.SparseArrays.CHOLMOD.set_print_level(Base.SparseArrays.CHOLMOD.#set_print_level, Array{UInt8, 1}, Int64)  sysimg may not have been built with --compile=all
code missing for Base.print(Base.#print, Int64)  sysimg may not have been built with --compile=all
code missing for Base.print(Base.#print, Base.TTY, Int64)  sysimg may not have been built with --compile=all
1code missing for Base.#592(Base.##592#593)  sysimg may not have been built with --compile=all
code missing for Base.LibGit2.#147(Base.LibGit2.##147#148)  sysimg may not have been built with --compile=all

Note 1 in the one but last line which is a desired output.

Basing on these messages, it seems that I need to recompile a base with --compile=all, so I went to julia/contrib/build_sysimg.jl and changed two command lines invoking julia to preprocess a base, adding --compile=all. Then I invoked build_sysimg.jl, it started the work but somewhere in the middle it crashed with a long stack trace, the beginning of which is like this:

WARNING: An error occurred during inference. Type inference is now partially disabled.
Base.MethodError(f=Core.Inference.#copy_exprargs(), args=(nothing,))

The rest is here.

Any suggestion what am I supposed to do in order to get my program building with compile=no?

This isn’t expected to work unless the system image has everything you need, both from Julia itself and any of your own code. I’d suggest reading this blog post, but understand that this is not exactly turnkey yet so consider it an advanced option.

The crash will likely be fixed by:

2 Likes