Building Julia master on Raspberry Pi

(I hope that Development is not an inappropriate category to use for this topic.)

I had been building Julia master on Raspberry Pi from JuiliaCon 2016 until mid-February

Starting recently, I have been getting “LLVM ERROR: out of memory”.
Just wondering if there’s anyone who is successfully building Julia master on Raspberry Pi,
and if so could you provide me with any insights into getting it working? Thanks in advance.

You could try reducing the number of precompile statements (perhaps remove them completely). Basically empty the precompile.jl file. Julia will be quite sluggish to start but perhaps the compilation goes through.

Which OS are you using? You could try to add more virtual RAM with zram:

I am running Raspbian jessie with a 4 GB swap file.

1 Like
  • How are you building it?
  • Try to make it run in serial with -j1 option.
  • Do you still have space on the SD?
  • zram is faster and better than swap file for SD cards, you can use both though.

The place where this happens is when the syimg is being created and the memory this uses depend quite strongly on how much stuff is in the precompile.jl. Therefore, the first thing I would change it to reduce the number of stuff in precompile.jl.


Yes, if I empty out base/precompile.jl the build does complete successfully.
And yes, the resulting julia is quite sluggish (takes almost a full minute to start up).
Is there a recommended way to judiciously prune base/precompile.jl so that less
frequently used methods are left out, but enough is left in so that start up time is
more reasonable, and the build still succeeds?

Also, might it be beneficial to run a 64-bit OS? Is there one that Julia people
recommend for the Raspberry Pi? Any other ideas are welcome.

This is the only 64 bits OS I’ve tried for RPi3

Here is my repository that build Julia for Raspberry Pi you can build and run even raspberry pi zero.

I recommend we use docker instead of building Julia on Raspberry Pi locally
Hope it helps