I am trying to use roc on Alpine Linux.
So far it is not going so great, with either binary using the https://github.com/roc-lang/nightlies/releases/tag/nightly-2026-August-01-1c1cecc (roc_nightly-linux_x86_64-2026-08-01-1c1cecc.tar.gz) or building from source https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/106329 I get this error:
![]()
Could not build it on my own Laptop, because it needs to much memory. (I have 4 GB and 4 GB SWAP)
Are you on an arm or intel architecture? I'm thinking about how we might repro this, maybe Docker could help.
nvm I see in your build
My immediate suspicion is that we now target the x86-64-v3 CPU level for SIMD ... maybe that is related?
I was able to reproduce the Illegal instruction failure with the help of Codex.
Roc targets the x86-64-v3 CPU level, which requires features including AVX2 and BMI2. On a CPU that does not provide that instruction set, the operating system terminates Roc with SIGILL, which the shell displays as Illegal instruction.
We verified the CPU boundary using QEMU emulation:
| Emulated CPU | Result |
|---|---|
| Nehalem | Illegal instruction (exit 132) |
| Sandy Bridge | Illegal instruction (exit 132) |
| Ivy Bridge | Illegal instruction (exit 132) |
| Haswell | Roc starts successfully |
Could you please share your CPU model and flags? On Alpine/Linux, this command should provide the relevant information:
grep -m1 -E 'model name|flags' /proc/cpuinfo
The source build running out of memory on a machine with 4 GB RAM and 4 GB swap is unrelated.
At the very least we should probably have all this documented somewhere...
I'm not sure if the cli itself needs this. I know Richard landed https://github.com/roc-lang/roc/pull/10302 recently which added the requirement for generated code.
I would assume it is possible to patch the compiler and should be possible to use the interpreter on these cpu's.
The source build running out of memory on a machine with 4 GB RAM and 4 GB swap is unrelated. (I know, but I would like to have that documented as well, how much approximately is needed to build roc)
CPU (pretty old, 2 cores) : model name : Intel(R) Celeron(R) N4020 CPU @ 1.10GHz
Idk if this helps, but zig works, and they also have llvm backend
Thank you for the feedback, I made an issue so we can track this and roll it into our docs https://github.com/roc-lang/roc/issues/10538
The documentation is a nice to have, but this actually does not solve my problem. Will I be able to use roc? Or will there be specific system requirements like windows has
@removewingman just to clarify, is the issue that you can't run roc at all, or that you can't run the roc programs that it builds, or both?
I assume it's the Celeron processor not having the instructions we're expecting, and there are different potential solutions depending on which is the issue
@Richard Feldman The first thing, if I try to compile a .roc file, I get the error, so I don't even get to the second step. I tried to get a hello world up and running.

@removewingman can you try it out on current main? This PR should hopefully have fixed it!
@Richard Feldman Nice, it actually fixed the problem with the Celeron processor, thanks.
Now there is a problem with linking, probably Alpine Linux and musl libc related:
![]()
(if the commit is in the next nightly build, gonna try with this one again, maybe it will work did not work)
@Anton Feedback for: https://github.com/roc-lang/nightlies/releases/
For building nightly one needs the source code from the current nightly build, this can be obtained by: https://github.com/roc-lang/roc/archive/$_commit.tar.gz
nightly-2026-August-02-a8ef66c to nightly-2026-08-02-a8ef66c, so when building one only has to copy the latest title and that's it. Example Link: https://github.com/roc-lang/nightlies/releases/download/nightly-2026-August-02-a8ef66c/roc_nightly-linux_x86_64-2026-08-02-a8ef66c.tar.gzThis would make it simpler and one does not have to rely on the github archive feature of commits.
I hope it is ok to ping and give feedback/make suggestions :upside_down:
removewingman said:
Now there is a problem with linking, probably Alpine Linux and musl libc related:
@removewingman can you try on https://github.com/roc-lang/roc/pull/10582 and see if it works on that branch?
@Richard Feldman It worked, lets go, much appreciated.
![]()
I will wait until the changes in roc-lang/nightlies are landed and finish the aport.
removewingman has marked this topic as resolved.
removewingman has marked this topic as unresolved.
@Richard Feldman Sorry, have to unresolve, while trying to run hello world
Got the following error (main.roc works tho):
![]()
It would be good to know if thats on the platform or roc side... not sure how to figure that out
I'm on it
it turned out to be kinda both: selecting which host to use for the platform: https://github.com/roc-lang/roc/pull/10593
This is currently the branch default-platform-no-libc, got this:
![]()
it this the expected behavior? I am confused, would be best if https://github.com/roc-lang/roc/pull/10582 is merged, to eliminate that this is the mistake
it's definitely not the expected behavior! and I'll merge that PR as soon as it passes CI :smile:
- Would it be possible to add the roc-lang source code as .tar.gz from the current commit.
@removewingman, this will be published starting tomorrow
Also with https://github.com/roc-lang/roc/pull/10593 landed and the others, I still get the following error, maybe it is the platform now? Idk.
![]()
yep, that's a platform issue! I'll open a PR to the platform
https://github.com/lukewilliamboswell/roc-platform-template-zig/pull/37
I'm just hardening up the test infra while I'm looking at this platform again, lessons I've learnt elsewhere
Almost done
https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/tag/1.1.0
Lets go, the second time :)
Works:
![]()
Thanks for the work, much appreciated.
If one wants to have actual BSD support or other targets, one needs Compiler and Plattform support, imo these should be tracked together.
removewingman has marked this topic as resolved.
removewingman has marked this topic as unresolved.
Would it be also possible after the zig roc platform template has now support for x64v1musl and arm64v1musl with: https://github.com/lukewilliamboswell/roc-platform-template-zig/pull/37
To add these here aswell:
Last updated: Aug 12 2026 at 12:35 UTC