Build julia-debug on a Raspberry Pi

I’m running into sporadic segfaults when using GitHub - JuliaRobotics/AprilTags.jl: Using Apriltags in Julia, and after some (extensive) tinkering with @johanter he wisely suggested I try to run my segfault-causing script with gdb and julia-debug (explained here).

But all my attempts to build julia-debug (i.e. make debug) stall (when outputting the system image stage) on the RPI (model 4B, bookworm aarch64). Are there any available binaries of the v1.10.0 julia-debug available, or does anyone know more about this?

How much RAM do you have? Did you check the RAM usage during compilation using htop or a similar command?

Do you use zram?

If you are low of RAM, zram can increase the usable RAM by 50%.

1 Like

This RPI has 8 GB, I start the build process from a freshly rebooted pi. But yeah, I’ve noticed that the RAM gets used up. Checking zram… Checked and installed zram, very cool! I now have >9 GB swap. Thanks for the tip!

Let’s see if this works…

I have used zram in the past and it is pretty cool.
My stupid question - if the process again fails is it possible to cross-compile Julia-debug with the correct target architecture for Raspberry Pi?
I imagine that this would be quite complicated. Is there such thing as a container image with the correct libraries and compiler?

It worked! I successfully managed to make debug!

Now for the actual reason I did this: I’m running gdb --args usr/bin/julia-debug --threads=4 my_script.jl to discover where and why the segfault occurs…