wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
https://wasmer.io
MIT License
18.63k stars 798 forks source link

Singlepass v2 on ARM fails to compile #2777

Closed syrusakbary closed 2 years ago

syrusakbary commented 2 years ago

The program main.wasm which is a Go database (TiDB) is able to run on other compilers but when run with singlepass it outputs the following:

Download the file here: https://registry-cdn.wapm.io/contents/lucklove/tidb/0.1.6/main.wasm

$ wasmer run main.wasm --singlepass
thread '<unnamed>' panicked at 'singlepass can't emit LDR S64, Memory(X29, -104), Memory(X8, 0)', lib/compiler-singlepass/src/emitter_arm64.rs:382:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'singlepass can't emit LDR S64, Memory(X29, -72), Memory(X8, 0)', lib/compiler-singlepass/src/emitter_arm64.rs:382:18
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ImpossibleRelocation(Dynamic(DynamicLabel(2)))', lib/compiler-singlepass/src/machine_arm64.rs:1891:35
ptitSeb commented 2 years ago

@syrusakbary we can close the ticket now, right?

orangeC23 commented 2 years ago

I tried to reproduce it, but only singlepass can successfully execute, both cranelift and llvm was blocked and print nothing .

ptitSeb commented 2 years ago

You need to be patient, it may take a long time for the other compiler to build this one.

I suggest you read this blog entry: https://wasmer.io/posts/wasmer-2.2 at the end, there are some compile benchmark.

orangeC23 commented 2 years ago

Thanks a lot !