【发布时间】:2022-06-24 18:04:50
【问题描述】:
我正在使用最新的 rust 工具链,在分支处编译 Pallet-ibc:features/dv-ics20 : https://github.com/octopus-network/substrate-ibc,这给出了打击错误。
Compiling ibc v0.12.0 (/Volumes/Seagate Basic/octopus/ibc-rs/modules)
error: duplicate lang item in crate `std` (which `arrayvec` depends on): `panic_impl`.
|
= note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)
= note: first definition in `sp_io` loaded from /Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/wbuild/pallet-ibc/target/wasm32-unknown-unknown/release/deps/libsp_io-af37dfe030ffe3a3.rmeta
= note: second definition in `std` loaded from /Users/suyinrong/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib
error: duplicate lang item in crate `std` (which `arrayvec` depends on): `oom`.
|
= note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)
= note: first definition in `sp_io` loaded from /Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/wbuild/pallet-ibc/target/wasm32-unknown-unknown/release/deps/libsp_io-af37dfe030ffe3a3.rmeta
= note: second definition in `std` loaded from /Users/suyinrong/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib
我的环境:
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 (default)
rustc 1.58.1 (db9d1b20b 2022-01-20)
【问题讨论】:
-
导致错误的命令是什么?这个 crate 是否是您的
Cargo.toml中的一个依赖项,在使用cargo build构建时会导致问题? -
请在substrate stack exchange提出这个问题
-
是的,只需运行
cargo build -
问题是
arrayvec没有no_std功能被使用,但是没有 Cargo.toml 文件就无法判断是什么依赖导致了这种情况。 -
是的,我找不到这个错误。