Stream: git-wasmtime

Topic: wasmtime / Issue #603 error <wasi/core.h> is only support...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 08:49):

rutvora commented on Issue #603:

Hey, I'm facing a similar issue. Please comment the solution if you remember. Would be helpful.
Thanks

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 08:51):

bjorn3 commented on Issue #603:

You must use the clang that is part of wasi-sdk, not your system clang.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 08:56):

rutvora commented on Issue #603:

I am using the wasi-sdk one
Here's my call
CC check-credentials/src/MD5.cpp -o MD5.wasm -nostartfiles -Wl,--no-entry,--export=GetMD5String -fno-exceptions --target=wasm32 -I ./wasi-sdk-11.0/share/wasi-sysroot/include/ where CC is [WASI_SDK_PATH]/bin/clang --sysroot=[WASI_SDK_PATH]/share/wasi-sysroot/

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 08:58):

rutvora edited a comment on Issue #603:

I am using the wasi-sdk one
Here's my call
CC check-credentials/src/MD5.cpp -o MD5.wasm -nostartfiles -Wl,--no-entry,--export=GetMD5String -fno-exceptions --target=wasm32 -I ./wasi-sdk-11.0/share/wasi-sysroot/include/ where CC is [WASI_SDK_PATH]/bin/clang --sysroot=[WASI_SDK_PATH]/share/wasi-sysroot/

Btw, setting --target=wasm32-wasi or --target=wasm32-unknown-wasi returns to me no available targets found compatible.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 08:59):

bjorn3 commented on Issue #603:

Does it work without the --target argument?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 09:01):

rutvora commented on Issue #603:

No, it gave a bunch of errors and a lot more warnings. All associated with wasi/api.h with the first error still being the same, that it is only available on WASI platforms.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 09:05):

rutvora commented on Issue #603:

it crashes on #ifndef __wasi__
Am I supposed to add an additional header somewhere in my code?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 09:07):

rutvora edited a comment on Issue #603:

it crashes on #ifndef \_\_wasi\_\_
Am I supposed to add an additional header somewhere in my code?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 15:02):

sunfishcode commented on Issue #603:

__wasi__ is predefined by clang when the target is wasm32-wasi. If --target=wasm32-wasi says no targets found compatible, is it possible you're accidentally using some other clang, rather than the clang from the wasi-sdk package?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 18:57):

rutvora commented on Issue #603:

@sunfishcode I'm sure I'm calling the clang from WASI SDK. For reference, I have mentioned the command I used in a comment above. And I'm sure the env variable there points to the correct WASI_SDK directory.
I'm on MacOS Catalina, if that has some special conditions which I might have missed out on.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 19:08):

rutvora deleted a comment on Issue #603:

@sunfishcode I'm sure I'm calling the clang from WASI SDK. For reference, I have mentioned the command I used in a comment above. And I'm sure the env variable there points to the correct WASI_SDK directory.
I'm on MacOS Catalina, if that has some special conditions which I might have missed out on.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 29 2020 at 19:11):

rutvora commented on Issue #603:

@sunfishcode I rechecked, turns out I wasn't. I was calling "[WASI_SDK_PATH]/bin/clang" (as a literal) and it defaulted to xCode Clang somehow :/

Thanks for the help though @bjorn3 and @sunfishcode


Last updated: Dec 23 2024 at 13:07 UTC