# Cross compiling to a Raspberry Pi

**URL:** <https://racket.discourse.group/t/cross-compiling-to-a-raspberry-pi/3729>\
**Category:** General\
**Created:** [May 7, 2025, 7:16am UTC](https://racket.discourse.group/t/cross-compiling-to-a-raspberry-pi/3729 "2025-05-07T07:16:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![notjack](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@notjack](https://racket.discourse.group/u/notjack)\
**Post date:** [May 7, 2025, 7:16am UTC](https://racket.discourse.group/t/cross-compiling-to-a-raspberry-pi/3729/1 "2025-05-07T07:16:38Z")

</div>

Has anyone managed to get `raco cross` working with a Raspberry Pi? Specifically, I have a Racket package and I'd like to take that package's `main.rkt` file and demodularize it, cross-compile it to an executable for 64-bit arm linux, and use `raco cross ... dist` on that executable to get a distrutable folder I can send over to the Pi.

Unfortunately, there don't seem to be any installers at [download.racket-lang.org](http://download.racket-lang.org) for arm linux. I attempted following the instructions for [making your own installer](https://docs.racket-lang.org/raco-cross/index.html#(part._build-your-own)) and cross-compiling with it, but after successfully building the installer and tar-gzipping it, `raco cross --installer file://... --archive ... exe main.rkt` failed with a bunch of errors about missing FFI libs (`ffi-lib: could not load foreign library, path: libpng16.16.dylib`) and incompatible machine types for FASL reading (`fasl-read: incompatible fasl-object machine-type 'tarm64le found in #<binary input port bytevector>`). I've no clue how to resolve this. Has anyone gotten this working?

Also, can we add a 64-bit arm linux installer to the downloads page? Hopefully that's not too much work...

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [May 7, 2025, 6:18pm UTC](https://racket.discourse.group/t/cross-compiling-to-a-raspberry-pi/3729/2 "2025-05-07T18:18:06Z")

</div>

We're in the process of overhauling the installer builds. As part of that, I expect AArch64 (Arm64) Linux to be included in the release after v8.17. Meanwhile, there's currently AArch64 Linux at the Utah snapshot.

> `raco cross ...` failed

The `libpng16.16.dylib` issue sounds like the one described by "In some cases, however, compilation may require platform-specific native libraries" at [Cross-Compilation and Multi-Version Manager: raco cross](https://docs.racket-lang.org/raco-cross/index.html#%28part._.Platforms __.Versions__ and_.Workspaces_for_raco_cross%29). Using `raco cross pkg install draw-lib` should get past that one. But I don't have a good guess about the `'tarm64le` issue.
