musl toolchain compatibility

78 views
Skip to first unread message

Daniel Ferenczi

unread,
May 6, 2021, 6:48:19 PM5/6/21
to cosmopolitan cosmonauts
Hello,

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 https://github.com/jart/cosmopolitan/issues/80, 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!
Daniel

Justine Tunney

unread,
May 21, 2021, 10:38:52 AM5/21/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 cosmopolitan-l...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cosmopolitan-libc/07586f4f-94cc-4289-888d-94fa04c3f71en%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages