Bug 15481 - Can't create SDK with Rust and musl
Summary: Can't create SDK with Rust and musl
Status: RESOLVED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 4.0.18
Hardware: x86 Multiple
: Medium normal
Target Milestone: 4.0.20
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-05-10 13:19 UTC by Jan Strater-Büddefeld
Modified: 2024-05-23 22:21 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
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`. (262.41 KB, application/x-xz)
2024-05-10 13:19 UTC, Jan Strater-Büddefeld
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.