# Cross-Compiling Julia from source for the Raspberry Pi 3b+

**URL:** <https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301>\
**Category:** Tooling\
**Tags:** question, compilation\
**Created:** [April 10, 2022, 2:35pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301 "2022-04-10T14:35:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [April 10, 2022, 2:35pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/1 "2022-04-10T14:35:37Z")

</div>

Hi everyone,

I was just wondering if there were any easy ways to compile Julia for `aarch64`. I have found [JuliaBerry](https://juliaberry.github.io/), which has a guide on how to locally compile Julia on the Pi itself, but this will take almost an entire day. Is there any way of cross-compiling on my main workstation (running Windows, but will likely use WSL and Debian to actually do the compilation)?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 10, 2022, 5:28pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/2 "2022-04-10T17:28:59Z")

</div>

Any particular reason for not using the pre-built binary from [Download Julia](https://julialang.org/downloads/)?

---

<div class="post-metadata">

**Author:** ![sjkelly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sjkelly/32/9280_2.png) [@sjkelly](https://discourse.julialang.org/u/sjkelly)\
**Post date:** [April 10, 2022, 5:31pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/3 "2022-04-10T17:31:23Z")

</div>

I’ve compiled it on an 8Gb RAM Pi4 in maybe an hour or two. You do need at least 4Gb RAM now. What version are you using that it takes almost a day?

I’ve compiled Julia on many SMBC through the years without issues or particularly long compile times.

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [April 11, 2022, 10:33pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/4 "2022-04-11T22:33:40Z")

</div>

Mostly this is just part of a hobby project using a small SLURM cluster. It would be nice to have a self containing installation of julia that can be shared between all the nodes.

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [April 11, 2022, 10:34pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/5 "2022-04-11T22:34:58Z")

</div>

It’s a 3b+ with only 1GB of memory, so it’s mainly about needing a large swap file which really slows things down.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 11, 2022, 10:56pm UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/6 "2022-04-11T22:56:01Z")

</div>

I must be missing why using the official binaries is not an option then. You don’t have to compile anything.

Also, cross-compiling Julia isn’t really feasible at the moment: you can actually cross-compile the executable, but to build the sysimage (which is by far the bottleneck of the process) you have to run it.

---

<div class="post-metadata">

**Author:** ![KingBoomie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kingboomie/32/29760_2.png) [@KingBoomie](https://discourse.julialang.org/u/KingBoomie)\
**Post date:** [January 19, 2023, 10:51am UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/7 "2023-01-19T10:51:20Z")

</div>

Not OP, but I need a version of julia compiled for ARMv7 arch for which there are official binaries for julia version 1.6.7, but the build process broke in the mean time and there are no binaries for latest versions.  
Although I\m having trouble running 1.6.7, so maybe this question is moot anyways.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 20, 2023, 7:14am UTC](https://discourse.julialang.org/t/cross-compiling-julia-from-source-for-the-raspberry-pi-3b/79301/8 "2023-01-20T07:14:22Z")

</div>

It might be best for you to start a new topic. Armv7 has Tier 3 support and is quite different than aarch64:

> - Tier 3: Julia may or may not build. If it does, it is unlikely to pass tests. Binaries may be available in some cases. When they are, they should be considered experimental. Ongoing support is dependent on community efforts.
