PackageCompiler.jl
PackageCompiler.jl copied to clipboard
PackageCompiler taking too much time
Hi,
I am starting to compile my first App using Julia. So I read docs and some step-by-step guides to do it. It's a GUI application using GTK including multi-processing.
I used a precompile_app.jl
file, after several attempts, I decided to leave it for more than 10 hours until I decided to Cancel the process and ask you possible solutions.
compilation output:
create_app(
"MyApp",
"MyAppCompiled";
precompile_execution_file = "MyApp/precompile_app.jl",
force=true, incremental=false)
PackageCompiler: bundled artifacts:
├── ATK_jll - 1.447 MiB
├── Bzip2_jll - 1013.525 KiB
├── Cairo_jll - 4.041 MiB
├── Expat_jll - 424.294 KiB
├── Fontconfig_jll - 1.301 MiB
├── FreeType2_jll - 1.606 MiB
├── FriBidi_jll - 376.050 KiB
├── GTK3_jll - 39.551 MiB
├── Gettext_jll - 15.373 MiB
├── Glib_jll - 15.513 MiB
├── Graphite2_jll - 322.448 KiB
├── HarfBuzz_jll - 2.711 MiB
├── JpegTurbo_jll - 2.911 MiB
├── LERC_jll - 469.931 KiB
├── LZO_jll - 475.406 KiB
├── Libepoxy_jll - 3.261 MiB
├── Libffi_jll - 122.527 KiB
├── Libgcrypt_jll - 1.515 MiB
├── Libgpg_error_jll - 714.584 KiB
├── Libiconv_jll - 1.360 MiB
├── Librsvg_jll - 21.411 MiB
├── Libtiff_jll - 6.364 MiB
├── Nettle_jll - 3.401 MiB
├── PCRE_jll - 3.058 MiB
├── Pango_jll - 1.541 MiB
├── Pixman_jll - 586.403 KiB
├── Wayland_protocols_jll - 465.663 KiB
├── XML2_jll - 5.444 MiB
├── XSLT_jll - 752.667 KiB
├── Zstd_jll - 1.363 MiB
├── adwaita_icon_theme_jll - 22.570 MiB
├── gdk_pixbuf_jll - 3.807 MiB
├── hicolor_icon_theme_jll - 74.348 KiB
├── iso_codes_jll - 17.990 MiB
└── libpng_jll - 1.003 MiB
Total artifact file size: 184.204 MiB
✔ [01m:26s] PackageCompiler: compiling base system image (incremental=false)
Precompiling project...
105 dependencies successfully precompiled in 299 seconds
[ Info: PackageCompiler: Executing /MyApp/precompile_app.jl => /var/folders/zm/s53r7k495_32k9z_ctzx69g40000gn/T/jl_packagecompiler_OgPwfP/jl_5kowG3
From worker 3: [ Info: Created channels: RemoteChannel{Channel{Dict}}(3, 3, 1), RemoteChannel{Channel{Any}}(3, 3, 2) at pid: 3
From worker 2: [ Info: Created channels: RemoteChannel{Channel{Dict}}(2, 2, 1), RemoteChannel{Channel{Any}}(2, 2, 2) at pid: 2
[ Info: Created channels: RemoteChannel{Channel{Dict}}(1, 1, 36), RemoteChannel{Channel{Any}}(1, 1, 37) at pid: 1
[ Info: PackageCompiler: Done
⠋ [00m:05s] PackageCompiler: compiling incremental system image
┌ Warning: Package Base does not have Distributed in its dependencies:
│ - If you have Base checked out for development and have
│ added Distributed as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Base
│ Loading Distributed into Base from project dependency, future warnings for Base are suppressed.
└ @ nothing nothing:984
Last lines after cancelling
✖ [10h:21m:10s] PackageCompiler: compiling incremental system image
ERROR: InterruptException:
precompile_app.jl
content:
include("src/MyApp.jl")
using .MyApp
MyApp.julia_main()
System info:
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.1.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Environment:
JULIA_NUM_THREADS = 4
I worked changing some part of my precompile_app.jl
file... now getting another issue regarding a libgmodule-2.0.0.dlyb
cannot be found in defined paths.
PackageCompiler: bundled artifacts:
├── ATK_jll - 1.447 MiB
├── Bzip2_jll - 1013.525 KiB
├── Cairo_jll - 4.041 MiB
├── Expat_jll - 424.294 KiB
├── Fontconfig_jll - 1.301 MiB
├── FreeType2_jll - 1.606 MiB
├── FriBidi_jll - 376.050 KiB
├── GTK3_jll - 39.551 MiB
├── Gettext_jll - 15.373 MiB
├── Glib_jll - 15.513 MiB
├── Graphite2_jll - 322.448 KiB
├── HarfBuzz_jll - 2.711 MiB
├── JpegTurbo_jll - 2.911 MiB
├── LERC_jll - 469.931 KiB
├── LZO_jll - 475.406 KiB
├── Libepoxy_jll - 3.261 MiB
├── Libffi_jll - 122.527 KiB
├── Libgcrypt_jll - 1.515 MiB
├── Libgpg_error_jll - 714.584 KiB
├── Libiconv_jll - 1.360 MiB
├── Librsvg_jll - 21.411 MiB
├── Libtiff_jll - 6.364 MiB
├── Nettle_jll - 3.401 MiB
├── PCRE_jll - 3.058 MiB
├── Pango_jll - 1.541 MiB
├── Pixman_jll - 586.403 KiB
├── Wayland_protocols_jll - 465.663 KiB
├── XML2_jll - 5.444 MiB
├── XSLT_jll - 752.667 KiB
├── Zstd_jll - 1.363 MiB
├── adwaita_icon_theme_jll - 22.570 MiB
├── gdk_pixbuf_jll - 3.807 MiB
├── hicolor_icon_theme_jll - 74.348 KiB
├── iso_codes_jll - 17.990 MiB
└── libpng_jll - 1.003 MiB
Total artifact file size: 184.204 MiB
✔ [01m:21s] PackageCompiler: compiling base system image (incremental=false)
Precompiling project...
105 dependencies successfully precompiled in 198 seconds
[ Info: PackageCompiler: Executing /Users/pepe/MyApp/precompile_app.jl => /var/folders/zm/s53r7k495_32k9z_ctzx69g40000gn/T/jl_packagecompiler_hrIqah/jl_kLPBvA
From worker 3: [ Info: Created channels: RemoteChannel{Channel{Dict}}(3, 3, 1), RemoteChannel{Channel{Any}}(3, 3, 2) at pid: 3
From worker 2: [ Info: Created channels: RemoteChannel{Channel{Dict}}(2, 2, 1), RemoteChannel{Channel{Any}}(2, 2, 2) at pid: 2
[ Info: Created channels: RemoteChannel{Channel{Dict}}(1, 1, 36), RemoteChannel{Channel{Any}}(1, 1, 37) at pid: 1
[ Info: PackageCompiler: Done
⢰ [00m:06s] PackageCompiler: compiling incremental system imagecould not load library "/Users/pepe/.julia/artifacts/a5e3ce72eef3625cd50443d9dd458d83fd58aaf3/lib/libgtk-3.0.dylib"
dlopen(/Users/pepe/.julia/artifacts/a5e3ce72eef3625cd50443d9dd458d83fd58aaf3/lib/libgtk-3.0.dylib, 0x0001): Library not loaded: @rpath/libgmodule-2.0.0.dylib
Referenced from: /Users/pepe/.julia/artifacts/a5e3ce72eef3625cd50443d9dd458d83fd58aaf3/lib/libgtk-3.0.dylib
Reason: tried: '/Users/pepe/.julia/artifacts/a5e3ce72eef3625cd50443d9dd458d83fd58aaf3/lib/./libgmodule-2.0.0.dylib'
(no such file), '/Users/pepe/.julia/artifacts/a5e3ce72eef3625cd50443d9dd458d83fd58aaf3/lib/./libgmodule-2.0.0.dylib'
(no such file), '/Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libgmodule-2.0.0.dylib' (no such file),
'/Applications/Julia-1.7.app/Contents/Resources/julia/bin/../lib/libgmodule-2.0.0.dylib' (no such file),
'/usr/local/lib/libgmodule-2.0.0.dylib' (no such file), '/usr/lib/libgmodule-2.0.0.dylib' (no such file)
Stacktrace:
⡆ [00m:06s] PackageCompiler: compiling incremental system imageGtk.GtkBuilderLeaf(; buffer::Nothing, filename::String, resource::Nothing)
⠇ [00m:06s] PackageCompiler: compiling incremental system imageGtk ~/.julia/packages/Gtk/B6LVT/src/builder.jl:3
As you may notice, libgmodule-2.0.0.dylib
cannot be found. However, file is located into my Homebrew folder (symlink didn't work) ... Any idea or config should I use to specify "custom" lib path? I cannot find any specific option to do so.
Thank you in advance.