That’s an underlying QEMU bug, which is used by Lima [1].
Add `ENV ERL_FLAGS="+JPperf true"` to your Dockerfile and it will build just fine cross platform. The flag just changes some things during build time and won’t affect runtime performance.
In that case can this whole thread be deleted and replaced by a link to an almost completely unrelated issue that used some of the same English words in the description? Just trying to get the full effect here.
[1] https://gitlab.com/qemu-project/qemu/-/issues/1034