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

With wasi-experimental, could not find wasi-sdk when trying to publish wasi-wasm console application error - a workaround proposal #110111

Open
LMA1980 opened this issue Nov 23, 2024 · 4 comments
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono os-wasi Related to WASI variant of arch-wasm
Milestone

Comments

@LMA1980
Copy link

LMA1980 commented Nov 23, 2024

When trying to publish a wasi-wasm console app.

We may be affected by the following error .dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk/9.0.0/Sdk/WasiApp.targets(116,5): error : Could not find wasi-sdk. Install wasi-sdk and set $(WASI_SDK_PATH) . It can be obtained from https://github.com/WebAssembly/wasi-sdk/releases SDK is required for building native files.

This is related to the closed issue #94671.

I found out after reading the WasiApp.targets its looking for ${WAIS_SDK_PATH)/VERSION24 which is missing when using this install method.

The simple workaround is to do touch $WASI_SDK_PATH/VERSION24.

Hopefully this may help either find a permanent solution or provided appropriate documentation.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 23, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 23, 2024
@jkotas jkotas added arch-wasm WebAssembly architecture os-wasi Related to WASI variant of arch-wasm area-VM-meta-mono labels Nov 24, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@jkotas jkotas removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 24, 2024
@pavelsavara
Copy link
Member

Note WASI is experiment, so we are not going to fix this in Net9 and eventually we could get to improve it in Net10.

Creating $WASI_SDK_PATH/VERSION24 file by hand is correct workaround.

@pavelsavara pavelsavara added this to the 10.0.0 milestone Dec 2, 2024
@pavelsavara pavelsavara removed the untriaged New issue has not been triaged by the area owner label Dec 2, 2024
@itsMartinDev
Copy link

Solved this using WASI_SDK_PATH=C:\WebAssembly\wasi-sdk\wasi-sdk-24.0-x86_64-windows (as a custom path to have the sdk), but had to create an aditional folder called version24, and copy and paste folders (bin, lib, share) being duplicated.

Windows 10
Processor Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz 2.90 GHz
Installed RAM 16.0 GB
System type 64-bit operating system, x64-based processor

@LMA1980
Copy link
Author

LMA1980 commented Dec 10, 2024

Using Linux here. Can't tell about Windows experience. Will further investigate to determine if my proposal actually break things. Maybe a few symbolic links could be required to replicate the fix described by @itsMartinDev.

Before submitting my proposal, I did confirmed the tools was able to compile the basic template first. And be usable.

The test I did does not fully cover the suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-VM-meta-mono os-wasi Related to WASI variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

4 participants