| Message ID | 20251109175336.257896-1-aalto.johannes@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-lts-mixins,scarthgap/rust] Update README.md with SDK configuration instructions | expand |
On Sun, 9 Nov 2025, Johannes Aalto via lists.yoctoproject.org wrote: > Add the required configuration for creating the SDK. > Motivation for the change is that the steps seem to be slightly different > than the config for plain poky version of rust (and I guesskirkstone/rust > branch too). > > Especially, line like: > SDK_TOOLCHAIN_LANGS += 'rust' > and/or > TOOLCHAIN_TARGET_TASK:append = " libstd-rs" > > seems to create a broken set of libraries due to having duplicate libraries causing build > errors like: > error[E0464]: multiple candidates for `rlib` dependency `std` found > | > = note: candidate #1: /opt/poky/5.0.10/sysroots/cortexa72-poky-linux/usr/lib/rustlib/aarch64-poky-linux-gnu/lib/libstd-370fbb2cfd29928b.rlib > = note: candidate #2: /opt/poky/5.0.10/sysroots/cortexa72-poky-linux/usr/lib/rustlib/aarch64-poky-linux-gnu/lib/libstd.so > > (although, I'm not quite sure if this difference in config is intended behavior) I hit the duplicate libraries issue myself last week, and at the moment I don't believe it's unique to using the scarthgap/rust mixin layer, oe-core master branch likely has the same problem when using non-trivial images. I am going to try to pin down a simple reproducer in the next couple of days to foster discussion about whether something should be done in oe-core to avoid the issue. So, for now I'm going to hold off on taking this, once the situation is clearer I will reassess. Scott > Signed-off-by: Johannes Aalto <aalto.johannes@gmail.com> > --- > README.md | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/README.md b/README.md > index a00a00e..0f5c30d 100644 > --- a/README.md > +++ b/README.md > @@ -29,6 +29,10 @@ Notes > support are included, and the backported Rust test is included as the > "rust_mixin", it is not guaranteed that it will always be in a passing > state. > +- To include Rust support in a SDK, do the following in e.g. local.conf: > + ``` > + TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}" > + ``` > - The intent is to track any further upgrades that occur in the master > branch of oe-core, with an expected end of support in April 2028, the > same as Yocto Project's planned EOL for Scarthgap (per >
diff --git a/README.md b/README.md index a00a00e..0f5c30d 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ Notes support are included, and the backported Rust test is included as the "rust_mixin", it is not guaranteed that it will always be in a passing state. +- To include Rust support in a SDK, do the following in e.g. local.conf: + ``` + TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}" + ``` - The intent is to track any further upgrades that occur in the master branch of oe-core, with an expected end of support in April 2028, the same as Yocto Project's planned EOL for Scarthgap (per
Add the required configuration for creating the SDK. Motivation for the change is that the steps seem to be slightly different than the config for plain poky version of rust (and I guesskirkstone/rust branch too). Especially, line like: SDK_TOOLCHAIN_LANGS += 'rust' and/or TOOLCHAIN_TARGET_TASK:append = " libstd-rs" seems to create a broken set of libraries due to having duplicate libraries causing build errors like: error[E0464]: multiple candidates for `rlib` dependency `std` found | = note: candidate #1: /opt/poky/5.0.10/sysroots/cortexa72-poky-linux/usr/lib/rustlib/aarch64-poky-linux-gnu/lib/libstd-370fbb2cfd29928b.rlib = note: candidate #2: /opt/poky/5.0.10/sysroots/cortexa72-poky-linux/usr/lib/rustlib/aarch64-poky-linux-gnu/lib/libstd.so (although, I'm not quite sure if this difference in config is intended behavior) Signed-off-by: Johannes Aalto <aalto.johannes@gmail.com> --- README.md | 4 ++++ 1 file changed, 4 insertions(+)