I’m trying to compile a simple app that depends on Plots.jl and the GR backend using PackageCompiler.jl. I get warnings about Plots and GR being not relocatable. If I ignore the warnings, indeed the app doesn’t run in my friend’s computer because it references paths on my computer.
Is there any Plots.jl backend or different plot package (Gadfly? VegaLite?) that is relocatable so I can compile the app correctly and share the executable with a friend?
Our of curiosity, is there a particular reason you would like to give your friend an app and not let your friend use the Julia package itself via normal Julia Package tools?
Well, it’s more like a test. Actually, my friend has Julia installed in his computer… but eventually I would need to run my Julia code in systems where I can’t install software, so I’d like to be able to create apps that doesn’t requiere a Julia install.
I think Makie should be, because all of its binary dependencies are JLL packages (as far as I know). I think that would be the issue with GR. If you are going to do much plotting with Makie, I’d use MakieLayout too.
Can you ship a Docker image on those systems?
I’m not sure, but sounds like a good idea. I have little experience with Docker, but I’ll give it a try if Makie doesn’t work.
Gadfly has a pure-julia SVG backend available. No binaries involved, so it should be relocatable. Just make sure you don’t also have Cairo.jl available in the environment or it will attempt to use cairo for the plot instead.
Is there a way to force Gadfly.jl to always use the pure-Julia SVG backend, even if Cairo.jl is available in the environment?
Looking at the code, I believe I was wrong and the pure-julia backend is always used for SVG. Obviously if you use PackageCompiler.jl on an environment that includes it though it will include Cairo in the output.
Recently, I found Gaston.jl. It has a few dependencies and is relocatable, so the compiled bundle is smaller and doesn’t show warnings in computers without Julia installed.
I managed to compile GMDApp with Gaston.jl and PackageCompiler.jl. GMDApp is a Julia program for ground motion selection that shows a log-log plot of spectral acceleration.