-
-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I am able to compile a static binary (executable) for a project that uses only standard library namely some LinearAlgebra and prints out the result of matrix computation. This looks promising, thank you for your work!
However when I try to add dependencies to the project (Images, Optim) I start getting compilation errors and segfaults.
In case of --trim=safe I am getting unresolved call from statement type errors like
Verifier error #1: unresolved call from statement (Segm.calc_background(Base.memoryrefget(Base.memoryrefnew(Base.getfield(ARGS::Vector{String}, :ref)::MemoryRef{String}, 1, false::Bool)::MemoryRef{String}, :not_atomic, false::Bool)::String)::Any / 255)::Any
Stacktrace:
[1] macro expansion
@ ~/code/Segm.jl/src/Segm.jl:10 [inlined]
[2] macro expansion
@ timing.jl:689 [inlined]
[3] main(ARGS::Vector{String})
@ Segm ~/code/Segm.jl/src/Segm.jl:8
[4] _main(argc::Int32, argv::Ptr{Ptr{Int8}})
@ Main ~/.julia/packages/JuliaC/L13jU/src/scripts/juliac-buildscript.jl:73
If I disable trim I get the binary but it doesn't work - I get a lot of runtime errors. From this trace it is pretty clear that there are some issues with the dependencies here:
find_files: 0.000178 seconds (421 allocations: 29.109 KiB)
Errors encountered while load FileIO.File{FileIO.DataFormat{:JPEG}, String}("data/207.60-82/000.jpg").
Errors encountered while load FileIO.File{FileIO.DataFormat{:JPEG}, String}("data/207.60-82/104.jpg").All errors:
Errors encountered while load FileIO.File{FileIO.DataFormat{:JPEG}, String}("data/207.60-82/152.jpg").===========================================
All errors:Errors encountered while load FileIO.File{FileIO.DataFormat{:JPEG}, String}("data/207.60-82/056.jpg").
===========================================
All errors:
===========================================
All errors:
===========================================
ArgumentError: Package JpegTurbo [b835a17e-a41a-41e7-81f0-2f016b05efe0] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
ArgumentError: Package JpegTurbo [b835a17e-a41a-41e7-81f0-2f016b05efe0] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
ArgumentError: Package JpegTurbo [b835a17e-a41a-41e7-81f0-2f016b05efe0] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
===========================================
===========================================
ArgumentError: Package JpegTurbo [b835a17e-a41a-41e7-81f0-2f016b05efe0] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageIO [82e4d734-157c-48bb-816b-45c225c6df19] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageIO [82e4d734-157c-48bb-816b-45c225c6df19] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageIO [82e4d734-157c-48bb-816b-45c225c6df19] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageIO [82e4d734-157c-48bb-816b-45c225c6df19] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package ImageMagick [6218d12a-5da1-5696-b52f-db25d2ecc6d1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError: Package OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Fatal error:
===========================================
ArgumentError:
Fatal error:Package OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
===========================================
ArgumentError:
Fatal error:
Package OpenCV [f878e3a2-a245-4720-8660-60795d644f2a] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Is it even supposed to work right now or the JuliaC is such a work in progress that all we can expect is binaries that use "batteries" that come with Julia?
I think it would be nice to have a well documented "real world" class example that uses JuliaC and produces an actual working binary for some non trivial case. By this I mean a project that uses multiple actual dependencies like Zygote, Optim, Images, DifferentialEquations and so on. Also it is unclear how to force the JuliaC to go over some precompile script to ensure that binary contains everything that is needed for it to work without extra compilation.
It would be nice to have a few words from the package creators on limitation. Like we can't expect static binaries that generate plots using Plots or Makie and export them to disk right? Or can we?
I can prepare a minimal reproducer from my project to demonstrate the issues I am facing in case you need that. However it seems to me that this request is pretty generic and doesn't require a reproducer.