# \>= 2gb sysimages for Mac?

**URL:** <https://discourse.julialang.org/t/2gb-sysimages-for-mac/123672>\
**Category:** Internals & Design\
**Created:** [December 10, 2024, 5:52pm UTC](https://discourse.julialang.org/t/2gb-sysimages-for-mac/123672 "2024-12-10T17:52:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgleich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dgleich/32/1494_2.png) [@dgleich](https://discourse.julialang.org/u/dgleich)\
**Post date:** [December 10, 2024, 5:52pm UTC](https://discourse.julialang.org/t/2gb-sysimages-for-mac/123672/1 "2024-12-10T17:52:51Z")

</div>

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](https://github.com/JuliaLang/PackageCompiler.jl/issues/1019)

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:

```julia
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.)
