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
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
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.
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.
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
peterhuene commented on issue #3513:
@bnjbvr see if disabling the
pooling-allocator
feature in the wasmtime crate helps get things building again on Android.
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
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?
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.
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.
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`
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: Nov 22 2024 at 16:03 UTC