ifreund opened Issue #2133:
I am currently in the process of packaging wasmtime for void linux, a distribution which supports multiple architectures and musl as an alternative to glibc.
Reading the following code, it looks like wasmtime is intended to support
aarch64
on linux.It builds fine for
aarch64-unknown-linux-gnu
but fails foraarch64-unknown-linux-musl
with the following error:error[E0412]: cannot find type `ucontext_t` in crate `libc` --> crates/runtime/src/traphandlers.rs:165:52 | 165 | let cx = &*(cx as *const libc::ucontext_t); | ^^^^^^^^^^ not found in `libc` error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. error: could not compile `wasmtime-runtime`.
Building for
x86_64-unknown-linux-musl
works fine.
ifreund labeled Issue #2133:
I am currently in the process of packaging wasmtime for void linux, a distribution which supports multiple architectures and musl as an alternative to glibc.
Reading the following code, it looks like wasmtime is intended to support
aarch64
on linux.It builds fine for
aarch64-unknown-linux-gnu
but fails foraarch64-unknown-linux-musl
with the following error:error[E0412]: cannot find type `ucontext_t` in crate `libc` --> crates/runtime/src/traphandlers.rs:165:52 | 165 | let cx = &*(cx as *const libc::ucontext_t); | ^^^^^^^^^^ not found in `libc` error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. error: could not compile `wasmtime-runtime`.
Building for
x86_64-unknown-linux-musl
works fine.
ifreund edited Issue #2133:
I am currently in the process of packaging wasmtime for void linux, a distribution which supports multiple architectures and musl as an alternative to glibc.
Reading the following code, it looks like wasmtime is intended to support
aarch64
on linux.It builds fine for
aarch64-unknown-linux-gnu
but fails foraarch64-unknown-linux-musl
with the following error:error[E0412]: cannot find type `ucontext_t` in crate `libc` --> crates/runtime/src/traphandlers.rs:165:52 | 165 | let cx = &*(cx as *const libc::ucontext_t); | ^^^^^^^^^^ not found in `libc` error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. error: could not compile `wasmtime-runtime`.
Building for
x86_64-unknown-linux-musl
works fine.This failure occurred with rust
1.44.1
and wasmtime0.19.0
bjorn3 commented on Issue #2133:
libc
missesucontext_t
on aarch64-unknown-linux-musl.glibc: https://github.com/rust-lang/libc/blob/035a4809428d319e72ff1aaae5c5335f18623836/src/unix/linux_like/linux/gnu/b64/aarch64/align.rs
musl: https://github.com/rust-lang/libc/blob/035a4809428d319e72ff1aaae5c5335f18623836/src/unix/linux_like/linux/musl/b64/aarch64/align.rs
pmengelbert commented on Issue #2133:
I see that the issue has been patched and is resolved if I upgrade to the latest version of the
libc
crate, but then I come across this issue here:
I tried building wasmtime for aarch64-unknown-linux-musl and I came across the following issue:error[E0609]: no field `pc` on type `libc::mcontext_t` --> crates/runtime/src/traphandlers.rs:166:36 | 166 | cx.uc_mcontext.pc as *const u8 | ^^ unknown field error: aborting due to previous error
Like @ifreund, building for the
x86_64-unknown-linux-musl
target works just fine. Any pointers on where to look? Thanks
pmengelbert edited a comment on Issue #2133:
I see that the issue has been patched and is resolved if I upgrade to the latest version of the
libc
crate, but then I come across this issue here:error[E0609]: no field `pc` on type `libc::mcontext_t` --> crates/runtime/src/traphandlers.rs:166:36 | 166 | cx.uc_mcontext.pc as *const u8 | ^^ unknown field error: aborting due to previous error
Like @ifreund, building for the
x86_64-unknown-linux-musl
target works just fine. Any pointers on where to look? Thanks
bjorn3 commented on Issue #2133:
On
aarch64-unknown-linux-musl
libc doesn't expose any fields formcontext_t
: https://github.com/rust-lang/libc/blob/c9ff3e9b4e49b1a1c8482fc409177615dce6b84c/src/unix/linux_like/linux/musl/b64/aarch64/align.rs#L19 This will require a change to the libc crate.
jiayihu commented on Issue #2133:
I'm having the same issue of @pmengelbert, is there any way to workaround for now? For instance fork
libc
and apply some patch. I'd test and open the PR myself if anyone can point me what to write. Should I just copy over this lines?
lu-zero commented on Issue #2133:
something along https://gist.github.com/lu-zero/e770b7c3c01277a7ccac51b2af692632 should fix it.
jiayihu commented on Issue #2133:
https://github.com/rust-lang/libc/pull/2000 has been merged, @bjorn3 would be possible to update the libc version in wasmtime so that we can avoid patching it?
jiayihu deleted a comment on Issue #2133:
https://github.com/rust-lang/libc/pull/2000 has been merged, @bjorn3 would be possible to update the libc version in wasmtime so that we can avoid patching it?
Last updated: Nov 22 2024 at 16:03 UTC