Skip to content

Fix threaded build under WASI #111046

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

Closed
brettcannon opened this issue Oct 18, 2023 · 1 comment
Closed

Fix threaded build under WASI #111046

brettcannon opened this issue Oct 18, 2023 · 1 comment
Labels
build The build process and cross-build OS-wasi type-bug An unexpected behavior, bug, or error

Comments

@brettcannon
Copy link
Member

brettcannon commented Oct 18, 2023

Bug report

Bug description:

https://bytecodealliance.zulipchat.com/#narrow/stream/217126-wasmtime/topic/.60missing.20required.20memory.20export.60.20for.20threaded.20CPython/near/397361259

I think you'll want -Wl,--export-memory (the --export-memory to wasm-ld) to get past that check; threaded modules for WASI need to both import and export their memory right now.

CPython versions tested on:

3.12

Operating systems tested on:

Other

Linked PRs

@brettcannon brettcannon added type-bug An unexpected behavior, bug, or error build The build process and cross-build OS-wasi labels Oct 18, 2023
@brettcannon
Copy link
Member Author

Probably need to change the following line to include --export-memory:

AS_VAR_APPEND([LDFLAGS_NODIST], [" -Wl,--import-memory"])

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 20, 2023
…er (pythonGH-111099)

(cherry picked from commit 5dfa717)

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
brettcannon pushed a commit that referenced this issue Oct 20, 2023
…ker (GH-111099) (GH-111141)

gh-111046: for wasi-threads, export memory as well via the linker (GH-111099)
(cherry picked from commit 5dfa717)

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build OS-wasi type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant