Hi good folks!
I am trying to create a sysimage to distribute a package I have created. I also don’t want the source code of the package to be available. As a first step I am trying to create such a sysimage for the CSV package, just to try things out before I try it with my own package.
To remove the source code I am passing the --strip-ir
command when creating the sysimage:
create_sysimage(["CSV"]; sysimage_path="CSVSysimageir.so", sysimage_build_args=Cmd(["--strip-ir"]))
However, when I try to use the sysimage with julia -JCSVSysimageir.so --startup-file=no
, then as soon as I move the cursor a bit in the REPL I get the following error
source not available for (::REPL.LineEdit.var"#27#28"{REPL.LineEdit.var"#156#212", String})(Any, Any) from (::REPL.LineEdit.var"#27#28"{f, c})(Any, Any)
source not available for (::Type{NamedTuple{(:exception,), T} where T<:Tuple})(Tuple{Tuple{ErrorException, Array{Union{Ptr{Nothing}, Base.InterpreterIP}, 1}}}) from (::Type{NamedTuple{names, T} where T<:Tuple})(Tuple) where {names}
source not available for logging_error(Any, Any, Any, Any, Any, Any, Any, Any, Bool) from logging_error(Any, Any, Any, Any, Any, Any, Any, Any, Bool)
source not available for (::Type{NamedTuple{(:exception, :backtrace), T} where T<:Tuple})(Tuple{ErrorException, Array{Union{Ptr{Nothing}, Base.InterpreterIP}, 1}}) from (::Type{NamedTuple{names, T} where T<:Tuple})(Tuple) where {names}
source not available for (::Type{NamedTuple{(:exception, :backtrace), T} where T<:Tuple})(Tuple{ErrorException, Array{Union{Ptr{Nothing}, Base.InterpreterIP}, 1}}) from (::Type{NamedTuple{names, T} where T<:Tuple})(Tuple) where {names}
source not available for print(Core.CoreSTDERR, String) from print(IO, String)
source not available for (::REPL.var"#60#66"{REPL.REPLBackendRef})() from (::REPL.var"#60#66"{backend_ref})()
^Cfatal: error thrown and no exception handler available.
InterruptException()
How do I avoid this? I don’t need to strip IR from everything by the way. It would be enough for just CSV in this case.
Thanks in advance!