I have a package that uses CImGui that I'd like to compile down to a sysimage, so I've been trying out PackageCompilerX, but it's having difficulties with CImGui, so I've given compiling CImGui alone a go.
The process succeeds but with various precompile statement execution failures.
[ Info: PackageCompilerX: creating system image object file, this might take a while...
┌ Error: failed to execute precompile(Tuple{Type{Base.Generator{I, F} where F where I}, getfield(Main, Symbol("#17#18")), Base.UnitRange{Int64}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#7#10")), Int64})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#ItemGetter#23")), Ptr{Ptr{Int8}}, Int32, Ptr{Ptr{Int8}}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#Saw#25")), Ptr{Nothing}, Int32})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#Sin#24")), Ptr{Nothing}, Int32})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#Square#14")), Ptr{CImGui.LibCImGui.ImGuiSizeCallbackData}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{getfield(Main, Symbol("#Step#15")), Ptr{CImGui.LibCImGui.ImGuiSizeCallbackData}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Base.collect), Base.Generator{Base.UnitRange{Int64}, getfield(Main, Symbol("#17#18"))}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowAboutWindow), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindow), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindowColumns)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindowLayout)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindowMisc)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindowPopups)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDemoWindowWidgets)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowDummyObject), String, Int64})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppAutoResize), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppConstrainedResize), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppCustomRendering), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppLayout), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppLongText), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppMainMenuBar), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppPropertyEditor), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppSimpleOverlay), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleAppWindowTitles), Base.RefValue{Bool}})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowExampleMenuFile)})
└ @ Main.anonymous none:23
┌ Error: failed to execute precompile(Tuple{typeof(Main.ShowHelpMarker), String})
└ @ Main.anonymous none:23
The sysmimage however does begin to work, but the resulting window has graphical bugs.
i.e.
sh -c "julia-1.3 -J/home/ian/Documents/GitHub/CImGui.jl/dev/compilation/CImGuiSysImage.so -q -e '@show isdefined(Main, :CImGui); include(joinpath(dirname(dirname(pathof(CImGui))), \"examples\", \"demo.jl\"))' -i"
I assume this hasn't been tried before, given how new PackageCompilerX is, but I was wondering if anyone has any ideas? @Gnimuc @KristofferC ?