Stream: git-wasmtime

Topic: wasmtime / issue #3513 Compilation failure on Android in ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 16:49):

bnjbvr opened issue #3513:

Seems that wasmtime-runtime tries to use map flags that don't exist in Android:

error[E0599]: no associated item named `FIXED` found for struct `MapFlags` in the current scope
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.31.0/src/instance/allocator/pooling/unix.rs:21:63
   |
21 |             rsix::io::MapFlags::PRIVATE | rsix::io::MapFlags::FIXED,
   |                                                               ^^^^^ associated item not found in `MapFlags`

Could we use another way / method to decommit memory on Android? cc @sunfishcode

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 16:49):

bnjbvr labeled issue #3513:

Seems that wasmtime-runtime tries to use map flags that don't exist in Android:

error[E0599]: no associated item named `FIXED` found for struct `MapFlags` in the current scope
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.31.0/src/instance/allocator/pooling/unix.rs:21:63
   |
21 |             rsix::io::MapFlags::PRIVATE | rsix::io::MapFlags::FIXED,
   |                                                               ^^^^^ associated item not found in `MapFlags`

Could we use another way / method to decommit memory on Android? cc @sunfishcode

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 19:16):

sunfishcode commented on issue #3513:

It looks like Android doesn't support MAP_FIXED. It looks like we'll need to add a way to disable the pooling instance allocator at compile time, and have it disable on Android.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 20:15):

peterhuene commented on issue #3513:

I can work on putting the pooling allocator behind a feature gate that you can opt out of for Android.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 22:00):

peterhuene closed issue #3513:

Seems that wasmtime-runtime tries to use map flags that don't exist in Android:

error[E0599]: no associated item named `FIXED` found for struct `MapFlags` in the current scope
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.31.0/src/instance/allocator/pooling/unix.rs:21:63
   |
21 |             rsix::io::MapFlags::PRIVATE | rsix::io::MapFlags::FIXED,
   |                                                               ^^^^^ associated item not found in `MapFlags`

Could we use another way / method to decommit memory on Android? cc @sunfishcode

view this post on Zulip Wasmtime GitHub notifications bot (Nov 10 2021 at 22:01):

peterhuene commented on issue #3513:

@bnjbvr see if disabling the pooling-allocator feature in the wasmtime crate helps get things building again on Android.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 15 2021 at 10:01):

bnjbvr commented on issue #3513:

@peterhuene yes, that fixed it, thanks a bunch! Would it make sense to do a patch release to get that fix in the stable branch? cc @tschneidereit @alexcrichton

view this post on Zulip Wasmtime GitHub notifications bot (Nov 15 2021 at 10:29):

tschneidereit commented on issue #3513:

Would it make sense to do a patch release to get that fix in the stable branch?

I'll leave it to Alex to comment on that, because I can't judge all that well how much effort that'd be.

I wonder if we should have (an) Android CI configuration(s) though? This seems pretty likely to regress again otherwise. @bnjbvr, would you perhaps be up for adding this to our CI setup to ensure that the builds keep working for you?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 15 2021 at 14:53):

alexcrichton commented on issue #3513:

We don't really have a clear/crisp definition of supported targets for Wasmtime, so to me it's somewhat unclear on whether we should do a patch/etc. I don't think we can release main as is since it technically contains semver-breaking changes to both Cranelift and Wasmtime, but we could do a patch-release where this is backported.

Ideally we would have a list of targets along the same lines as rust-lang/rust where tier 1 is tested on CI, tier 2 is "guaranteed to build", and tier 3 is everything else. Changes to tiers 1/2 would necessitate a patch release of some kind, so whether or not doing a release here makes sense depends on how we want to think about Android.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 15 2021 at 17:22):

bnjbvr commented on issue #3513:

Ok, no worries, we can point at a specific commit in a fork of Wasmtime for our embedding, it is slightly less ideal but doable (we'll likely require other fixes, like https://github.com/bytecodealliance/wasmtime/commit/12bfbdfaca3ecd3da95b30670df1b71fdba01be0, which otherwise seem to break debugging entirely).

Definitely it would be nice to have a list of officially supported targets, for documentation and for providing stability guarantees.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 17 2022 at 22:14):

densone commented on issue #3513:

I am running into this same issue for freebsd.

error[E0599]: no associated item named `FIXED` found for struct `MapFlags` in the current scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.31.0/src/instance/allocator/pooling/unix.rs:21:63
   |
21 |             rsix::io::MapFlags::PRIVATE | rsix::io::MapFlags::FIXED,
   |                                                               ^^^^^ associated item not found in `MapFlags`

view this post on Zulip Wasmtime GitHub notifications bot (Jan 18 2022 at 08:35):

bnjbvr commented on issue #3513:

@densone Switching to the latest version of wasmtime, which is 0.33 at this time, should fix it.


Last updated: Oct 23 2024 at 20:03 UTC