# Build julia-debug on a Raspberry Pi

**URL:** https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556
**Category:** General Usage
**Tags:** question, debug, raspberry-pi
**Created:** [February 1, 2024, 8:27am UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556 "2024-02-01T08:27:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [February 1, 2024, 8:27am UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556/1 "2024-02-01T08:27:49Z")

</div>

I’m running into sporadic segfaults when using [GitHub - JuliaRobotics/AprilTags.jl: Using Apriltags in Julia](https://github.com/JuliaRobotics/AprilTags.jl), 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](https://docs.julialang.org/en/v1/devdocs/backtraces/#Segfaults-when-running-a-script)).

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?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [February 1, 2024, 8:31am UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556/2 "2024-02-01T08:31:19Z")

</div>

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%.

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [February 1, 2024, 8:36am UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556/3 "2024-02-01T08:36:55Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [February 1, 2024, 10:49am UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556/4 "2024-02-01T10:49:38Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)
#### Post date: [February 1, 2024, 12:00pm UTC](https://discourse.julialang.org/t/build-julia-debug-on-a-raspberry-pi/109556/5 "2024-02-01T12:00:15Z")

</div>

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…
