JuliaLang / JuliaLang/PackageCompiler.jl
PackageCompiler taking too much time
- Dominant language
- Julia
- Stars
- 1.6k
- Forks
- 205
- Avg merge
- 18h 37m
- Merged PRs (30d)
- 7
Description
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
````
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the create_app call with precompile_app.jl on the stated Julia 1.7 macOS arm64 setup, then inspect the incremental system image stage and the Distributed warning. The mentioned entry points are precompile_app.jl and src/MyApp.jl; done means identifying why compilation exceeds the reported duration and documenting an actionable fix or confirmed limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100