rust: Upgrade 1.85.1->1.86.0
Hello everyone,
I am working on upgrading rust to v1.86.0 and this time there were a bunch of dependencies to be included and some errors as well.
A complete breakdown of the changes for this version upgrade is available
in the commit message of a branch pushed in poky-contrib.
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_v1.86.0
(I haven't tested with Ross's patches that remove python3-native and file-native DEPENDS yet.)
do_package_qa: QA Issue: File /usr/lib/rustlib/x86_64-poky-linux-gnu/bin/rust-lld in package rust doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]
One of the issues I encountered was the QA error mentioned above and here's my analysis:
I attempted to address some package QA errors related to LDFLAGS by using TARGET_CC_ARCH += "${LDFLAGS}", (Like done here: https://git.yoctoproject.org/poky/commit/?id=cc24a0ff76f2e227cc3a0f478d078b2158299a80
https://git.yoctoproject.org/poky/log/?qt=grep&q=GNU_HASH)
but unfortunately, this approach didn’t resolve the issue.(Is there any specific task/way to add it?)
Although including ldflags in INSANE_SKIP isn’t ideal, but that proved effective after trying other alternatives.
Please review the proposed upgrade changes.
I would appreciate any feedback or suggestions.
Regards,
Yash.
Quoted 5 lines · Yash Shinde via lists.openembedded.org
Although including ldflags in
INSANE_SKIPisn’t ideal, but that proved effective after trying other alternatives.Please review the proposed upgrade changes.
I would appreciate any feedback or suggestions.
Hello Yash,
I'll try to see if ldflags issue can be addressed properly, but first I have to note that there's a significant build performance regression in rust-native: where 1.85 do_install finishes on my machine in under 9 minutes, 1.86 from your branch took 23 minutes. You need to carefully review the logs to see if somehow rust-native builds the whole set of tools, rather than just the compiler. Or if it's doing a full bootstrap, where 1.85 is able to avoid stage2 because it's building a native compiler.
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Alexander Kanavin via lists.openembedded.org
I'll try to see if ldflags issue can be addressed properly, but first I have to note that there's a significant build performance regression in rust-native: where 1.85
do_installfinishes on my machine in under 9 minutes, 1.86 from your branch took 23 minutes. You need to carefully review the logs to see if somehow rust-native builds the whole set of tools, rather than just the compiler. Or if it's doing a full bootstrap, where 1.85 is able to avoid stage2 because it's building a native compiler.
Target rust as well regressed: 18 min -> 33 minutes. This does need to be addressed :-/
Alex
Quoted 15 lines · Alexander Kanavin
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 8 lines · Alexander Kanavin via lists.openembedded.org
I'll try to see if ldflags issue can be addressed properly, but first I have to note that there's a significant build performance regression in rust-native: where 1.85
do_installfinishes on my machine in under 9 minutes, 1.86 from your branch took 23 minutes. You need to carefully review the logs to see if somehow rust-native builds the whole set of tools, rather than just the compiler. Or if it's doing a full bootstrap, where 1.85 is able to avoid stage2 because it's building a native compiler.
Quoted 3 lines
Target rust as well regressed: 18 min -> 33 minutes. This does need to be addressed :-/
Hi Alex,
Thanks for reviewing the changes.
The Rust build now includes additional dependencies such as pkg-config, ninja, openssl which are required for building rust and ensuring better compatibility across various build environments.
(https://github.com/rust-lang/rust/blob/master/INSTALL.md#dependencies)
I believe the increased time is a result of theses added components as they can trigger more comprehensive configuration and build steps, which naturally extend the overall build time.
Regards,
Yash
Quoted 3 lines · Yash Shinde via lists.openembedded.org
do_package_qa: QA Issue: File/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/rust-lld
in package rust doesn't haveGNU_HASH(didn't pass LDFLAGS?) [ldflags]
I ran two builds (1.85, 1.86) side by side and this happens because in 1.85 rust-lld isn't installed into ${D}, but in 1.86 it is (along with many, many other things that weren't installed in 1.85).
This is probably related to the drastic increase in build time too.
Hope this helps,
Alex
Quoted 8 lines · Alexander Kanavin
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 3 lines · Yash Shinde via lists.openembedded.org
do_package_qa: QA Issue: File/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/rust-lld
in package rust doesn't haveGNU_HASH(didn't pass LDFLAGS?) [ldflags]
Quoted 8 lines
I ran two builds (1.85, 1.86) side by side and this happens because in 1.85 rust-lld isn't installed into ${D}, but in 1.86 it is (along with many, many other things that weren't installed in 1.85).
This is probably related to the drastic increase in build time too.
Hope this helps,
Alex
Yeah, that's the reason.
I am not sure how rust-lld is installed in ${D} now. A similar error was previously resolved by using:
"+TARGET_CC_ARCH += "${LDFLAGS}""(https://git.yoctoproject.org/poky/commit/?id=cc24a0ff76f2e227cc3a0f478d078b2158299a80)
LDFLAGS are explicitly unset in rust recipe. (https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/rust/rust_1.85.1.bb#n194)
I attempted to remove the "unset LDFLAGS" in rust recipe and exported TARGET_CC_ARCH as above, but that didn't work.
Is there some different or recommended way to pass LDFLAGS to rust that I might be missing?
Regards,
Yash
Quoted 7 lines · Yash Shinde
Yeah, that's the reason.
I am not sure how rust-lld is installed in ${D} now. A similar error was
previously resolved by using:
"+TARGET_CC_ARCH += "${LDFLAGS}""(https://git.yoctoproject.org/poky/commit/?id=cc24a0ff76f2e227cc3a0f478d078b2158299a80)
Quoted 7 lines
LDFLAGS are explicitly unset in rust recipe.
(https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/rust/rust_1.85.1.bb#n194)
I attempted to remove the "unset LDFLAGS" in rust recipe and exportedTARGET_CC_ARCHas above, but that didn't work.Is there some different or recommended way to pass LDFLAGS to rust that I might be missing?
The issue isn't about how to pass LDFLAGS. The issue is that something triggers building all these additional things, including rust-lld, and you need to narrow down how and where that happens, and how to go back to the install set (and build times) we've had in 1.85. Please get to the particular point where that decision happens.
We can't just double the build times without a comprehensive, convincing investigation.
Alex
Quoted 16 lines · Alexander Kanavin via lists.openembedded.org
Quoted 7 lines · Yash Shinde
Yeah, that's the reason.
I am not sure how rust-lld is installed in ${D} now. A similar error was
previously resolved by using:
"+TARGET_CC_ARCH += "${LDFLAGS}""(https://git.yoctoproject.org/poky/commit/?id=cc24a0ff76f2e227cc3a0f478d078b2158299a80)Quoted 7 lines
LDFLAGS are explicitly unset in rust recipe.
(https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/rust/rust_1.85.1.bb#n194)
I attempted to remove the "unset LDFLAGS" in rust recipe and exportedTARGET_CC_ARCHas above, but that didn't work.Is there some different or recommended way to pass LDFLAGS to rust that I might be missing?
Quoted 9 lines
The issue isn't about how to pass LDFLAGS. The issue is that something triggers building all these additional things, including rust-lld, and you need to narrow down how and where that happens, and how to go back to the install set (and build times) we've had in 1.85. Please get to the particular point where that decision happens.
We can't just double the build times without a comprehensive, convincing investigation.
Try adding
[rust]
lld = false
to config.toml, but lld might speed up rust packages themselves. So perhaps this should be capped under a packageconfig or such, provided this works.
Quoted 12 lines
Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217316): https://lists.openembedded.org/g/openembedded-core/message/217316
Mute This Topic: https://lists.openembedded.org/mt/113268009/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 32 lines · Khem Raj
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.Quoted 18 lines · Alexander Kanavin via lists.openembedded.org
Quoted 8 lines · Yash Shinde
Yeah, that's the reason.
I am not sure how rust-lld is installed in ${D} now. A similar error was
previously resolved by using:
"+TARGET_CC_ARCH += "${LDFLAGS}""(https://git.yoctoproject.org/poky/commit/?id=cc24a0ff76f2e227cc3a0f478d078b2158299a80)Quoted 8 lines
LDFLAGS are explicitly unset in rust recipe.
(https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/rust/rust_1.85.1.bb#n194)I attempted to remove the "unset LDFLAGS" in rust recipe and exported
TARGET_CC_ARCHas above, but that didn't work.Is there some different or recommended way to pass LDFLAGS to rust that I might be missing?
Quoted 9 lines
The issue isn't about how to pass LDFLAGS. The issue is that something triggers building all these additional things, including rust-lld, and you need to narrow down how and where that happens, and how to go back to the install set (and build times) we've had in 1.85. Please get to the particular point where that decision happens.
We can't just double the build times without a comprehensive, convincing investigation.
Quoted 9 lines
Try adding
[rust]
lld = falseto config.toml, but lld might speed up rust packages themselves. So perhaps this should be capped under a packageconfig or such, provided this works.
I investigated the commit histroy between 1.85.1 and 1.86 and found few commits related to building a "self-contained" LLD (rust-lld)as part of rust bootstrap build. This results additional installations during the builds.
Here are the commits and PRs:
https://github.com/rust-lang/rust/pull/135001
https://github.com/rust-lang/rust/commit/8744b44e6bde053f7656a3c727c968177ee8e4b6
Additionally, there's ongoing development to make LLD as the default linker for x86_64-unknown-linux-gnu.
https://github.com/rust-lang/rust/pull/140525
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker, causing the build to fall back to the system's default linker. This restores the earlier behavior. Also, the package QA error for rust-lld is not seen with this.
Regards,
Yash
Quoted 3 lines
Quoted 2 lines
Alex
Quoted 6 lines · Yash Shinde
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.
What about build times though? Are they back to what they were?
Alex
Quoted 5 lines · Alexander Kanavin
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.On Fri, 30 May 2025 at 14:42, Yash Shinde<[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.What about build times though? Are they back to what they were?
The build time differences on my machine are as follows:
rust version
rust upstream builds
rust-native (yocto build)
rust target (yocto build)
v1.85.1
10 mins 20 mins 33 mins
v1.86.0
22 mins (with "lld" and "use-lld" set to "false")
30 mins (with default settings i.e lld = true)
31 mins (with "lld" and
"use-lld" set to "false") 43 mins (with "lld" and
"use-lld" set to "false")
Note: The machine being used is a shared resource and fairly busy. Build times may differ due to other user's builds.
The FS usage is as follows:
Rust version
rust upstream builds
Yocto rust builds
(build/tmp/work/core2-64-poky-linux/rust/1.86.0/rustc-1.86.0-src/build) v1.85.1
4.6 G 6.3 G v1.86.0 15 G 8.8 G
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_1.86.0_v2
Regards,
Yash
Quoted 1 line
Alex
Hi Yash,
Quoted 52 lines · On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org…
On 30-05-2025 18:45, Alexander Kanavin wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.On Fri, 30 May 2025 at 14:42, Yash Shinde <[email protected]> <[email protected]> wrote:
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.What about build times though? Are they back to what they were?
The build time differences on my machine are as follows:
rust version
rust upstream builds
rust-native (yocto build)
rust target (yocto build)
v1.85.1
10 mins
20 mins
33 mins
v1.86.0
22 mins (with "lld" and "use-lld" set to "false") 30 mins (with default settings i.e lld = true)31 mins (with "lld" and
"use-lld" set to "false") 43 mins (with "lld" and
"use-lld" set to "false")Note: The machine being used is a shared resource and fairly busy. Build times may differ due to other user's builds.
The FS usage is as follows:
Rust version
rust upstream builds
Yocto rust builds (build/tmp/work/core2-64-poky-linux/rust/1.86.0/rustc-1.86.0-src/build) v1.85.1
4.6 G
6.3 G
v1.86.0
15 G
8.8 G
Quoted 7 lines
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_1.86.0_v2Regards,
Yash
Hi Yash
That's good progress. We'll need to think about what, it anything, we're missing by not building rust-lld. We should run some tests to compare the link times but that can likely wait until after we get the update merged.
Remaining concerns:
1. Significant increase in FS usage, compile time. Have you looked into why there's still such a significant increase?
2. * Enable INHIBIT_PACKAGE_DEBUG_SPLIT/STRIP to fix QA stripping errors.
Fixes: ERROR: rust-1.86.0-r0 do_package: QA Issue: File '/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/wasm-component-ld' from rust was already stripped, this will prevent future debugging! [already-stripped]
Do we use this component? Is it new? Why is it produced without debug symbols?
I'll take a more careful look at the commit code changes once we have answers to these questions.
Thanks for your hard work.
Almost done this upgrade hopefully.
Randy
Alex
Quoted 13 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#217714):
https://lists.openembedded.org/g/openembedded-core/message/217714
Mute This Topic: https://lists.openembedded.org/mt/113268009/953399
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 69 lines · Randy MacLeod
Hi Yash,
Quoted 52 lines · On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org…
On 30-05-2025 18:45, Alexander Kanavin wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.On Fri, 30 May 2025 at 14:42, Yash Shinde <[email protected]> <[email protected]> wrote:
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.What about build times though? Are they back to what they were?
The build time differences on my machine are as follows:
rust version
rust upstream builds
rust-native (yocto build)
rust target (yocto build)
v1.85.1
10 mins
20 mins
33 mins
v1.86.0
22 mins (with "lld" and "use-lld" set to "false") 30 mins (with default settings i.e lld = true)31 mins (with "lld" and
"use-lld" set to "false") 43 mins (with "lld" and
"use-lld" set to "false")Note: The machine being used is a shared resource and fairly busy. Build times may differ due to other user's builds.
The FS usage is as follows:
Rust version
rust upstream builds
Yocto rust builds (build/tmp/work/core2-64-poky-linux/rust/1.86.0/rustc-1.86.0-src/build) v1.85.1
4.6 G
6.3 G
v1.86.0
15 G
8.8 GQuoted 7 lines
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_1.86.0_v2Regards,
YashHi Yash
Quoted 6 lines
That's good progress. We'll need to think about what, it anything, we're missing by not building rust-lld. We should run some tests to compare the link times but that can likely wait until after we get the update merged.
Though the internet has some information on lld improvements having this
in OE context will be valuable.
I also think disabling lld is going to give us some reprieve. As more targets in rust seem to use it by default we need to consider that we do not start disabling defaults and wear off from upstream.
Quoted 40 lines
Remaining concerns:
1. Significant increase in FS usage, compile time. Have you looked into why there's still such a significant increase?
2. * Enable INHIBIT_PACKAGE_DEBUG_SPLIT/STRIP to fix QA stripping errors.
Fixes: ERROR: rust-1.86.0-r0do_package: QA Issue: File '/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/wasm-component-ld' from rust was already stripped, this will prevent future debugging! [already-stripped]Do we use this component? Is it new? Why is it produced without debug symbols?
I'll take a more careful look at the commit code changes once we have answers to these questions.
Thanks for your hard work.
Almost done this upgrade hopefully.Randy
Alex
Quoted 13 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#217714):
https://lists.openembedded.org/g/openembedded-core/message/217714
Mute This Topic: https://lists.openembedded.org/mt/113268009/953399
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 58 lines · Khem Raj
On Mon, Jun 2, 2025 at 6:03 AM Randy MacLeod <[email protected]> wrote:
Hi Yash,
On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org
<https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv-rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7rtMhcpAg$>
<[email protected]> wrote:Quoted 10 lines · Alexander Kanavin
On Fri, 30 May 2025 at 14:42, Yash Shinde<[email protected]> wrote:Quoted 6 lines
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.What about build times though? Are they back to what they were?
The build time differences on my machine are as follows:
rust version
rust upstream builds
rust-native (yocto build)
rust target (yocto build)
v1.85.1
10 mins
20 mins
33 mins
v1.86.0
22 mins (with "lld" and "use-lld" set to "false")
30 mins (with default settings i.e lld = true)31 mins (with "lld" and
"use-lld" set to "false") 43 mins (with "lld" and
"use-lld" set to "false")Note: The machine being used is a shared resource and fairly busy. Build times may differ due to other user's builds.
The FS usage is as follows:
Rust version
rust upstream builds
Yocto rust builds
(build/tmp/work/core2-64-poky-linux/rust/1.86.0/rustc-1.86.0-src/build) v1.85.1
4.6 G
6.3 G
v1.86.0
15 G
8.8 G
Quoted 4 lines
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_1.86.0_v2
<https://urldefense.com/v3/__https://git.yoctoproject.org/poky-contrib/log/?h=harish*rust_1.86.0_v2__;Lw!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv-rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7qkai0dkw$>
FS bloat is partly due to:
1. we forgot to remove cargo from rust pkg,
2. rust-analyzer added in 1.86, - do we need it?
3. wasm-component-ld built - do we need it?
4. llvm-bitcode-linker built - do we need it?
For now, drop the things we don't need by changing config.toml.
We can consider adding them as disabled by default PACKAGECONFIG[feature] options later.
This is from looking at the packages-split contents and a filtered log.do_install. Details and more info below.
../Randy
I expect that rust-analyzer is also the primary reason for the build time increase but hopefully Yash can confirm.
I dug through the log files a bit which I don't do often these days so maybe there's a better way to get this info.
❯ rg "^COMPILE|^Building" 1.85.1/log.do_install | sed 's/ (.*)$//' > 1.85.1/COMPILE-Building ❯ rg "^COMPILE|^Building" 1.86/log.do_install | sed 's/ (.*)$//' > 1.86/COMPILE-Building
Diffs below (1).
Initially I was looking at log.do_install and filtering out noise using a combination of grep, sed, and emacs macros of all things!
I ended up reducing the log.do_install file length by an order of magnitude:
❯ wc -l */log.do_install
13351 1.85.1/log.do_install
22144 1.86/log.do_install
❯ wc -l */log.do_install.Compiling.fix-with-emacs.Compiling.sed-path 1211 1.85.1/log.do_install.Compiling.fix-with-emacs.Compiling.sed-path 2103 1.86/log.do_install.Compiling.fix-with-emacs.Compiling.sed-path
Diff here:
https://www.diffchecker.com/hduQYfmq/
in case anyone is interested in the lower level build view.
1) diff -u and sdiff of high level COMPILE|Building
✦ ❯ diff -u 1.8*/COMPILE-Building
COMPILE-Building 2025-06-03 14:11:44.997206613 -0400 renamed from COMPILE-Building 2025-06-03 14:11:34.838212146 -0400 +0 -0
@@ -2,18 +2,36 @@
Building bootstrap
Building stage0 library artifacts
Building compiler artifacts
+Building stage0 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building compiler artifacts
+Building stage1 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building stage0 tool rust-installer
Building compiler artifacts
+Building stage1 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building tool rustdoc
+Building tool rust-analyzer-proc-macro-srv
+Building stage0 tool generate-copyright
+Building tool cargo
+Building tool rust-analyzer
+Building tool rustfmt
+Building tool cargo-fmt
+Building tool clippy-driver
+Building tool cargo-clippy
COMPILE rust install clippy
Building bootstrap
Building stage0 library artifacts
Building compiler artifacts
+Building stage0 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building compiler artifacts
+Building stage1 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building compiler artifacts
Building tool clippy-driver
@@ -23,8 +41,12 @@
Building bootstrap
Building stage0 library artifacts
Building compiler artifacts
+Building stage0 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building compiler artifacts
+Building stage1 tool wasm-component-ld
+Building tool llvm-bitcode-linker
Building stage1 library artifacts
Building compiler artifacts
Building tool rustfmt
✦ ❯ sdiff 1.8*/COMPILE-Building
COMPILE rust install COMPILE rust install Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts > Building stage0 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts > Building stage1 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building stage0 tool rust-installer Building stage0 tool rust-installer Building compiler artifacts Building compiler artifacts > Building stage1 tool wasm-component-ld > Building tool llvm-bitcode-linker Building tool rustdoc Building tool rustdoc
> Building tool rust-analyzer-proc-macro-srv > Building stage0 tool generate-copyright > Building tool cargo
> Building tool rust-analyzer
> Building tool rustfmt
> Building tool cargo-fmt
> Building tool clippy-driver
> Building tool cargo-clippy COMPILE rust install clippy COMPILE rust install clippy Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts > Building stage0 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts > Building stage1 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts Building tool clippy-driver Building tool clippy-driver Building tool cargo-clippy Building tool cargo-clippy Building stage0 tool rust-installer Building stage0 tool rust-installer COMPILE rust install rustfmt COMPILE rust install rustfmt Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts > Building stage0 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts > Building stage1 tool wasm-component-ld > Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts Building tool rustfmt Building tool rustfmt Building tool cargo-fmt Building tool cargo-fmt Building stage0 tool rust-installer Building stage0 tool rust-installer
Quoted 60 lines
Regards,
YashHi Yash
That's good progress. We'll need to think about what, it anything, we're missing by not building rust-lld. We should run some tests to compare the link times but that can likely wait until after we get the update merged.
Though the internet has some information on lld improvements having this in OE context will be valuable.
I also think disabling lld is going to give us some reprieve. As more targets in rust seem to use it by default we need to consider that we do not start disabling defaults and wear off from upstream.Remaining concerns:
1. Significant increase in FS usage, compile time. Have you looked into why there's still such a significant increase?
2. * Enable INHIBIT_PACKAGE_DEBUG_SPLIT/STRIP to fix QA stripping errors. Fixes: ERROR: rust-1.86.0-r0
do_package: QA Issue: File '/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/wasm-component-ld' from rust was already stripped, this will prevent future debugging! [already-stripped]Do we use this component? Is it new? Why is it produced without debug symbols?
I'll take a more careful look at the commit code changes once we have answers to these questions.
Thanks for your hard work.
Almost done this upgrade hopefully.Randy
Quoted 1 line
Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#217714): https://lists.openembedded.org/g/openembedded-core/message/217714 <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/217714__;!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv-rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7oWKRQz_A$> Mute This Topic: https://lists.openembedded.org/mt/113268009/953399 <https://urldefense.com/v3/__https://lists.openembedded.org/mt/113268009/953399__;!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv-rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7pWRz_sBA$> Group Owner: [email protected] <mailto:openembedded-core%[email protected]> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv-rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7ryeheIkg$> [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Quoted 70 lines · Randy MacLeod
Quoted 60 lines · Khem Raj
On Mon, Jun 2, 2025 at 6:03 AM Randy MacLeod <[email protected]> wrote:
Hi Yash, On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org <https://urldefense.com/v3/__http://lists.openembedded.org__;!! AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv- rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7rtMhcpAg$> <[email protected]> wrote: On 30-05-2025 18:45, Alexander Kanavin wrote:Quoted 10 lines · Yash Shinde
Quoted 7 lines
As Khem mentioned, setting lld = false in config.toml doesn't build LLD. Furthermore, using "use-lld = false" ensures that LLD is not used as the default linker,
causing the build to fall back to the system's default linker. This restores the earlier behavior.
Also, the package QA error for rust-lld is not seen with this.What about build times though? Are they back to what they were?
The build time differences on my machine are as follows:
rust version
rust upstream builds
rust-native (yocto build)
rust target (yocto build)
v1.85.1
10 mins
20 mins
33 mins
v1.86.0
22 mins (with "lld" and "use-lld" set to "false")
30 mins (with default settings i.e lld = true)31 mins (with "lld" and
"use-lld" set to "false") 43 mins (with "lld" and
"use-lld" set to "false")Note: The machine being used is a shared resource and fairly busy. Build times may differ due to other user's builds.
The FS usage is as follows:
Rust version
rust upstream builds
Yocto rust builds (build/tmp/work/core2-64-poky-linux/
rust/1.86.0/rustc-1.86.0-src/build)
v1.85.1
4.6 G
6.3 G
v1.86.0
15 G
8.8 GQuoted 8 lines
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/
rust_1.86.0_v2 <https://urldefense.com/v3/__https://
git.yoctoproject.org/poky-contrib/log/? h=harish*rust_1.86.0_v2__;Lw!!AjveYdw8EvQ! eFbErouxWe_8sEEVI1krYJ8mhuv- rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7qkai0dkw$>
Quoted 3 lines
FS bloat is partly due to:
1. we forgot to remove cargo from rust pkg,
2. rust-analyzer added in 1.86, - do we need it?
I think its not a bad idea for cross compiler on host and perhaps a packageconfig for target. Same for clippy, rustfmt
Quoted 1 line
3. wasm-component-ld built - do we need it?
If we need to support wasm output for rust compiler. Seems to be a good candidate for packageconfig with disabled default.
Quoted 2 lines
4. llvm-bitcode-linker built - do we need it?
it was used from stage0 in prior releases. Now it is cross compiled and is better
another change is that LTO is enabled for all these tool builds which might be also adding to build time, even though resulting binaries might be faster.
Quoted 233 lines
For now, drop the things we don't need by changing config.toml.
We can consider adding them as disabled by default PACKAGECONFIG[feature] options later.This is from looking at the packages-split contents and a filtered log.do_install. Details and more info below.
../Randy
I expect that rust-analyzer is also the primary reason for the build time increase but hopefully Yash can confirm.
I dug through the log files a bit which I don't do often these days so maybe there's a better way to get this info.
❯ rg "^COMPILE|^Building" 1.85.1/log.do_install | sed 's/ (.*)$//' > 1.85.1/COMPILE-Building ❯ rg "^COMPILE|^Building" 1.86/log.do_install | sed 's/ (.*)$//' > 1.86/COMPILE-Building
Diffs below (1).
Initially I was looking at log.do_install and filtering out noise using a combination of grep, sed, and emacs macros of all things!
I ended up reducing the log.do_install file length by an order of magnitude:
❯ wc -l */log.do_install
13351 1.85.1/log.do_install
22144 1.86/log.do_install❯ wc -l */log.do_install.Compiling.fix-with-emacs.Compiling.sed-path
1211 1.85.1/log.do_install.Compiling.fix-with-emacs.Compiling.sed-path 2103 1.86/log.do_install.Compiling.fix-with-emacs.Compiling.sed-pathDiff here:
https://www.diffchecker.com/hduQYfmq/in case anyone is interested in the lower level build view.
1) diff -u and sdiff of high level COMPILE|Building
✦ ❯ diff -u 1.8*/COMPILE-Building
COMPILE-Building 2025-06-03 14:11:44.997206613 -0400 renamed from COMPILE-Building 2025-06-03 14:11:34.838212146 -0400 +22
-0@@ -2,18 +2,36 @@ Building bootstrap Building stage0 library artifacts Building compiler artifacts +Building stage0 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building compiler artifacts +Building stage1 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building stage0 tool rust-installer Building compiler artifacts +Building stage1 tool wasm-component-ld +Building tool llvm-bitcode-linker Building tool rustdoc +Building tool rust-analyzer-proc-macro-srv +Building stage0 tool generate-copyright +Building tool cargo +Building tool rust-analyzer +Building tool rustfmt +Building tool cargo-fmt +Building tool clippy-driver +Building tool cargo-clippy COMPILE rust install clippy Building bootstrap Building stage0 library artifacts Building compiler artifacts +Building stage0 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building compiler artifacts +Building stage1 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building compiler artifacts Building tool clippy-driver@@ -23,8 +41,12 @@ Building bootstrap Building stage0 library artifacts Building compiler artifacts +Building stage0 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building compiler artifacts +Building stage1 tool wasm-component-ld +Building tool llvm-bitcode-linker Building stage1 library artifacts Building compiler artifacts Building tool rustfmt✦ ❯ sdiff 1.8*/COMPILE-Building
COMPILE rust install COMPILE rust install Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage0 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage1 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building stage0 tool rust-installer Building stage0 tool rust-installer Building compiler artifacts Building compiler artifacts
> Building stage1 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building tool rustdoc Building tool rustdoc
> Building tool rust-analyzer-
proc-macro-srv
> Building stage0 tool generate-
copyright
> Building tool cargo
> Building tool rust-analyzer
> Building tool rustfmt
> Building tool cargo-fmt
> Building tool clippy-driver
> Building tool cargo-clippy
COMPILE rust install clippy COMPILE rust install clippy Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage0 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage1 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts Building tool clippy-driver Building tool clippy-driver Building tool cargo-clippy Building tool cargo-clippy Building stage0 tool rust-installer Building stage0 tool rust-installer COMPILE rust install rustfmt COMPILE rust install rustfmt Building bootstrap Building bootstrap
Building stage0 library artifacts Building stage0 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage0 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts
> Building stage1 tool wasm-
component-ld
> Building tool llvm-bitcode-linker
Building stage1 library artifacts Building stage1 library artifacts Building compiler artifacts Building compiler artifacts Building tool rustfmt Building tool rustfmt Building tool cargo-fmt Building tool cargo-fmt Building stage0 tool rust-installer Building stage0 tool rust-installerQuoted 66 lines
Regards,
YashHi Yash
That's good progress. We'll need to think about what, it anything, we're missing by not building rust-lld. We should run some tests to compare the link times but that can likely wait until after we get the update merged.
Though the internet has some information on lld improvements having this in OE context will be valuable.
I also think disabling lld is going to give us some reprieve. As more targets in rust seem to use it by default we need to consider that we do not start disabling defaults and wear off from upstream.Remaining concerns:
1. Significant increase in FS usage, compile time. Have you looked into why there's still such a significant increase?
2. * Enable INHIBIT_PACKAGE_DEBUG_SPLIT/STRIP to fix QA stripping errors. Fixes: ERROR: rust-1.86.0-r0
do_package: QA Issue: File '/usr/lib/rustlib/x86_64-poky-linux-gnu/bin/wasm-component-ld' from rust was already stripped, this will prevent future debugging! [already-stripped]Do we use this component? Is it new? Why is it produced without debug symbols?
I'll take a more careful look at the commit code changes once we have answers to these questions.
Thanks for your hard work.
Almost done this upgrade hopefully.Randy
Quoted 1 line
Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#217714): https://lists.openembedded.org/g/ openembedded-core/message/217714 <https://urldefense.com/v3/ __https://lists.openembedded.org/g/openembedded-core/ message/217714__;!!AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv- rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7oWKRQz_A$> Mute This Topic: https://lists.openembedded.org/ mt/113268009/953399 <https://urldefense.com/v3/__https:// lists.openembedded.org/mt/113268009/953399__;!!AjveYdw8EvQ! eFbErouxWe_8sEEVI1krYJ8mhuv- rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7pWRz_sBA$> Group Owner: [email protected] <mailto:openembedded-core%[email protected]> Unsubscribe: https://lists.openembedded.org/g/openembedded- core/unsub <https://urldefense.com/v3/__https:// lists.openembedded.org/g/openembedded-core/unsub__;!! AjveYdw8EvQ!eFbErouxWe_8sEEVI1krYJ8mhuv- rIrrvLEk7rYp2ZeCBYDpMmsVsNya8myxiMywaOFMMtB__0YvY7ryeheIkg$> [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-Signature · 2 lines
# Randy MacLeod # Wind River Linux
Hi,
I cleaned the previously built sources and re-triggered the rust builds. The earlier data was based on testing with the older builds. After cleaning and re-building, the build time and FS usage are now comparable to rust v1.85.1.
Here is the new data:
rust version
Build time(rust-native)
Build time (rust target)
FS usage
(build/tmp/work/core2-64-poky-linux/rust/1.86.0/rustc-1.86.0-src/build) v 1.85.1
20 mins 33 mins 6.3 G v 1.86 25 mins 35 mins 6.6 G
I have sent the rust v1.86.0 upgrade here:
https://lists.openembedded.org/g/openembedded-core/message/218136
Regards,
Yash
On 2025-06-02 7:15 a.m., Yash Shinde wrote:
...
Quoted 4 lines
The latest rust v1.86.0 upgrade changes are available at:
https://git.yoctoproject.org/poky-contrib/log/?h=harish/rust_1.86.0_v2
You have the zsh file in with the main package in:
# Whether or not to optimize the compiler and standard library @@ -222,6 +228,7 @@ INSANE_SKIP:${PN}:class-native = "already-stripped" FILES:${PN} += "${libdir}/rustlib"
FILES:${PN} += "${libdir}/*.so"
FILES:${PN}-dev = ""
+FILES:${PN} += "${datadir}/zsh"
This should be a separate package like:
❯ rg FILE.**zsh meta/recipes-core/systemd/systemd_257.5.bb 511:FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
meta/recipes-kernel/kmod/kmod_34.2.bb
58:FILES:${PN}-zsh-completion = "${datadir}/zsh"
...
Thanks,
../Randy
Quoted 6 lines
Regards,
YashQuoted 1 line
Alex
Signature · 2 lines
# Randy MacLeod # Wind River Linux