Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC] rust: Upgrade 1.85.1->1.86.0
@ 2025-05-23 16:22 Yash Shinde
  2025-05-27 12:47 ` [OE-core] " Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Yash Shinde @ 2025-05-23 16:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
  Cc: MacLeod, Randy, Kokkonda, Sundeep

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.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-23 16:22 [RFC] rust: Upgrade 1.85.1->1.86.0 Yash Shinde
@ 2025-05-27 12:47 ` Alexander Kanavin
       [not found] ` <184363192F51E64D.13855@lists.openembedded.org>
  2025-05-27 14:06 ` Alexander Kanavin
  2 siblings, 0 replies; 18+ messages in thread
From: Alexander Kanavin @ 2025-05-27 12:47 UTC (permalink / raw)
  To: Yash.Shinde
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep

On Fri, 23 May 2025 at 18:22, Yash Shinde via lists.openembedded.org
<Yash.Shinde=windriver.com@lists.openembedded.org> wrote:

> 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.

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
       [not found] ` <184363192F51E64D.13855@lists.openembedded.org>
@ 2025-05-27 13:40   ` Alexander Kanavin
  2025-05-27 14:40     ` Yash Shinde
  0 siblings, 1 reply; 18+ messages in thread
From: Alexander Kanavin @ 2025-05-27 13:40 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
  Cc: MacLeod, Randy, Kokkonda, Sundeep, Shinde, Yash

On Tue, 27 May 2025 at 14:47, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:

> 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.

Target rust as well regressed: 18 min -> 33 minutes. This does need to
be addressed :-/

Alex


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-23 16:22 [RFC] rust: Upgrade 1.85.1->1.86.0 Yash Shinde
  2025-05-27 12:47 ` [OE-core] " Alexander Kanavin
       [not found] ` <184363192F51E64D.13855@lists.openembedded.org>
@ 2025-05-27 14:06 ` Alexander Kanavin
  2025-05-27 14:42   ` Yash Shinde
  2 siblings, 1 reply; 18+ messages in thread
From: Alexander Kanavin @ 2025-05-27 14:06 UTC (permalink / raw)
  To: Yash.Shinde
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep

On Fri, 23 May 2025 at 18:22, Yash Shinde via lists.openembedded.org
<Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
> 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]

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-27 13:40   ` Alexander Kanavin
@ 2025-05-27 14:40     ` Yash Shinde
  0 siblings, 0 replies; 18+ messages in thread
From: Yash Shinde @ 2025-05-27 14:40 UTC (permalink / raw)
  To: Alexander Kanavin,
	Patches and discussions about the oe-core layer
  Cc: MacLeod, Randy, Kokkonda, Sundeep


On 27-05-2025 19:10, 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 Tue, 27 May 2025 at 14:47, Alexander Kanavin via
> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
> wrote:
>
>> 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.
> 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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-27 14:06 ` Alexander Kanavin
@ 2025-05-27 14:42   ` Yash Shinde
  2025-05-27 16:26     ` Alexander Kanavin
  0 siblings, 1 reply; 18+ messages in thread
From: Yash Shinde @ 2025-05-27 14:42 UTC (permalink / raw)
  To: Alexander Kanavin
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep


On 27-05-2025 19:36, 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, 23 May 2025 at 18:22, Yash Shinde via lists.openembedded.org
> <Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
>> 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]
> 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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-27 14:42   ` Yash Shinde
@ 2025-05-27 16:26     ` Alexander Kanavin
  2025-05-30  2:32       ` Khem Raj
  0 siblings, 1 reply; 18+ messages in thread
From: Alexander Kanavin @ 2025-05-27 16:26 UTC (permalink / raw)
  To: Yash Shinde
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep

On Tue, 27 May 2025 at 16:42, Yash Shinde <Yash.Shinde@windriver.com> wrote:
> 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?

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-27 16:26     ` Alexander Kanavin
@ 2025-05-30  2:32       ` Khem Raj
  2025-05-30 12:42         ` Yash Shinde
  0 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2025-05-30  2:32 UTC (permalink / raw)
  To: alex.kanavin, Yash Shinde
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep



On 5/27/25 9:26 AM, Alexander Kanavin via lists.openembedded.org wrote:
> On Tue, 27 May 2025 at 16:42, Yash Shinde <Yash.Shinde@windriver.com> wrote:
>> 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?
> 
> 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.

> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-30  2:32       ` Khem Raj
@ 2025-05-30 12:42         ` Yash Shinde
  2025-05-30 13:15           ` Alexander Kanavin
  0 siblings, 1 reply; 18+ messages in thread
From: Yash Shinde @ 2025-05-30 12:42 UTC (permalink / raw)
  To: Khem Raj, alex.kanavin
  Cc: Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep


On 30-05-2025 08:02, Khem Raj 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 5/27/25 9:26 AM, Alexander Kanavin via lists.openembedded.org wrote:
>> On Tue, 27 May 2025 at 16:42, Yash Shinde <Yash.Shinde@windriver.com> 
>> wrote:
>>> 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?
>>
>> 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.
>
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


>> Alex
>>
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-30 12:42         ` Yash Shinde
@ 2025-05-30 13:15           ` Alexander Kanavin
  2025-06-02 11:15             ` Yash Shinde
  0 siblings, 1 reply; 18+ messages in thread
From: Alexander Kanavin @ 2025-05-30 13:15 UTC (permalink / raw)
  To: Yash Shinde
  Cc: Khem Raj, Patches and discussions about the oe-core layer,
	MacLeod, Randy, Kokkonda, Sundeep

On Fri, 30 May 2025 at 14:42, Yash Shinde <Yash.Shinde@windriver.com> 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?

Alex


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-05-30 13:15           ` Alexander Kanavin
@ 2025-06-02 11:15             ` Yash Shinde
  2025-06-02 13:03               ` Randy MacLeod
  2025-06-03 19:14               ` Randy MacLeod
  0 siblings, 2 replies; 18+ messages in thread
From: Yash Shinde @ 2025-06-02 11:15 UTC (permalink / raw)
  To: Alexander Kanavin
  Cc: Khem Raj, Patches and discussions about the oe-core layer,
	MacLeod, Randy, Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]


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<Yash.Shinde@windriver.com> 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

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

> Alex

[-- Attachment #2: Type: text/html, Size: 4163 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-02 11:15             ` Yash Shinde
@ 2025-06-02 13:03               ` Randy MacLeod
  2025-06-02 17:09                 ` Khem Raj
  2025-06-03 19:14               ` Randy MacLeod
  1 sibling, 1 reply; 18+ messages in thread
From: Randy MacLeod @ 2025-06-02 13:03 UTC (permalink / raw)
  To: Shinde, Yash
  Cc: Alexander Kanavin, Khem Raj,
	Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 3146 bytes --]

Hi Yash,


On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org
<Yash.Shinde=windriver.com@lists.openembedded.org> wrote:

>
> 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 <Yash.Shinde@windriver.com> <Yash.Shinde@windriver.com> 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
>
> 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
>

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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> rwmacleod@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 7011 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-02 13:03               ` Randy MacLeod
@ 2025-06-02 17:09                 ` Khem Raj
  2025-06-03 18:31                   ` Randy MacLeod
  0 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2025-06-02 17:09 UTC (permalink / raw)
  To: Randy MacLeod
  Cc: Shinde, Yash, Alexander Kanavin,
	Patches and discussions about the oe-core layer, MacLeod, Randy,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 3792 bytes --]

On Mon, Jun 2, 2025 at 6:03 AM Randy MacLeod <rwmacleod@gmail.com> wrote:

> Hi Yash,
>
>
> On Mon, Jun 2, 2025, 07:15 Yash Shinde via lists.openembedded.org
> <Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
>
>>
>> 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 <Yash.Shinde@windriver.com> <Yash.Shinde@windriver.com> 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
>>
>> 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
>>
>
> 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.
>
>
> 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
>
> Alex
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 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: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
>> rwmacleod@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>

[-- Attachment #2: Type: text/html, Size: 7962 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-02 17:09                 ` Khem Raj
@ 2025-06-03 18:31                   ` Randy MacLeod
  2025-06-03 20:56                     ` Khem Raj
  2025-06-06 12:50                     ` Yash Shinde
  0 siblings, 2 replies; 18+ messages in thread
From: Randy MacLeod @ 2025-06-03 18:31 UTC (permalink / raw)
  To: Khem Raj, Randy MacLeod
  Cc: Shinde, Yash, Alexander Kanavin,
	Patches and discussions about the oe-core layer,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 14397 bytes --]

On 2025-06-02 1:09 p.m., Khem Raj wrote:
>
>
> On Mon, Jun 2, 2025 at 6:03 AM Randy MacLeod <rwmacleod@gmail.com> 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$>
>     <Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
>
>
>         On 30-05-2025 18:45, Alexander Kanavin wrote:
>>         On Fri, 30 May 2025 at 14:42, Yash Shinde<Yash.Shinde@windriver.com> 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
>
>         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
--- 1.85.1/COMPILE-Building    2025-06-03 14:11:34.838212146 -0400
+++ 1.86/COMPILE-Building    2025-06-03 14:11:44.997206613 -0400
@@ -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

>
>         Regards,
>         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.
>
>
> 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
>
>>         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: openembedded-core+owner@lists.openembedded.org
>         <mailto:openembedded-core%2Bowner@lists.openembedded.org>
>         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$>
>         [rwmacleod@gmail.com]
>         -=-=-=-=-=-=-=-=-=-=-=-
>

-- 
# Randy MacLeod
# Wind River Linux

[-- Attachment #2: Type: text/html, Size: 30288 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-02 11:15             ` Yash Shinde
  2025-06-02 13:03               ` Randy MacLeod
@ 2025-06-03 19:14               ` Randy MacLeod
  1 sibling, 0 replies; 18+ messages in thread
From: Randy MacLeod @ 2025-06-03 19:14 UTC (permalink / raw)
  To: Yash Shinde, Alexander Kanavin
  Cc: Khem Raj, Patches and discussions about the oe-core layer,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

On 2025-06-02 7:15 a.m., Yash Shinde wrote:
...
> 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

>
>
> Regards,
> Yash
>
>> Alex


-- 
# Randy MacLeod
# Wind River Linux

[-- Attachment #2: Type: text/html, Size: 2593 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-03 18:31                   ` Randy MacLeod
@ 2025-06-03 20:56                     ` Khem Raj
  2025-06-06 12:50                     ` Yash Shinde
  1 sibling, 0 replies; 18+ messages in thread
From: Khem Raj @ 2025-06-03 20:56 UTC (permalink / raw)
  To: Randy MacLeod, Randy MacLeod
  Cc: Shinde, Yash, Alexander Kanavin,
	Patches and discussions about the oe-core layer,
	Kokkonda, Sundeep



On 6/3/25 11:31 AM, Randy MacLeod wrote:
> On 2025-06-02 1:09 p.m., Khem Raj wrote:
>>
>>
>> On Mon, Jun 2, 2025 at 6:03 AM Randy MacLeod <rwmacleod@gmail.com> 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$>
>>     <Yash.Shinde=windriver.com@lists.openembedded.org> wrote:
>>
>>
>>         On 30-05-2025 18:45, Alexander Kanavin wrote:
>>>         On Fri, 30 May 2025 at 14:42, Yash Shinde<Yash.Shinde@windriver.com> 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
>>
>>         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?

I think its not a bad idea for cross compiler on host and perhaps a 
packageconfig for target. Same for clippy, rustfmt

>     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.

>     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.

> 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
> --- 1.85.1/COMPILE-Building    2025-06-03 14:11:34.838212146 -0400
> +++ 1.86/COMPILE-Building    2025-06-03 14:11:44.997206613 -0400
> @@ -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
> 
>>
>>         Regards,
>>         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.
>>
>>
>> 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
>>
>>>         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: openembedded-core+owner@lists.openembedded.org
>>         <mailto:openembedded-core%2Bowner@lists.openembedded.org>
>>         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$>
>>         [rwmacleod@gmail.com]
>>         -=-=-=-=-=-=-=-=-=-=-=-
>>
> 
> -- 
> # Randy MacLeod
> # Wind River Linux
> 



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-03 18:31                   ` Randy MacLeod
  2025-06-03 20:56                     ` Khem Raj
@ 2025-06-06 12:50                     ` Yash Shinde
  2025-06-06 12:57                       ` Yash Shinde
  1 sibling, 1 reply; 18+ messages in thread
From: Yash Shinde @ 2025-06-06 12:50 UTC (permalink / raw)
  To: Randy MacLeod, Khem Raj, Randy MacLeod
  Cc: Alexander Kanavin,
	Patches and discussions about the oe-core layer,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1753 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [OE-core] [RFC] rust: Upgrade 1.85.1->1.86.0
  2025-06-06 12:50                     ` Yash Shinde
@ 2025-06-06 12:57                       ` Yash Shinde
  0 siblings, 0 replies; 18+ messages in thread
From: Yash Shinde @ 2025-06-06 12:57 UTC (permalink / raw)
  To: Randy MacLeod, Khem Raj, Randy MacLeod
  Cc: Alexander Kanavin,
	Patches and discussions about the oe-core layer,
	Kokkonda, Sundeep

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

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/218138

Regards,
Yash

[-- Attachment #2: Type: text/html, Size: 1178 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-06-06 12:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 16:22 [RFC] rust: Upgrade 1.85.1->1.86.0 Yash Shinde
2025-05-27 12:47 ` [OE-core] " Alexander Kanavin
     [not found] ` <184363192F51E64D.13855@lists.openembedded.org>
2025-05-27 13:40   ` Alexander Kanavin
2025-05-27 14:40     ` Yash Shinde
2025-05-27 14:06 ` Alexander Kanavin
2025-05-27 14:42   ` Yash Shinde
2025-05-27 16:26     ` Alexander Kanavin
2025-05-30  2:32       ` Khem Raj
2025-05-30 12:42         ` Yash Shinde
2025-05-30 13:15           ` Alexander Kanavin
2025-06-02 11:15             ` Yash Shinde
2025-06-02 13:03               ` Randy MacLeod
2025-06-02 17:09                 ` Khem Raj
2025-06-03 18:31                   ` Randy MacLeod
2025-06-03 20:56                     ` Khem Raj
2025-06-06 12:50                     ` Yash Shinde
2025-06-06 12:57                       ` Yash Shinde
2025-06-03 19:14               ` Randy MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox