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

Fix AOT compilation on MacOS #3102

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

eloparco
Copy link
Contributor

After #2995, AOT stopped working properly on my arm MacOS:

[10:31:34:240 - 206309B40]: /Users/eloparco/dev/forks/wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c, line 1270, WASM module load failed
AOT module load failed: mmap memory failed

That's because, without #include <TargetConditionals.h>, TARGET_OS_OSX is undefined (since it's definition is in that header file).

I wanted to setup a step in CI for MacOS to avoid things to break again in the future, but in CI AOT seems to work even without (I guess because there we use an Intel MacOS node, not ARM).

@eloparco eloparco force-pushed the eloparco/fix-macos-aot branch from 3ed7a64 to 0d057e0 Compare January 31, 2024 09:35
@yamt
Copy link
Collaborator

yamt commented Jan 31, 2024

I wanted to setup a step in CI for MacOS to avoid things to break again in the future, but in CI AOT seems to work even without (I guess because there we use an Intel MacOS node, not ARM).

there seems to be a runner with M1.
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

@eloparco
Copy link
Contributor Author

@yamt
Copy link
Collaborator

yamt commented Jan 31, 2024

there seems to be a runner with M1.
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

macos-14? It seems to be in beta

sure.
i have no idea about "beta" implications because i haven't used it.

@eloparco
Copy link
Contributor Author

i have no idea about "beta" implications because i haven't used it.

Me neither, it says: Warning: Beta and Deprecated Images are provided "as-is", "with all faults" and "as available" and are excluded from the service level agreement and warranty. I'll wait until it's stable and then I'll try to add it to CI.

@wenyongh
Copy link
Contributor

@eloparco, @yamt should I merge the PR? Or wait for new update?

@yamt
Copy link
Collaborator

yamt commented Jan 31, 2024

@eloparco, @yamt should I merge the PR? Or wait for new update?

no reason to block.

@wenyongh wenyongh merged commit dfd2a5b into bytecodealliance:main Jan 31, 2024
407 checks passed
@eloparco
Copy link
Contributor Author

I'll open a PR to add the M1 node when I have time

@eloparco eloparco mentioned this pull request Feb 2, 2024
wenyongh pushed a commit that referenced this pull request Feb 3, 2024
Add ARM MacOS to the CI, to prevent regressions like the one fixed in #3102 in the future.
And add the AOT compilation to the wasi-threads example.
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
After bytecodealliance#2995, AOT may stop working properly on arm MacOS:
```bash
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c,
line 1270, WASM module load failed
AOT module load failed: mmap memory failed
```
That's because, without `#include <TargetConditionals.h>`, `TARGET_OS_OSX` is undefined,
since it's definition is in that header file.
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Add ARM MacOS to the CI, to prevent regressions like the one fixed in bytecodealliance#3102 in the future.
And add the AOT compilation to the wasi-threads example.
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

Successfully merging this pull request may close these issues.

3 participants