Skip to content
New issue

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

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

Already on GitHub? # to your account

Tests don't build locally #485

Open
abrown opened this issue Sep 5, 2024 · 3 comments
Open

Tests don't build locally #485

abrown opened this issue Sep 5, 2024 · 3 comments

Comments

@abrown
Copy link
Collaborator

abrown commented Sep 5, 2024

While building wasi-sdk locally, I observed that some of the compile tests fail:

$ build.sh
FAILED: tests/compile-only/wasm32-wasip2.-O0.addresses.c.wasm
: && /home/abrown/Code/wasi-sdk/build/install/share/cmake/../..//bin/clang --target=wasm32-wasi -O2 -g -DNDEBUG
--sysroot=/home/abrown/Code/wasi-sdk/build/sysroot/install/share/wasi-sysroot -resource-dir
/home/abrown/Code/wasi-sdk/build/sysroot/install/wasi-resource-dir --target=wasm32-wasip2
tests/compile-only/CMakeFiles/wasm32-wasip2.-O0.addresses.c.dir/addresses.c.obj -o tests/compile-only/wasm32-wasip2.-O0.addresses.c.wasm   && :
[parse exception: surprising value (at 0:8)]
Fatal: error parsing wasm (try --debug for more info)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@alexcrichton
Copy link
Collaborator

I believe you're running into wasm-opt being in your $PATH and is automatically being run by clang over components, and wasm-opt doesn't support components yet. A better error message has landed on binaryen's main branch I believe to help address this in the future.

@abrown
Copy link
Collaborator Author

abrown commented Sep 5, 2024

Ugh, right. Should we try to turn off wasm-opt with --no-wasm-opt (#95208) for the *p2 tests?

@alexcrichton
Copy link
Collaborator

In the future llvm/llvm-project#98373 should suffice for fixing this but that's not included in the LLVM submodule right now (and I haven't checked if it's included in LLVM 19). In the meantime though --no-wasm-opt sounds reasonable to me!

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

No branches or pull requests

2 participants