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

Older command line arguments failing in wasm-ld #385

Closed
kushaldas opened this issue Feb 12, 2024 · 4 comments
Closed

Older command line arguments failing in wasm-ld #385

kushaldas opened this issue Feb 12, 2024 · 4 comments

Comments

@kushaldas
Copy link

While building CPython with wasi-sdk-21 I got the following error.

/opt/wasi-sdk/bin/wasm-ld   -z stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760   Modules/_testimportmultiple.o   -o Modules/_testimportmultiple.cpython-313d-wasm32-wasi.so
wasm-ld: error: unknown argument: -Wl,--stack-first
wasm-ld: error: unknown argument: -Wl,--initial-memory=10485760
make: *** [Makefile:3183: Modules/_testimportmultiple.cpython-313d-wasm32-wasi.so] Error 1

Can you please tell me what are the new/expected arguments to wasm-ld for this?

@sbc100
Copy link
Member

sbc100 commented Feb 12, 2024

If you are invoking the linker directly you don't prefix the linker args with -Wl,. That prefix is what the compiler driver (clang) uses to distinguish linker argument.

@brettcannon
Copy link
Contributor

brettcannon commented Feb 13, 2024

If you are invoking the linker directly you don't prefix the linker args with -Wl,. That prefix is what the compiler driver (clang) uses to distinguish linker argument.

This comes from CPython's configure.ac which sets it in LDFLAGS and has worked until now (e.g. WASI SDK 20 is fine with this). So we're trying to figure out who/what changed.

@brettcannon
Copy link
Contributor

I found the issue on our side. We had not seen it before because dlopen() never existed before. 😅

@kushaldas
Copy link
Author

Closing the issue.

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

3 participants