I’m trying to build Julia from source (v1.10.1) on a Raspberry Pi (4 Model B, with OS 64-bit, Lite, Bookworm on it). It’s been a struggle… I’ve installed zram, and that does help with the process, but it does occasionally fail.
Does anyone have a foolproof way of building Julia on an RPI?
(The reason I’m not using one of the pre-built binaries is that I have repeatedly suffered form segfaults when using the ApriTags library, and using a locally built Julia completely solves that problem).
I believe you could cross-compile for the Pi, i.e. armv7, and I’m not sure why it should not work. It gets you “pre-built binaries”, i.e. those you have made that way I suppose. I didn’t expect you could compile on the Pi at all, too little memory, and while zram worked, amazing, it’s interesting it’s not deterministic. Likely meaning it gives you effectively more RAM, but just barely enough. If you do everything the same each time, it should be deterministic, you would think, except with multi-core that’s no longer realistic. You may do things in slightly different order because of it or for other reasons, and I suppose that could affect zram.
Compression, e.g. zram, seems could and must be completely deterministic, at least the output, and everything relating to it, assuming the rest of the system is, so maybe if you boot to single-core operation (assuming you can select that in Linux), and do everything by a script to compile, then maybe it solves your problem…
In hopes of helping anyone attempting a similar thing, I can report that, unsurprisingly, I found it impossible to build Julia on an RPI with only 2 GB RAM, even with the following steps: