>= 2gb sysimages for Mac?

Is there any limit to the size of a Julia sysimage on macOS? Currently, the answer seems to be yes… 2GB limit to sysimage size? · Issue #1019 · JuliaLang/PackageCompiler.jl · GitHub

However, I’m trying to see if Julia can use the medium code model to enable bigger sysimages. (e.g. a 3.4GB one works fine on Linux…). My simple attempts at modifying the aotcompile.cpp file to enable this run into another linker error when trying to compile the base Julia sysimage:

ld: illegal text-relocation in '_julia_Dict_44375'+0x43 (/Volumes/Videos/julia-compile/julia/usr/lib/julia/sys-o.a[2](text#0.o)) to '_SUM.CoreDOT.GenericMemoryYY.26010'

(there are more details in the thread along with a link to where x86-64 changed to the medium code model on linux.)

So I’m hoping someone more knowledgeable about Mach-O shared objects, segments, etc. might be able to suggest…

  1. This isn’t possible or
  2. Some ideas to pursue.

I realize >= 2 GB seems big, but if you simply compile GLMakie, CairoMakie, DifferentialEquations, and Flux you get to a 1.6 GB sysimage already and I’m trying to see if I can throw in additional packages I use often. (This pushes it to a little bit over 2 GB, exactly how far depends on exactly how much I include.)

5 Likes