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 C template build error #2254

Merged
merged 1 commit into from Aug 8, 2023
Merged

Fix C template build error #2254

merged 1 commit into from Aug 8, 2023

Conversation

soxfox42
Copy link
Contributor

@soxfox42 soxfox42 commented Aug 7, 2023

Building the C template with recent (>=16) WASI SDKs caused the following error:

[wasm-validator error in function 1] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (i32.const 100836)
 (i32.const 0)
 (i32.const 66)
)
[wasm-validator error in function 31] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
 (local.get $0)
 (local.get $1)
 (local.get $2)
)
[wasm-validator error in function 32] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.fill
 (local.get $0)
 (local.get $1)
 (local.get $2)
)

This is due to WASI libc now using bulk memory operations. Building with --strip-all was removing the WebAssembly target features section, causing the validator to complain about bulk memory operations.

@nesbox nesbox added this to To do in dev version 1.1 via automation Aug 8, 2023
@nesbox nesbox merged commit 02fd0eb into nesbox:main Aug 8, 2023
30 of 31 checks passed
dev version 1.1 automation moved this from To do to Done Aug 8, 2023
@soxfox42 soxfox42 deleted the c-build-fix branch August 8, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants