Bug 15481

Summary: Can't create SDK with Rust and musl
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jan Strater-Büddefeld <jst>
Component: meta-yoctoAssignee: Unassigned <unassigned>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: 4.0.18   
Target Milestone: 4.0.20   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
The archive contains the compile.log and the output of `bitbake rust-cross-canadian-arm -e` and `bitbake core-image-minimal -c populate_sdk -e`. none

Description Jan Strater-Büddefeld 2024-05-10 13:19:59 UTC
Created attachment 5043 [details]
The archive contains the compile.log and the output of `bitbake rust-cross-canadian-arm -e` and `bitbake core-image-minimal -c populate_sdk -e`.

On current Kirkstone it is not possible to create a SDK with the Rust toolchain and the musl C library. Building the rust-cross-canadian-arm fails. It fails to run the target-rust-cc wrapper with '[Errno 2] No such file or directory'.

To reproduce, add

MACHINE ??= "qemuarm"
TCLIBC = "musl"
TOOLCHAIN_HOST_TASK += "packagegroup-rust-cross-canadian-${MACHINE}"

to your local config and run `bitbake core-image-minimal -c populate_sdk`

Attached is the log of the build and also the output of `bitbake rust-cross-canadian-arm -e`. In the file rust-cross-canadian-arm_env.log you can see, that the wrapper is using 'arm-poky-linux-gnueabi-gcc' as the compiler instead of a musl one. I don't know if thats right.
Comment 1 Randy MacLeod 2024-05-16 14:38:01 UTC
for kirkstone, this isn't a surprise. Can you try with the mixin layer:
https://git.yoctoproject.org/meta-lts-mixins/log/?h=kirkstone/rust
or scarthgap?
Comment 2 Jan Strater-Büddefeld 2024-05-22 08:54:05 UTC
Thank you for your answer. I've successfully build the sdk with scarthgap.
Comment 3 Jan Strater-Büddefeld 2024-05-22 08:55:44 UTC
If it's known that this will not work, I think this ticket can be closed.
Comment 4 Randy MacLeod 2024-05-23 22:21:31 UTC
Jan, 
Thanks for the report about scarthgap working for you.

We try to improve things release by release and backport to a mixin layer when we can but we're a small crew.

As you likely know, if there are specific features you need, open a bug, submit a fix, or find someone to hire to improve things! ;-)

Good luck.