You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using PackageCompiler
create_sysimage(["Plots"], sysimage_path="sys_myimage.so", include_transitive_dependencies=false, precompile_execution_file="myfile.jl")
with myfile.jl being:
using Plots
x =1:10:100
y =sin.(x)
plot(x,y, show=true)
PackageCompiler returns the following output, with ld returning a warning:
Precompiling project...38 dependencies successfully precompiled in20 seconds. 139 already precompiled.
[ Info: PackageCompiler: Executing /Users/michi/myfile.jl =>/var/folders/kx/lw7dt7y50_98_hknqssfl4xh0000gn/T/jl_packagecompiler_eho51P/jl_YrqDBD
[ Info: PackageCompiler: Done
✔ [00m:48s] PackageCompiler: compiling incremental system image
ld: warning: reexported library with install name '@rpath/libunwind.1.dylib' found at '/Users/michi/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/lib/julia/libunwind.1.0.dylib' couldn't be matched with any parent library and will be linked directly
(note1: adding or removing the include_transitive_dependencies=false makes no difference)
(note2: if include_transitive_dependencies=true, then an error is produced:
[ Info: PackageCompiler: Done
⠇ [00m:06s] PackageCompiler: compiling incremental system image┌ Error: Error during loading of extension UnitfulExt of Plots, use `Base.retry_load_extensions()` to retry.
│ exception =1-element ExceptionStack:ConcurrencyViolationError("deadlock detected in loading UnitfulLatexify -> UnitfulLatexify && UnitfulExt")
Then, in any case, the sys_myimage.so generated is only 16KB in size (you find it here for download), and it does not work with
julia --sysimage sys_myimage.so
that returns an error:
ERROR: System image file failed consistency check: maybe opened the wrong version?
Finally, the exact same MWE works as expected and it generates a larger image, on a different architecture (i.e., Google Colab - see this minimal notebook)
Output of versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 12 × Apple M3 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
Environment:
JULIA_EDITOR = /opt/homebrew/bin/code
However it finally worked, when I adopted the modified create_sysimg_from_object_file function in the /src/PackageCompiler.jl source code, as mentioned in #738 !
Minimal Working Example
with myfile.jl being:
PackageCompiler returns the following output, with ld returning a warning:
(note1: adding or removing the
include_transitive_dependencies=false
makes no difference)(note2: if
include_transitive_dependencies=true
, then an error is produced:Then, in any case, the sys_myimage.so generated is only 16KB in size (you find it here for download), and it does not work with
that returns an error:
Finally, the exact same MWE works as expected and it generates a larger image, on a different architecture (i.e., Google Colab - see this minimal notebook)
Output of
versioninfo()
Julia installed with Juliaup 1.14.8
Installed packages
The text was updated successfully, but these errors were encountered: