# Problem compiling models with cmdstan on arm64

**URL:** <https://discourse.mc-stan.org/t/problem-compiling-models-with-cmdstan-on-arm64/19601>\
**Category:** CmdStan\
**Created:** [December 2, 2020, 6:31pm UTC](https://discourse.mc-stan.org/t/problem-compiling-models-with-cmdstan-on-arm64/19601 "2020-12-02T18:31:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![StaffanBetner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/staffanbetner/32/11056_2.png) [@StaffanBetner](https://discourse.mc-stan.org/u/StaffanBetner)\
**Post date:** [December 3, 2020, 7:45pm UTC](https://discourse.mc-stan.org/t/problem-compiling-models-with-cmdstan-on-arm64/19601/4 "2020-12-03T19:45:39Z")

</div>

> [@StaffanBetner](#):
>
> One possible hack would be to run it through qemu.

Made a bash script which I compiled into a binary with shc:

```no-highlight
#!/bin/sh

qemu-x86_64 /root/.cmdstan/cmdstan-2.25.0/bin/stanc_x86_64 "$@"

```

with the earlier stanc binary renamed as stanc\_x86\_64, and then the compiled bash script renamed to stanc. EDIT: Path edited.

Trying to compile once again, and I get this:

```no-highlight
> cmdstanr_example()
Compiling Stan program...
make: *** [make/program:53: /tmp/RtmpE57fTx/model-59645f9ebd62.hpp] Error 1
Error: An error occured during compilation! See the message above for more information.

```

I should also add that compilation with RStan works fine.

---

_[View the full topic](https://discourse.mc-stan.org/t/problem-compiling-models-with-cmdstan-on-arm64/19601)._
