Hello,
I have a program that I programmed with Julia using DataFrames, ODBC, TOML any some other packages. I had been compiling it to a Windows App (.EXE-file) by using PackageCompiler.jl many times and everything is OK. I can relocate and execute the app on any of my other Windows 10 x64 PCs and it works stable and fast.
Now I extended my program by a few lines to create a barplot-diagram. It works in REPL, but when I compile it to an app with PackageCompiler.jl, then the resulting .EXE file throws various errors when trying to execute it. The compilation process reports no errors, but the .EXE file does not work.
I tried it with both, Plots.jl and CairoMakie.jl, and in both cases dependencies related error messages occur. Here is one example in case of CairoMakie.jl:
Warning: Error requiring `GPUArraysCore` from `ArrayInterface`
│ exception =
│ LoadError: ArgumentError: Package ArrayInterface does not have Adapt in its dependencies:
│ - You may have a partially installed environment. Try `Pkg.instantiate()`
│ to ensure all packages in the environment are installed.
│ - Or, if you have ArrayInterface checked out for development and have
│ added Adapt 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 ArrayInterface
│ Stacktrace:
│ [1] macro expansion
│ @ .\loading.jl:1167 [inlined]
│ [2] macro expansion
│ @ .\lock.jl:223 [inlined]
│ [3] require(into::Module, mod::Symbol)
│ @ Base .\loading.jl:1144
│ [4] top-level scope
│ @ C:\Users\miro\.julia\packages\ArrayInterface\a4Wwt\ext\ArrayInterfaceGPUArraysCoreExt.jl:10
│ [5] include(mod::Module, _path::String)
│ @ Base .\Base.jl:419
│ [6] include(x::String)
│ @ ArrayInterface C:\Users\miro\.julia\packages\ArrayInterface\a4Wwt\src\ArrayInterface.jl:1
...
I tried to solve the problem by adding ArrayInterface.jl and also MKL.jl (because after the error message the package manager tries to download and install this library automatically) in my Project.toml, installing both packages with Pkg.jl and creating a new Manifest.toml and compiling a new .EXE-file with PackageCompiler.jl, but it does not help. The same error message occurs!
Of course, I tried instantiate() and resolve(), but it did not help, too.
When using Plots.jl instead of CairoMakie.jl, similar errors occur, just other library dependecies are reported. I also tried to update my Project.toml, creating a new Manifest.toml and compiling a new .EXE-file with PackageCompiler.jl, but it does not help.
I even do not understand why the error messages mentions the folder C:\Users\miro.julia\packages\ because my project environment is located in another, separate project folder with separate Project.toml and Manifest.toml and, as I mentioned at the beginning of my post, the .EXE-App works if not using Plots.jl and Makie.jl. I can even copy the resulting folder containing the compiled systemimage and the .EXE file to another computer where Julia is not installed and the .EXE-App works without any problems!
What is the problem?
Are CairoMakie.jl and Plots.jl not compatible with PackageCompiler.jl?
My system:
- Windows 10 x64
- Julia Version 1.8.5
- CairoMakie v0.10.10
- PackageCompiler v2.1.9
- Plots v1.39.0
Thanks for any advices in advance!
Kind regards,
Miroslav Stimac