2

I'm trying to compile a custom system image of Julia to speed up the loading of some libraries, specially Gadfly. I tried the docs tutorial but Julia complains about undefined paths (it makes me require every single library) and after linking all of them about undefined variables STDOUT and STDERR. If I don't use a userimg.jl file the compilation works perfectly.

I first tried a userimg.jl file with only

include("/home/clavero/.julia/v0.4/Gadfly/src/Gadfly.jl")

but it complained about libraries not in path, with error messages like

Base.ArgumentError(msg="Codecs not found in path")

so I started including about 30 libraries in the correct order only to arrive at the errors about STDERR and STDOUT.

I'm running Julia as root to have write permission in the needed files, and runing in the root REPL homedir() gives me /root, so I suspect is a path problem.

How can I generate a custom image with Gadfly in it? Did I follow the guide wrong?

RedPointyJackson
  • 675
  • 8
  • 17

1 Answers1

3

Because julia 0.4 supports package precompilation, for me loading Gadfly (with using Gadfly) is not too bad, certainly not as big of a problem as the JIT-delay in generating the first plot. So simply building in Gadfly via userimg.jl won't help much.

However, you could add precompile statements to eliminate the delay. The following may be helpful:

tholy
  • 11,882
  • 1
  • 29
  • 42