我正在尝试使用锈菌和bitbake/yocto使用meta-rust层。
在该层内部,我可以看到最近添加了cargo版本1.58.0的配方。不幸的是,当我尝试使用锈迹代码构建BitBake时,我得到了以下错误:
NOTE: Executing Tasks
ERROR: echo-server-0.1.0.AUTOINC+c37d3bb2f3-r0 do_compile: ExecutionError('./tmp/work/corei7-64-poky-linux/echo-server/0.1.0.AUTOINC+c37d3bb2f3-r0/temp/run.do_compile.391773', 101, None, None)
ERROR: Logfile of failure stored in: ./tmp/work/corei7-64-poky-linux/echo-server/0.1.0.AUTOINC+c37d3bb2f3-r0/temp/log.do_compile.391773
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: cargo = build/tmp/work/corei7-64-poky-linux/echo-server/0.1.0.AUTOINC+c37d3bb2f3-r0/recipe-sysroot-native/usr/bin/cargo
| NOTE: rustc =
| NOTE: cargo build -v --target x86_64-poky-linux --release --manifest-path=./build/tmp/work/corei7-64-poky-linux/echo-server/0.1.0.AUTOINC+c37d3bb2f3-r0/git//Cargo.toml
| error: failed to parse manifest at ./build/tmp/work/corei7-64-poky-linux/echo-server/0.1.0.AUTOINC+c37d3bb2f3-r0/git/Cargo.toml
|
| Caused by:
| feature `edition2021` is required
|
| consider adding `cargo-features = ["edition2021"]` to the manifest
| WARNING: exit code 101 from a shell command.锈蚀代码在本地系统上建立良好,我相信错误是因为yocto使用的货运版本为1.54。
tmp/work/corei7-64-poky-linux/libstd-rs/1.54.0-r0/recipe-sysroot-native/usr/bin/cargo --version
cargo 1.54.0如何让yocto使用cargo的最新版本?菜谱存在于meta-rust中,我可以看到yocto通过
bitbake -s | grep cargo
cargo :1.58.1-r0
cargo-cross-canadian-x86-64 :1.58.1-r0
cargo-native :1.58.1-r0 :1.54.0-r0
nativesdk-cargo :1.58.1-r0注意,如果设置了RUSTVERSION ?= "1.58",我会收到以下警告:
WARNING: preferred version 1.58 of cargo-native not available (for item cargo-native)
WARNING: versions of cargo-native available: 1.54.0
WARNING: preferred version 1.58 of libstd-rs not available (for item libstd-rs)
WARNING: versions of libstd-rs available: 1.54.0
WARNING: preferred version 1.58 of libstd-rs not available (for item libstd-rs)
WARNING: versions of libstd-rs available: 1.54.0
WARNING: preferred version 1.58 of libstd-rs not available (for item libstd-rs-dev)
WARNING: versions of libstd-rs available: 1.54.0
WARNING: preferred version 1.58 of rust-native not available (for item rust-native)
WARNING: versions of rust-native available: 1.54.0
WARNING: preferred version 1.58 of rust-llvm-native not available (for item rust-llvm-native)
WARNING: versions of rust-llvm-native available: 1.54.0表示它默认为1.54.0版本。
注意:bitbake -c cleanall rust cargo会产生以下错误:
ERROR: Nothing PROVIDES 'rust'
rust was skipped: Rust recipe doesn't work for target builds at this time. Fixes welcome.发布于 2022-03-02 01:15:21
这通常是通过foo在bitbake中完成的,它看起来像是元锈包含了一个为您做此更改的文件:
RUST_VERSION ?= "1.58"如果将此文件包含在distro.conf (或local.conf)中,并将第4行更改为与版本1.58匹配,则应该能够使用/构建货物版本1.58
您仍然可以在您的PREFERRED_VERSION_cargo/rust*上手动更改local.conf,但是您必须对所有生锈组件进行手动更改,就像rust_versions.inc文件所做的那样。
https://stackoverflow.com/questions/71314592
复制相似问题