-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support arm (non tier 1) platforms #339
Comments
Wasmtime doesn't support ARM yet. We want to support ARM, and we know Wasm and WASI are portable to ARM platforms, but we haven't had the resources to do the actual port yet. |
LLVM/Clang 8/9 on aarch64 doesn't support stack probes using the __rust_probestack() implementation, but it does supply __chkstk(), which it appears that wasmtime uses as a fallback (see link.rs, line 338 and 347). At the very least a #cfg guard change here will allow wasmtime to compile on native aarch64. |
Ok, this indeed works on aarch64. My tests however show that neither |
When trying to compile in a container with ubuntu on aarch64 I still received an error for an undefined reference to __chkstk: wasmtime_jit.6so9sdbw-cgu.15:(.text._ZN12wasmtime_jit4link11link_module17hdaec8638121cc26dE+0x240): undefined reference to `__chkstk' I thought maybe I needed compiler_rt but after compiling and installing, the linking error remains. @pepyakin Did you need to do any other steps to get this compile? |
Hey, good question! I didn't do any additional steps. FWIW, I compiled on an aarch64 host. TBH, I am not sure what OS was that but most likely some actual version of Ubuntu. |
I'm also getting this error when compiling on aarch64 and using latest ubuntu:
|
I just got a fresh new machine with similar/same configuration and I can confirm the presence of the linking error. Seems like I messed up with testing #800 . I checked and turns out that compiler-builtins (which rustc uses instead of compiler-rt) doesn't supply __chkstk nor ___chkstk. It also seems that I somehow managed to mess up testing of #800 :'-( |
A project that I contribute to has a dependency on the rust crate
I understand that |
Hi @brooksmtownsend have you seen this #1494? Does this platform support Arm64? |
The RPi3 does have a 64-bit CPU, but I think most distros (at least the default Raspbian, and it looks like Ubuntu install in the logs above too) run a 32-bit kernel and userland. Unfortunately we only support ARM64 (which would require a 64-bit userland) right now. @brooksmtownsend, I've used wasmtime successfully on a Gentoo 64-bit install on a RPi4, FWIW, but I know switching distro/install is quite a hassle. ARM32 support may come at some point in the future, but I'm not sure what our architecture support roadmap looks like so I can't make any promises, sorry! If anyone is interested in working on this, I'd be happy to provide guidance as best as I can. |
If you can get it installed, Ubuntu 64-bit is well worth the effort: With the recent upgrade of the Pi Imager, its not much harder than putting Rasbian on it from scratch :-) There's been a huge amount of work on Cranelift/wasmtime very recently to support aarch64, which is now maturing nicely, and being used in anger. Keep up the good work! |
Awesome! Looking forward to getting it, I actually didn't mean to install the 32-bit version in the first place |
@brooksmtownsend we'd love to hear how things are going, so it'd be great if you could report back here. Do note that #1494 just landed, so ARM64 support is quite new, which might mean running into early-adopter issues. Which mostly means that hearing how things are going would be even more appreciated :D |
@tschneidereit i tried building with the aarch64 version of Ubuntu 20.04, unfortunately I ran into the same issue. This is with wasmtime-runtime v0.15.0, is that too early of a version? |
@brooksmtownsend thank you for reporting this! I think v0.15.0 might indeed be too old: I think the new backend hadn't landed by then, and we certainly didn't do aarch64 builds in CI. We do do that by now, see the However, the cross-compilation process isn't documented (at least that I could find). I just filed #1720 to rectify that. Here's the patch that added aarch64 builds to CI, in case you're interested. |
The new backend framework has a working AArch64 backend. |
Has this not be merged into python wasmtime?
|
An AArch64 wheel is uploaded for Linux: https://github.com/bytecodealliance/wasmtime-py/blob/c4956dee5a1b66355df6b42117d604c33b48006b/.github/workflows/main.yml#L58 Are you on Windows or macOS? It seems that no AArch64 wheel for those is build. macOS should work fine AFAIK. I am not sure if the Windows AArch64 calling convention is supported yet. |
macOS Monterey 12.1 M1, Python 3.8.9 |
Could you open an issue at https://github.com/bytecodealliance/wasmtime-py/issues to distribute a wheel for macOS AArch64? |
The wasi story is really exciting in the idea of showing we can run the same code on multi platforms and architectures so I went to do that, and in compiling for arm I found that only tier 1 basically x86 platforms are supported currently.
Found this in probestack so it seems like an upstream problem
And found these
rust-lang/rust#43241
rust-lang/rust#49355
The text was updated successfully, but these errors were encountered: