The Crystal Programming Language Forum

Building Crystal for Raspbian/ArmHF

Hey All,

I am trying to build Crystal (v0.34.0) for Raspbian (Buster). While I can get crystal compiler/interpreter to cross compile in a container on Ubuntu 19.10, the compiler fails to compile even a simple puts '3' snippet. I have created an issue on Github. I am curious if anyone has any ideas about what might be wrong and how to fix it.

Thanks in advance,

I am also experiencing problems using a cross compiled crystal to build crystal. I get the errors shown in this issue https://github.com/crystal-lang/crystal/issues/9148 every time I try to compile on arm. I also see an error about multiple allocations of very large objects before the sig11.

Interesting project, the LLVM framework is not that good supported on the ARM platform.
For which architecture do you try to build ?

Raspbian builds a single image for all of the Raspberry families, so you will get an armhf 32-bit, hard floating-point system, but built for the ARMv6 ISA (with VFP2), unlike Debian’s ARMv7 ISA (with VFP3) port.

BR,
Peter

From experimenting in both a container and a RPi, I was able to isolate this issue to the container; even a simple C program that uses readdir fails in the container. Upon building the compiler on an RPi, I am now encountering a different error, which is posted on the issue.

I am building for the target armv7l-unknonwn-linux-gnueabihf. The instructions that I am following are here. Does that answer your question?