You can find a log file here: Install KiteModels (last release) · OpenSourceAWE/AWEMeta.jl@b5fdff4 · GitHub
Not so sure if nevertheless a system image is created. But to check if a file exists sounds like an ugly workaround for me. The function call should report a failure in some way, either as return code or as exception.
Error message:
[4] run_precompilation_script(project::String, sysimg::String, precompile_file::String, precompile_dir::String)
@ PackageCompiler /tmp/testdepot/packages/PackageCompiler/cTtGY/src/PackageCompiler.jl:314
[5] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool, import_into_main::Bool)
@ PackageCompiler /tmp/testdepot/packages/PackageCompiler/cTtGY/src/PackageCompiler.jl:353
[6] create_sysimg_object_file
@ /tmp/testdepot/packages/PackageCompiler/cTtGY/src/PackageCompiler.jl:319 [inlined]
[7] create_sysimage(packages::Vector{Symbol}; sysimage_path::String, project::String, precompile_execution_file::String, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, julia_init_h_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String, import_into_main::Bool)
@ PackageCompiler /tmp/testdepot/packages/PackageCompiler/cTtGY/src/PackageCompiler.jl:644
[8] top-level scope
@ /tmp/test/test/test/create_sys_image.jl:20
[9] include(fname::String)
@ Main ./sysimg.jl:38
[10] top-level scope
@ none:1
in expression starting at /tmp/test/test/test/create_sys_image.jl:20
Not clear to me is, if I execute a Julia script with:
julia --project -e "include(\"./test/create_sys_image.jl\");"
and the script terminates with an exception, is the return code of the command one?
I think it should be:
ufechner@framework:~$ julia -e 'a'
ERROR: UndefVarError: `a` not defined in `Main`
ufechner@framework:~$ echo $?
1
So my current conclusion: If the precompile script throws an exception, the call of the function:
PackageCompiler.create_sysimage(
[:KiteUtils, :KitePodModels, :KiteModels, :ControlPlots];
sysimage_path="kps-image_tmp.so",
include_transitive_dependencies=true,
precompile_execution_file=joinpath("test", "test_for_precompile.jl")
)
does not result in an exception.
Why not?