mvs-org / new-frontiers

Metaverse Virtual Machine
https://mvs.org
Other
7 stars 8 forks source link

compile error on apple slicon #28

Open fadding opened 2 years ago

fadding commented 2 years ago

Use the master branch to compile, the following error occurs, the hash of the branch is efce57d01e925d54b4e3c3ad0c6e9301b492d39e

1. Environmental information

1.1 system info

os version: macos monterey(12.0.1)
chip: Apple M1 Max

1.2 rust info

➜  new-frontiers git:(master) ✗ rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/fengmeng/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.56.1 (59eed8a2a 2021-11-01)

➜  new-frontiers git:(master) ✗ rustc -V
rustc 1.56.1 (59eed8a2a 2021-11-01)
➜  new-frontiers git:(master) ✗ cargo -V
cargo 1.56.0 (4ed5d137b 2021-10-04)

2. erorr info

➜  new-frontiers git:(master) ✗ cargo build --release
   Compiling zstd-sys v1.4.18+zstd.1.4.7
   Compiling zstd-safe v2.0.6+zstd.1.4.7
   Compiling libloading v0.5.2
   Compiling wasmtime-runtime v0.22.0
   Compiling metaverse-vm-runtime v0.2.1 (/Users/fengmeng/Desktop/working/mvs/new-frontiers/runtime)
   Compiling clang-sys v0.29.3
error[E0609]: no field `__rip` on type `__darwin_arm_thread_state64`
   --> /Users/fengmeng/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.22.0/src/traphandlers.rs:169:44
    |
169 |                     (*cx.uc_mcontext).__ss.__rip as *const u8
    |                                            ^^^^^ unknown field
    |
    = note: available fields are: `__x`, `__fp`, `__lr`, `__sp`, `__pc` ... and 2 others

For more information about this error, try `rustc --explain E0609`.
error: could not compile `wasmtime-runtime` due to previous error
warning: build failed, waiting for other jobs to finish...
warning: unused import: `HashedAddressMapping`
  --> runtime/src/lib.rs:31:40
   |
31 |     Account as EVMAccount, FeeCalculator, HashedAddressMapping,
   |                                           ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: `metaverse-vm-runtime` (lib) generated 1 warning
error: build failed
tristanlee commented 2 years ago

have you tried other rustc version ?