# Cross-compiling Crystal to aarch64

**URL:** <https://forum.crystal-lang.org/t/cross-compiling-crystal-to-aarch64/737>\
**Category:** Help & Support\
**Created:** [May 7, 2019, 2:58am UTC](https://forum.crystal-lang.org/t/cross-compiling-crystal-to-aarch64/737 "2019-05-07T02:58:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BeepDog](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/beepdog/32/405_2.png) [@BeepDog](https://forum.crystal-lang.org/u/BeepDog)\
**Post date:** [May 7, 2019, 2:58am UTC](https://forum.crystal-lang.org/t/cross-compiling-crystal-to-aarch64/737/1 "2019-05-07T02:58:59Z")

</div>

ubuntu 18.04 is out for aarch64 on the raspberry pi, and that’s awesome, but I need my crystal on it. Crystal is perfect for these tiny machines, and so it’d be awesome if I could build my apps.

I’ve been following instructions from here: [https://translate.google.com/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fconstxife.ru%2Fblog%2F2018%2F10%2F16%2Frpi-crystal.html](https://translate.google.com/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fconstxife.ru%2Fblog%2F2018%2F10%2F16%2Frpi-crystal.html) (The original blog post is in russian). I’ve gotten it mostly built, except for one problem: [https://github.com/crystal-lang/crystal/issues/5556#issuecomment-469404469](https://github.com/crystal-lang/crystal/issues/5556#issuecomment-469404469)

```
dkowis@pitwo:~/gitwork/crystal$ cc 'crystal.o' -o 'crystal' -rdynamic /home/dkowis/gitwork/crystal/src/llvm/ext/llvm_ext.o `/usr/bin/llvm-config-6.0 --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre -lm -lpthread /home/dkowis/gitwork/crystal/src/ext/libcrystal.a -levent -lrt -ldl -lgc -L/home/dkowis/.anyenv/envs/crenv/versions/0.28.0/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib
crystal.o: In function `initialize_inst_combine':
/home/dkowis/gitwork/crystal/src/llvm/pass_registry.cr:11: undefined reference to `LLVMInitializeInstCombine'
collect2: error: ld returned 1 exit status

```

I think that means there’s a bug in LLVM that I don’t have the fix for in ubuntu 18.04 llvm (1:6.0-41~exp5~ubuntu1). Has anyone else encountered this problem, or have a solution for it? I’ve also asked in ubuntu-specific land, but I’m not allowed to put more than 2 links in a post.

Thanks!

---

<div class="post-metadata">

**Author:** ![BeepDog](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/beepdog/32/405_2.png) [@BeepDog](https://forum.crystal-lang.org/u/BeepDog)\
**Post date:** [May 7, 2019, 3:00am UTC](https://forum.crystal-lang.org/t/cross-compiling-crystal-to-aarch64/737/2 "2019-05-07T03:00:49Z")

</div>

I’m also in IRC as @beepdog (I think)

---

<div class="post-metadata">

**Author:** ![wontruefree](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/wontruefree/32/1467_2.png) [@wontruefree](https://forum.crystal-lang.org/u/wontruefree)\
**Post date:** [May 7, 2019, 6:18pm UTC](https://forum.crystal-lang.org/t/cross-compiling-crystal-to-aarch64/737/3 "2019-05-07T18:18:00Z")

</div>

I don’t know the state of crystal on aarch64 but I know people have opened a few issues on it. This is the most current [issue](https://github.com/crystal-lang/crystal/issues/7293) which might be worth updating with your process and errors.

Also someone linked this [gist](https://gist.github.com/j8r/34f1a344336901960c787517b5b6d616) which you might want to try. It looks like a script to statically compile crystal for aarch64.
