7 ms·
I tried on MacOS and it does not work (exec format error)
by j_leboulanger 4y ago
I tried on MacOS and it does not work (exec format error)
- diego_moita 4y agoI suspect your CPU is Silicon (ARM based), not Intel. The binary code is for Intel processors. Silicon chips have a completely different instruction set. For this same reason Android, iOS and RTos (for embeded systems) are not included among the targets.
- BeefWellington 4y agoThis highlights the ongoing problem of article titles needing to be eye-grabbing but usually inaccurate/misleading or more complex than a simple title allows for.
- sph 4y agoIt's a title, it cannot be a paragraph long to be pedantically clear and unambiguous in what to expect. "Website that lets you download a 1KB long executable that can be run on 7 _kernels_ and x86_64 architectures, but actually it's only been tested on Intel and will probably not work on Android even if technically it's still a Linux kernel, also Linux < 2.6 is unsupported so YMMV"
- BeefWellington 4y agoMy comment (which I could have made more clear) was intended to be responding to the idea of quoting the title and then claiming it's misleading. I agree fully with what you're saying.
- Folcon 4y agoI had this also happen because macos now uses zsh as the default shell and this approach is bash compatible. So you needed additional steps for macos. Not sure if that has been recently resolved?
- alganet 4y agoThere is a fix: https://github.com/jart/zsh/commit/94a4bc14bb2e415ec3d10cf716512bd3e0d99f48 https://github.com/jart/zsh/commit/94a4bc14bb2e415ec3d10cf71... Not sure if it was merged. Her approach is not bash-only, zsh is the odd one out on this one.
- jart 4y agoIt was merged: https://github.com/zsh-users/zsh/commit/326d9c203b3980c0f841bc62b06e37134c6e51ea https://github.com/zsh-users/zsh/commit/326d9c203b3980c0f841... We patched fish too! Plus NetBSD sh and FreeBSD sh.
- ok_dad 4y agoIf it's a zsh problem, you need to do something like: bash -c './redbean.com' or whatever your executable is called. ZSH is doing something incorrectly that prevents running these binaries.
- theta_d 4y agoPedantry incoming: Intel processors are also made of silicon. "Apple Silicon" is just a way to say chips designed by Apple vs a 3rd party like Intel. The instructions are Arm vs x86. This has nothing to do with the underlying substrate of silicon.
- kelnos 4y agoI know that I have a general bias against Apple, but it has generally annoyed me that Apple has decided to take a generic industry term like "$FOO Silicon" and turn it into a marketing title.
- andsoitis 4y agoTo add more color. There are two kinds of ARM licenses. One is for chipset designs (e.g. Cortex - https://en.wikipedia.org/wiki/ARM_Cortex-A https://en.wikipedia.org/wiki/ARM_Cortex-A) that you get fabricated to get your CPUs. The other ARM license is an ISA license. You get no chip design. All you get is the instruction set architecture but you have to design the chip yourself. That's what Apple has been doing.
- _joel 4y agoWill it run via rosetta?
- paulclinger 4y agoYes, there have been several recent changes to make Cosmopolitan executables run under Rosetta.
- j_leboulanger 4y agoNo I'm using an intel MBP.
- edualm 4y agoWorks for me both under rosetta and native arm64 (macOS 12.2.1, M1 Max) - both by double-clicking the executable and using zsh. Only thing I had to do was rename the file to open it in Finder first because of gatekeeper requirements. arch -x86_64 ./hello2 hello world ./hello2 hello world