Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not support Apple Silicon #465

Open
fxcoudert opened this issue Nov 11, 2022 · 6 comments
Open

Does not support Apple Silicon #465

fxcoudert opened this issue Nov 11, 2022 · 6 comments

Comments

@fxcoudert
Copy link

Compilation on ARM macOS (aka Apple Silicon) leads to a build failure:

/tmp/io-20221111-68531-j5uskf/io-2017.09.06/libs/coroutine/source/asm.S:143:2: error: unrecognized instruction mnemonic
 mflr r0
 ^
/tmp/io-20221111-68531-j5uskf/io-2017.09.06/libs/coroutine/source/asm.S:144:2: error: unrecognized instruction mnemonic
 mfcr r5
 ^
/tmp/io-20221111-68531-j5uskf/io-2017.09.06/libs/coroutine/source/asm.S:145:2: error: unrecognized instruction mnemonic
 mfctr r6
 ^
/tmp/io-20221111-68531-j5uskf/io-2017.09.06/libs/coroutine/source/asm.S:146:2: error: unrecognized instruction mnemonic
 mfxer r7
 ^
/tmp/io-20221111-68531-j5uskf/io-2017.09.06/libs/coroutine/source/asm.S:147:13: error: unexpected token in argument list
 stw r0, 0*4(r3)
            ^
@shayneoneill
Copy link

Any chance of getting this fixed? Intel macs are getting closer and closer to EOLed for support, and with that usually comes the end of Rosetta.

@PedroBatista
Copy link

PedroBatista commented Mar 5, 2024

I think Rosetta will be around for many years, the problem is ( seems to be ) the assembly code in asm.S. It also blocked me from running this with WASM.

Since assembly programming is a long lost art, my guess would be to tell ChatGPT to translate it ( unlikely ) or to implement #define NEEDARMCONTEXT 1
#define SET setmcontext
#define GET getmcontext

in C.


@fxcoudert @shayneoneill Just noticed in the original post the build is entering in the #ifdef NEEDPOWERCONTEXT instead of the #ifdef NEEDARMCONTEXT. If you can make it enter the ARM part perhaps there is no problem with the code itself since it's 32bit ARM, I don't know for sure but ARM64 should support 32bit registers?

@stevedekorte
Copy link
Member

I thought Apple finally got ucontext working. If so, we can just set the ifdef for that.

@stevedekorte
Copy link
Member

I think Rosetta will be around for many years, the problem is ( seems to be ) the assembly code in asm.S. It also blocked me from running this with WASM.

There is an IoWASM project: https://github.com/stevedekorte/ioWasm

And an online REPL demo that uses it: https://iolanguage.org/repl/index.html

Would be great to see some bindings into JS and the DOM.

@shayneoneill
Copy link

shayneoneill commented Mar 6, 2024

@PedroBatista Perhaps, but the original Rosetta (for running PowerPC apps on Intel macs) really only was around for about 4-5 years, and we're at year 3 with Rosetta2. So maybe a couple of more years? Its a bit of breathing room, but not much. Theres still a fair few legacy Intel macs out there, and Apple for all its faults, is likely not in a hurry to go kicking its legacy customers out of its software distribution pipelines. But apple does have form for this sort of deprecation too.

That said, Apple will likely give some deprecation notice a version or two of macos before yeeting it.

@stevedekorte
Copy link
Member

I'd happy offer a bounty (say $200?) for anyone to do this. I'd do it myself but I'm busy with another project and haven't touched XCode in ages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants