Stream: wasmtime

Topic: Wasmtime 30 x64 assembler build error on Windows


view this post on Zulip Andrzej Ressel (Feb 20 2025 at 23:50):

Hi, I've updated wasmtime to version 30 in project, but I'm receiving strange compile errors (GH actions build)

  Rebuilding D:\a\pulumi-gestalt\pulumi-gestalt\target\llvm-cov-target\debug\build\cranelift-codegen-204d40bafaee4b21\out\isle_x64.rs
  Error building ISLE files:
  cannot read file \a\pulumi-gestalt\pulumi-gestalt\target\llvm-cov-target\debug\build\cranelift-assembler-x64-9a48a64758bb0fa6\out\assembler-definitions.isle

I was looking at source code to find some clues and I found this: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/assembler-x64/src/lib.rs#L83-L88. Since Windows paths do contain : won't it potentially break?

Pulumi support for 𝐀𝐧𝐲 language. Contribute to andrzejressel/pulumi-gestalt development by creating an account on GitHub.
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant - bytecodealliance/wasmtime

view this post on Zulip Chris Fallin (Feb 21 2025 at 00:02):

cc @Andrew Brown (I'm surprised our CI on Windows passed? maybe it uses non-absolute paths or the new-style UNC paths without colons on drive letters?)

view this post on Zulip Chris Fallin (Feb 21 2025 at 00:03):

@Andrzej Ressel thanks for raising this -- seems like a real issue, we'll likely do a point release to fix if so

view this post on Zulip Andrew Brown (Feb 21 2025 at 00:03):

yeah, this should have been picked up by CI...

view this post on Zulip Andrew Brown (Feb 21 2025 at 00:08):

but while we figure out the CI I guess I'll push a PR to use ; on Windows

view this post on Zulip Andrew Brown (Feb 21 2025 at 00:14):

https://github.com/bytecodealliance/wasmtime/pull/10266

The new assembler uses : to separate a list of paths containing generated code. We received a report that on Windows this could lead to build issues; this change uses ; for Windows instead. prtest:...

view this post on Zulip Andrew Brown (Feb 21 2025 at 00:45):

@Andrzej Ressel, I'm actually running cargo build in PowerShell on Windows and I cannot reproduce the error you found in your CI. I think the PR I submitted is still a good idea, but maybe there is something else at play. Is there a way for you to test if that PR will fix your issue?

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 01:12):

To be honest - locally it's also working fine for me. It seems to be something related to Windows configuration on GH runner.

view this post on Zulip Ralph (Feb 21 2025 at 11:32):

magic

view this post on Zulip Alex Crichton (Feb 21 2025 at 15:32):

@Andrzej Ressel would you be able to confirm that Wasmtime's now-main branch works for you? I tried and could not reproduce this behavior either on github actions or locally so I'm pretty stumped by what's going on. In that sense I think a point release would still be good but want to confirm that it's fixing the issue in question here first

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 15:55):

Sure, I saw the new release on github. I should just

[dependencies]
wasmtime = { git = "wasmtime repo"}}

?
I will try it later today

view this post on Zulip Alex Crichton (Feb 21 2025 at 16:03):

yeah and double-check your CI passes with that

view this post on Zulip Alex Crichton (Feb 21 2025 at 16:03):

(and pray it doesn't reproduce because if it does we're back to the drawing board...)

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 18:45):

I somehow reproduced it - you must run it through cmd, not powershell

view this post on Zulip Alex Crichton (Feb 21 2025 at 18:48):

oh wild! did Andrew's change fix it in the end?

view this post on Zulip Andrew Brown (Feb 21 2025 at 18:49):

and what command did you end up running to make it fail?

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 18:50):

plain cargo test on

[package]
name = "a"
version = "0.1.0"
edition = "2021"

[dependencies]
wasmtime = "30.0.0"

with empty lib.rs

List of Rust libraries and applications. An unofficial experimental opinionated alternative to crates.io

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 18:52):

that's very weird, because I use powershell in Just runner - maybe cmd sets some weird env vars or something. Using "command prompt" from rustrover reproduces this issue in any case

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 18:59):

and I believe project has be on different drive than rust

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 19:01):

yeah - I have rust and cargo directory on F: drive and it works there - but on C and D it fails

view this post on Zulip Andrew Brown (Feb 21 2025 at 19:02):

ah, yeah... I can't reproduce locally on a single C:\ drive

view this post on Zulip Andrew Brown (Feb 21 2025 at 19:02):

so using the fix on main resolves that?

view this post on Zulip Alex Crichton (Feb 21 2025 at 19:02):

this also raises my confidence that Andrew's fix is indeed all that's necessary here too

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 19:11):

yeah, I think so - I'm looking at my other project and i'm trying to understand why the cmd one strips driver letter

view this post on Zulip Andrzej Ressel (Feb 21 2025 at 19:30):

I've replaced version with git on my project in Github and it builds fine

view this post on Zulip Andrew Brown (Feb 21 2025 at 19:30):

sounds like confirmation to me; I backported the fix to the release-30.0.0 branch here: https://github.com/bytecodealliance/wasmtime/pull/10270

This is a backport of #10267: The fix is necessary for Windows users who may be using absolute-path target directories: the previous solution, separating the paths by :, runs into issues with Windo...

view this post on Zulip Alex Crichton (Feb 22 2025 at 00:40):

v30.0.1 is now out/tagged so this should be good to go, thanks again Andrzej for helping us identify/fix this!


Last updated: Feb 27 2025 at 23:03 UTC