[英]rust-embedded Discovery `05-led-roulette` fails to build
我正在按照本指南在相應的 repo中構建項目。 我成功編譯、運行並驗證了項目 03 。
但是,按照構建項目 05 的說明會產生“錯誤 [E0463]:找不到core
板條箱”:
$ cargo build --features v2 --target thumbv7em-none-eabihf
info: syncing channel updates for 'nightly-2021-08-18-aarch64-apple-darwin'
info: latest update on 2021-08-18, rust version 1.56.0-nightly (30a0a9b69 2021-08-17)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rust-std' for 'riscv32imac-unknown-none-elf'
info: downloading component 'rust-std' for 'riscv32imc-unknown-none-elf'
info: downloading component 'rust-std' for 'thumbv6m-none-eabi'
info: downloading component 'rust-std' for 'thumbv7em-none-eabi'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rust-std' for 'riscv32imac-unknown-none-elf'
info: installing component 'rust-std' for 'riscv32imc-unknown-none-elf'
info: installing component 'rust-std' for 'thumbv6m-none-eabi'
info: installing component 'rust-std' for 'thumbv7em-none-eabi'
info: installing component 'rustc'
info: installing component 'rustfmt'
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2022-01-20, rust version 1.58.1 (db9d1b20b 2022-01-20)
info: downloading component 'rust-src'
info: installing component 'rust-src'
Compiling critical-section v0.2.5
error[E0463]: can't find crate for `core`
|
= note: the `thumbv7em-none-eabihf` target may not be installed
= help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `critical-section` due to previous error
這似乎是一個意外錯誤,因為它表明我缺少thumbv7em-none-eabihf
目標工具鏈,但如果沒有安裝此工具鏈,項目 03 將無法正確編譯。
我可以修復我的系統以正確構建項目 05 嗎? 還是項目有bug?
如果有人想了解更多信息,請在評論中 lmk,我可以用我的機器的更多輸出更新此部分。
$ rustup component list --installed
cargo-aarch64-apple-darwin
clippy-aarch64-apple-darwin
rust-src
rust-std-aarch64-apple-darwin
rust-std-thumbv7em-none-eabihf
rustc-aarch64-apple-darwin
rustfmt-aarch64-apple-darwin
$ rustup show
Default host: aarch64-apple-darwin
rustup home: /Users/___/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (default)
nightly-2021-08-18-aarch64-apple-darwin
installed targets for active toolchain
--------------------------------------
aarch64-apple-darwin
thumbv7em-none-eabihf
active toolchain
----------------
stable-aarch64-apple-darwin (default)
rustc 1.58.1 (db9d1b20b 2022-01-20)
原來我的 rust 工具鏈壞了; 我最初用 nix 安裝了所有東西,但是用 rustup 安裝(即 cargo)替換了一些 nix 安裝解決了問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.