musl toolchain compatibility

Skip to first unread message

Daniel Ferenczi

May 6, 2021, 6:48:19 PMMay 6
to cosmopolitan cosmonauts

first of all, congratulations on your work! I only started looking into executable formats recently and am an absolute beginner to the topic, but found your work one of the most interesting things in recent times.

While playing around with it, I've tried building an ape binary on macOS. I've had the same problems mentioned in, so I've tried using the musl toolchain. Unfortunately the produced executable doesn't work on my host, although it runs fine on linux.
Is there something gcc-specific your work relies on? What blocks it from working with musl?
I apologise if I'm overlooking something basic, I just got recently started with learning about executables and compilers.

Thank you!

Justine Tunney

May 21, 2021, 10:38:52 AMMay 21
to Daniel Ferenczi, cosmopolitan cosmonauts
You could try using the x86_64-elf-gcc compiler from homebrew. Someone recently sent us a pull request recommending it. The most stable build environment is to clone the repository and build it on Linux or inside a Docker container like Alpine that has `apk add bash zip make gzip` installed. That's because I've only ever done my dev work on Linux. So anything else is mostly community supported. If you can help us do it better, then contributions are welcome.

You received this message because you are subscribed to the Google Groups "cosmopolitan cosmonauts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit
Reply all
Reply to author
0 new messages