1 year ago
#317803

D.Davirain
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
I run ibc-rs(https://github.com/octopus-network/ibc-rs/tree/feature/ics20), at branch feature/ics20. run this command : cargo build -p ibc
. Get this below error. before this have this error, but now I reconstruct mac computer this error, yet occur.
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /Users/suyinrong/.cargo/git/checkouts/substrate-7834a41d734f0c1d/902587b/primitives/runtime-interface/src/impls.rs:45:1
|
45 | assert_eq_size!(usize, u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `usize` (64 bits)
= note: target type: `u32` (32 bits)
= note: this error originates in the macro `assert_eq_size` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /Users/suyinrong/.cargo/git/checkouts/substrate-7834a41d734f0c1d/902587b/primitives/runtime-interface/src/impls.rs:47:1
|
47 | assert_eq_size!(*const u8, u32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `*const u8` (64 bits)
= note: target type: `u32` (32 bits)
= note: this error originates in the macro `assert_eq_size` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0512`.
error: could not compile `sp-runtime-interface` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
My env:
Default host: aarch64-apple-darwin
rustup home: /Users/suyinrong/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin
nightly-2022-02-17-aarch64-apple-darwin
nightly-aarch64-apple-darwin
1.58-aarch64-apple-darwin (default)
installed targets for active toolchain
--------------------------------------
aarch64-apple-darwin
wasm32-unknown-unknown
active toolchain
----------------
1.58-aarch64-apple-darwin (overridden by '/Volumes/Seagate Basic/octopus/ibc-rs/rust-toolchain.toml')
rustc 1.58.1 (db9d1b20b 2022-01-20)
rust
substrate
0 Answers
Your Answer