Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
@ 2026-08-26 15:54 Alejandro Hernandez
  2026-08-26 18:25 ` Dora, Sunil Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Alejandro Hernandez @ 2026-08-26 15:54 UTC (permalink / raw)
  To: openembedded-core

rustc computes each crate's Strict Version Hash (SVH) using inputs that include
the *stage0/stage1 bootstrap compiler* fingerprint, which in turn depends on the
build host arch.

This eventually may cause sstate matches across architectures for artifacts that
are actually different, causing autobuilder intermitent reproducibility issues.

To avoid this, pass a fixed value instead of host-specific bits to the specified
hash.

[YOCTO #15554]

Assisted-by: AI - OpenAI
Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
---
 ...ide-cfg-version-from-stable-crate-id.patch | 35 +++++++++++++++++++
 meta/recipes-devtools/rust/rust-source.inc    |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/0003-rustc-span-add-oe-knob-to-elide-cfg-version-from-stable-crate-id.patch

diff --git a/meta/recipes-devtools/rust/files/0003-rustc-span-add-oe-knob-to-elide-cfg-version-from-stable-crate-id.patch b/meta/recipes-devtools/rust/files/0003-rustc-span-add-oe-knob-to-elide-cfg-version-from-stable-crate-id.patch
new file mode 100644
index 0000000000..f9d171df75
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/0003-rustc-span-add-oe-knob-to-elide-cfg-version-from-stable-crate-id.patch
@@ -0,0 +1,35 @@
+rust: Avoid passing host-dependent fingerprint to build artifacts
+
+To fix reproducibility issues, pass a fixed value instead of passing a
+host-dependent fingerprint to the rust build artifacts via the Strict
+Version Hash (SVH)
+
+Upstream-Status: Inappropriate [OE-specific reproducibility policy]
+Signed-off-by: Alejandro Hernandez <alhe@linux.microsoft.com>
+---
+--- a/compiler/rustc_span/src/def_id.rs
++++ b/compiler/rustc_span/src/def_id.rs
+@@ -163,7 +163,7 @@
+         crate_name: Symbol,
+         is_exe: bool,
+         mut metadata: Vec<String>,
+-        cfg_version: &'static str,
++        _cfg_version: &'static str,
+     ) -> StableCrateId {
+         let mut hasher = StableHasher::new();
+         // We must hash the string text of the crate name, not the id, as the id is not stable
+@@ -195,11 +195,9 @@
+         //
+         // RUSTC_FORCE_RUSTC_VERSION is used to inject rustc version information
+         // during testing.
+-        if let Some(val) = std::env::var_os("RUSTC_FORCE_RUSTC_VERSION") {
+-            hasher.write(val.to_string_lossy().into_owned().as_bytes())
+-        } else {
+-            hasher.write(cfg_version.as_bytes())
+-        }
++        // OE reproducible builds use a fixed value so host-varying bootstrap
++        // fingerprints do not perturb StableCrateId.
++        hasher.write(b"oe-stable-crate-id-no-cfg-version");
+ 
+         StableCrateId(hasher.finish())
+     }
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 68f3009a7b..2bff69de3d 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -6,6 +6,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \
             file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
             file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \
+            file://0003-rustc-span-add-oe-knob-to-elide-cfg-version-from-stable-crate-id.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "0ed06fdaffd4722a7702e0b4eebfafc897ab8f513e8e1b247cdd7e5c6df6ded2"
 
-- 
2.43.0



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

* Re: [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-26 15:54 [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash Alejandro Hernandez
@ 2026-08-26 18:25 ` Dora, Sunil Kumar
  2026-08-26 19:17   ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Dora, Sunil Kumar @ 2026-08-26 18:25 UTC (permalink / raw)
  To: openembedded-core

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

Hi Alejandro,

Thanks for chasing this one down. Small notes on v3:

The commit is tagged [YOCTO #15554], but that bug is "reproducibility
failures with 'rustdoc' on rust 1.75" (path-length dependent), RESOLVED FIXED
since 2024-08-01 via codegen-units=1 / lto=off.

What you describe here - artifacts differing by build host arch, causing
cross-architecture sstate matches - looks like:

[YOCTO #16376] AB-INT: build system architecture reproducibility issue
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376

which is still open. Could you retag it in v4, unless you had a reason to
point at 15554 that I'm missing?
---
One pointer that may or may not be relevant: the 1.97.1 upgrade (65271a5d3b)
carries an LLVM backport:

0043-LoopUnroll-Iterate-exit-fold-candidates-in-determini.patch

added for a repro issue seen with rust 1.97.0. I haven't looked at whether it
interacts with the SVH path at all - just flagging it in case it's useful context.

Thanks,
Sunil Dora

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

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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-26 18:25 ` Dora, Sunil Kumar
@ 2026-08-26 19:17   ` Richard Purdie
  2026-08-26 20:08     ` Alejandro Hernandez
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2026-08-26 19:17 UTC (permalink / raw)
  To: SunilKumar.Dora, openembedded-core, Alejandro Hernandez Samaniego

On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via lists.openembedded.org wrote:
> Hi Alejandro,
> 
> Thanks for chasing this one down. Small notes on v3:
> 
> The commit is tagged [YOCTO #15554], but that bug is "reproducibility
> failures with 'rustdoc' on rust 1.75" (path-length dependent), RESOLVED FIXED
> since 2024-08-01 via codegen-units=1 / lto=off.
> 
> What you describe here - artifacts differing by build host arch, causing
> cross-architecture sstate matches - looks like:
> 
>   [YOCTO #16376] AB-INT: build system architecture reproducibility issue
>   https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
> 
> which is still open. Could you retag it in v4, unless you had a reason to
> point at 15554 that I'm missing?
> ---
> One pointer that may or may not be relevant: the 1.97.1 upgrade (65271a5d3b)
> carries an LLVM backport:
> 
>   0043-LoopUnroll-Iterate-exit-fold-candidates-in-determini.patch
> 
> added for a repro issue seen with rust 1.97.0. I haven't looked at whether it
> interacts with the SVH path at all - just flagging it in case it's useful context.

I put v3 in for testing on the autobuilder and it looks promising, there are some rust test suite failures though:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577

and probably more to follow. We may need to exclude those tests?

I also triggered the reproducibility test targets:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3

those builds are ongoing.

Cheers,

Richard


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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-26 19:17   ` [OE-core] " Richard Purdie
@ 2026-08-26 20:08     ` Alejandro Hernandez
  2026-08-26 20:47       ` Richard Purdie
       [not found]       ` <18CF75EE37DB8543.642712@lists.openembedded.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Alejandro Hernandez @ 2026-08-26 20:08 UTC (permalink / raw)
  To: richard.purdie, SunilKumar.Dora, openembedded-core


On 8/26/2026 1:17 PM, Richard Purdie via lists.openembedded.org wrote:
> On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via lists.openembedded.org wrote:
>> Hi Alejandro,
>>
>> Thanks for chasing this one down. Small notes on v3:
>>
>> The commit is tagged [YOCTO #15554], but that bug is "reproducibility
>> failures with 'rustdoc' on rust 1.75" (path-length dependent), RESOLVED FIXED
>> since 2024-08-01 via codegen-units=1 / lto=off.
>>
>> What you describe here - artifacts differing by build host arch, causing
>> cross-architecture sstate matches - looks like:
>>
>>    [YOCTO #16376] AB-INT: build system architecture reproducibility issue
>>    https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
>>
>> which is still open. Could you retag it in v4, unless you had a reason to
>> point at 15554 that I'm missing?
>> ---
>> One pointer that may or may not be relevant: the 1.97.1 upgrade (65271a5d3b)
>> carries an LLVM backport:
>>
>>    0043-LoopUnroll-Iterate-exit-fold-candidates-in-determini.patch
>>
>> added for a repro issue seen with rust 1.97.0. I haven't looked at whether it
>> interacts with the SVH path at all - just flagging it in case it's useful context.

Hey Richard,


Sorry for the incorrect tag.

I'll look into these failures as well and send a v4


Alejandro

> I put v3 in for testing on the autobuilder and it looks promising, there are some rust test suite failures though:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577
>
> and probably more to follow. We may need to exclude those tests?
>
> I also triggered the reproducibility test targets:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
>
> those builds are ongoing.
>
> Cheers,
>
> Richard
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#244412): https://lists.openembedded.org/g/openembedded-core/message/244412
> Mute This Topic: https://lists.openembedded.org/mt/120939810/4354175
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alhe@linux.microsoft.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-26 20:08     ` Alejandro Hernandez
@ 2026-08-26 20:47       ` Richard Purdie
       [not found]       ` <18CF75EE37DB8543.642712@lists.openembedded.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2026-08-26 20:47 UTC (permalink / raw)
  To: Alejandro Hernandez, SunilKumar.Dora, openembedded-core

On Wed, 2026-08-26 at 14:08 -0600, Alejandro Hernandez wrote:
> 
> On 8/26/2026 1:17 PM, Richard Purdie via lists.openembedded.org
> wrote:
> > On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via
> > lists.openembedded.org wrote:
> > > Hi Alejandro,
> > > 
> > > Thanks for chasing this one down. Small notes on v3:
> > > 
> > > The commit is tagged [YOCTO #15554], but that bug is
> > > "reproducibility
> > > failures with 'rustdoc' on rust 1.75" (path-length dependent),
> > > RESOLVED FIXED
> > > since 2024-08-01 via codegen-units=1 / lto=off.
> > > 
> > > What you describe here - artifacts differing by build host arch,
> > > causing
> > > cross-architecture sstate matches - looks like:
> > > 
> > >    [YOCTO #16376] AB-INT: build system architecture
> > > reproducibility issue
> > >    https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
> > > 
> > > which is still open. Could you retag it in v4, unless you had a
> > > reason to
> > > point at 15554 that I'm missing?
> > > ---
> > > One pointer that may or may not be relevant: the 1.97.1 upgrade
> > > (65271a5d3b)
> > > carries an LLVM backport:
> > > 
> > >    0043-LoopUnroll-Iterate-exit-fold-candidates-in-
> > > determini.patch
> > > 
> > > added for a repro issue seen with rust 1.97.0. I haven't looked
> > > at whether it
> > > interacts with the SVH path at all - just flagging it in case
> > > it's useful context.
> 
> Hey Richard,
> 
> 
> Sorry for the incorrect tag.

No problem, that is at least easily fixed!

> I'll look into these failures as well and send a v4

Thanks! I appreciate the work on this as it should improve things a
lot.

> > I put v3 in for testing on the autobuilder and it looks promising,
> > there are some rust test suite failures though:
> > 
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577
> > 
> > and probably more to follow. We may need to exclude those tests?
> > 
> > I also triggered the reproducibility test targets:
> > 
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
> > 
> > those builds are ongoing.

One of these completed:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3

which leads to:

https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260826-plagtpam/packages/diff-html/

There looks to be a locale issue, some python config tweaks, curl-
config binconfig needing a tweak and a smaller rust issue left. 

Definitely progress, much fewer recipes showing issues and fewer binary
ones and more text ones left...

Cheers,

Richard





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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
       [not found]       ` <18CF75EE37DB8543.642712@lists.openembedded.org>
@ 2026-08-27  7:53         ` Richard Purdie
  2026-08-28 15:46           ` Alejandro Hernandez
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2026-08-27  7:53 UTC (permalink / raw)
  To: Alejandro Hernandez, SunilKumar.Dora, openembedded-core

On Wed, 2026-08-26 at 21:47 +0100, Richard Purdie via lists.openembedded.org wrote:
> On Wed, 2026-08-26 at 14:08 -0600, Alejandro Hernandez wrote:
> > 
> > On 8/26/2026 1:17 PM, Richard Purdie via lists.openembedded.org
> > wrote:
> > > On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via
> > > lists.openembedded.org wrote:
> > > > Hi Alejandro,
> > > > 
> > > > Thanks for chasing this one down. Small notes on v3:
> > > > 
> > > > The commit is tagged [YOCTO #15554], but that bug is
> > > > "reproducibility
> > > > failures with 'rustdoc' on rust 1.75" (path-length dependent),
> > > > RESOLVED FIXED
> > > > since 2024-08-01 via codegen-units=1 / lto=off.
> > > > 
> > > > What you describe here - artifacts differing by build host arch,
> > > > causing
> > > > cross-architecture sstate matches - looks like:
> > > > 
> > > >    [YOCTO #16376] AB-INT: build system architecture
> > > > reproducibility issue
> > > >    https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
> > > > 
> > > > which is still open. Could you retag it in v4, unless you had a
> > > > reason to
> > > > point at 15554 that I'm missing?
> > > > ---
> > > > One pointer that may or may not be relevant: the 1.97.1 upgrade
> > > > (65271a5d3b)
> > > > carries an LLVM backport:
> > > > 
> > > >    0043-LoopUnroll-Iterate-exit-fold-candidates-in-
> > > > determini.patch
> > > > 
> > > > added for a repro issue seen with rust 1.97.0. I haven't looked
> > > > at whether it
> > > > interacts with the SVH path at all - just flagging it in case
> > > > it's useful context.
> > 
> > Hey Richard,
> > 
> > 
> > Sorry for the incorrect tag.
> 
> No problem, that is at least easily fixed!
> 
> > I'll look into these failures as well and send a v4
> 
> Thanks! I appreciate the work on this as it should improve things a
> lot.
> 
> > > I put v3 in for testing on the autobuilder and it looks promising,
> > > there are some rust test suite failures though:
> > > 
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577
> > > 
> > > and probably more to follow. We may need to exclude those tests?
> > > 
> > > I also triggered the reproducibility test targets:
> > > 
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
> > > 
> > > those builds are ongoing.
> 
> One of these completed:
> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
> 
> which leads to:
> 
> https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260826-plagtpam/packages/diff-html/
> 
> There looks to be a locale issue, some python config tweaks, curl-
> config binconfig needing a tweak and a smaller rust issue left. 
> 
> Definitely progress, much fewer recipes showing issues and fewer binary
> ones and more text ones left...

Sadly the other two test runs looked less promising:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3

both of which have a lot of rust related looking differences :/

Cheers,

Richard





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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-27  7:53         ` Richard Purdie
@ 2026-08-28 15:46           ` Alejandro Hernandez
  2026-08-28 17:56             ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Alejandro Hernandez @ 2026-08-28 15:46 UTC (permalink / raw)
  To: Richard Purdie, SunilKumar.Dora, openembedded-core


On 8/27/2026 1:53 AM, Richard Purdie wrote:
> On Wed, 2026-08-26 at 21:47 +0100, Richard Purdie via lists.openembedded.org wrote:
>> On Wed, 2026-08-26 at 14:08 -0600, Alejandro Hernandez wrote:
>>> On 8/26/2026 1:17 PM, Richard Purdie via lists.openembedded.org
>>> wrote:
>>>> On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via
>>>> lists.openembedded.org wrote:
>>>>> Hi Alejandro,
>>>>>
>>>>> Thanks for chasing this one down. Small notes on v3:
>>>>>
>>>>> The commit is tagged [YOCTO #15554], but that bug is
>>>>> "reproducibility
>>>>> failures with 'rustdoc' on rust 1.75" (path-length dependent),
>>>>> RESOLVED FIXED
>>>>> since 2024-08-01 via codegen-units=1 / lto=off.
>>>>>
>>>>> What you describe here - artifacts differing by build host arch,
>>>>> causing
>>>>> cross-architecture sstate matches - looks like:
>>>>>
>>>>>     [YOCTO #16376] AB-INT: build system architecture
>>>>> reproducibility issue
>>>>>     https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
>>>>>
>>>>> which is still open. Could you retag it in v4, unless you had a
>>>>> reason to
>>>>> point at 15554 that I'm missing?
>>>>> ---
>>>>> One pointer that may or may not be relevant: the 1.97.1 upgrade
>>>>> (65271a5d3b)
>>>>> carries an LLVM backport:
>>>>>
>>>>>     0043-LoopUnroll-Iterate-exit-fold-candidates-in-
>>>>> determini.patch
>>>>>
>>>>> added for a repro issue seen with rust 1.97.0. I haven't looked
>>>>> at whether it
>>>>> interacts with the SVH path at all - just flagging it in case
>>>>> it's useful context.
>>> Hey Richard,
>>>
>>>
>>> Sorry for the incorrect tag.
>> No problem, that is at least easily fixed!
>>
>>> I'll look into these failures as well and send a v4
>> Thanks! I appreciate the work on this as it should improve things a
>> lot.
>>
>>>> I put v3 in for testing on the autobuilder and it looks promising,
>>>> there are some rust test suite failures though:
>>>>
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577
>>>>
>>>> and probably more to follow. We may need to exclude those tests?
>>>>
>>>> I also triggered the reproducibility test targets:
>>>>
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
>>>>
>>>> those builds are ongoing.
>> One of these completed:
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
>>
>> which leads to:
>>
>> https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260826-plagtpam/packages/diff-html/
>>
>> There looks to be a locale issue, some python config tweaks, curl-
>> config binconfig needing a tweak and a smaller rust issue left.
>>
>> Definitely progress, much fewer recipes showing issues and fewer binary
>> ones and more text ones left...
> Sadly the other two test runs looked less promising:
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
>
> both of which have a lot of rust related looking differences :/
>
> Cheers,
>
> Richard

Hey Richard,


Apologies, I got a bit confused, is the ask to send a v4 with the 
correct tag and then look at other reproducibility issues?.

or are these reproducibility issues related to the patch and need to be 
addressed before sending a v4?


Alejandro


>
>


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

* Re: [OE-core] [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-28 15:46           ` Alejandro Hernandez
@ 2026-08-28 17:56             ` Richard Purdie
  2026-09-03 18:40               ` Dora, Sunil Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2026-08-28 17:56 UTC (permalink / raw)
  To: Alejandro Hernandez, SunilKumar.Dora, openembedded-core

On Fri, 2026-08-28 at 09:46 -0600, Alejandro Hernandez wrote:
> 
> On 8/27/2026 1:53 AM, Richard Purdie wrote:
> > On Wed, 2026-08-26 at 21:47 +0100, Richard Purdie via
> > lists.openembedded.org wrote:
> > > On Wed, 2026-08-26 at 14:08 -0600, Alejandro Hernandez wrote:
> > > > On 8/26/2026 1:17 PM, Richard Purdie via lists.openembedded.org
> > > > wrote:
> > > > > On Wed, 2026-08-26 at 11:25 -0700, Dora, Sunil Kumar via
> > > > > lists.openembedded.org wrote:
> > > > > > Hi Alejandro,
> > > > > > 
> > > > > > Thanks for chasing this one down. Small notes on v3:
> > > > > > 
> > > > > > The commit is tagged [YOCTO #15554], but that bug is
> > > > > > "reproducibility
> > > > > > failures with 'rustdoc' on rust 1.75" (path-length
> > > > > > dependent),
> > > > > > RESOLVED FIXED
> > > > > > since 2024-08-01 via codegen-units=1 / lto=off.
> > > > > > 
> > > > > > What you describe here - artifacts differing by build host
> > > > > > arch,
> > > > > > causing
> > > > > > cross-architecture sstate matches - looks like:
> > > > > > 
> > > > > >     [YOCTO #16376] AB-INT: build system architecture
> > > > > > reproducibility issue
> > > > > >     https://bugzilla.yoctoproject.org/show_bug.cgi?id=16376
> > > > > > 
> > > > > > which is still open. Could you retag it in v4, unless you
> > > > > > had a
> > > > > > reason to
> > > > > > point at 15554 that I'm missing?
> > > > > > ---
> > > > > > One pointer that may or may not be relevant: the 1.97.1
> > > > > > upgrade
> > > > > > (65271a5d3b)
> > > > > > carries an LLVM backport:
> > > > > > 
> > > > > >     0043-LoopUnroll-Iterate-exit-fold-candidates-in-
> > > > > > determini.patch
> > > > > > 
> > > > > > added for a repro issue seen with rust 1.97.0. I haven't
> > > > > > looked
> > > > > > at whether it
> > > > > > interacts with the SVH path at all - just flagging it in
> > > > > > case
> > > > > > it's useful context.
> > > > Hey Richard,
> > > > 
> > > > 
> > > > Sorry for the incorrect tag.
> > > No problem, that is at least easily fixed!
> > > 
> > > > I'll look into these failures as well and send a v4
> > > Thanks! I appreciate the work on this as it should improve things
> > > a
> > > lot.
> > > 
> > > > > I put v3 in for testing on the autobuilder and it looks
> > > > > promising,
> > > > > there are some rust test suite failures though:
> > > > > 
> > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/28/builds/4472
> > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/4577
> > > > > 
> > > > > and probably more to follow. We may need to exclude those
> > > > > tests?
> > > > > 
> > > > > I also triggered the reproducibility test targets:
> > > > > 
> > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
> > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> > > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
> > > > > 
> > > > > those builds are ongoing.
> > > One of these completed:
> > > 
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/120/builds/3
> > > 
> > > which leads to:
> > > 
> > > https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260826-plagtpam/packages/diff-html/
> > > 
> > > There looks to be a locale issue, some python config tweaks,
> > > curl-
> > > config binconfig needing a tweak and a smaller rust issue left.
> > > 
> > > Definitely progress, much fewer recipes showing issues and fewer
> > > binary
> > > ones and more text ones left...
> > Sadly the other two test runs looked less promising:
> > 
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/119/builds/3
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/121/builds/3
> > 
> > both of which have a lot of rust related looking differences :/
> 
> Apologies, I got a bit confused, is the ask to send a v4 with the 
> correct tag and then look at other reproducibility issues?.
> 
> or are these reproducibility issues related to the patch and need to
> be addressed before sending a v4?

I'm probably a bit confused too. There are still reproducibility issues
in there that look rust related and I can't really tell if those are
additional issues or whether the original fix isn't working. I suspect
I need your help to work that out...

Cheers,

Richard



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

* Re: [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash
  2026-08-28 17:56             ` Richard Purdie
@ 2026-09-03 18:40               ` Dora, Sunil Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Dora, Sunil Kumar @ 2026-09-03 18:40 UTC (permalink / raw)
  To: openembedded-core

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

I'm still working through the remaining Rust packages and will follow up on that separately.

While going through the reproducible-cross diffoscope output, though, I noticed something unrelated to Rust
that I think may explain the git/git-dbg entries, so sharing it here in case it's useful or helps narrow things down.

In the 2026-07-29 report from builder 120 [1], git's .rodata has:

-0x001b1780 6769742d 00000000 61617263 68363400  git-....aarch64.
+0x001b1780 6769742d 00000000 7838365f 36340000  git-....x86_64..

i.e. the build host's arch string, sitting right next to git's "cpu: %s" format string.

git's Makefile does:

ifeq (,$(HOST_CPU))
BASIC_CFLAGS += -DGIT_HOST_CPU="\"$(firstword $(subst -, ,$(uname_M)))\""
else
BASIC_CFLAGS += -DGIT_HOST_CPU="\"$(HOST_CPU)\""
endif

uname_M comes from `uname -m` on the build machine, and GIT_HOST_CPU
ends up in the "cpu:" line of `git version --build-options`.

Upstream even documents HOST_CPU as the thing to set when cross compiling,
but our recipe never sets it, so we always take the uname fallback.

Since "aarch64" and "x86_64" have different lengths, everything after that string shifts,
which is why the git diffs look much bigger than they really are (.text, .symtab and so on) -
the instructions themselves don't change. git/git-dbg show up in every run I've looked
at (119/120/121, before and after the SVH fix, on both x86 and arm hosts),
so it fits a build host leak rather than anything rust related.

The fix should just be:

EXTRA_OEMAKE += "HOST_CPU=${TARGET_ARCH}"

in git_2.55.0.bb. As far as I can tell TARGET_ARCH does the right
thing for native (= BUILD_ARCH) and nativesdk (= SDK_ARCH) as well, so
no class overrides needed.

I'm cross checking with a locally to make sure the resulting binary really says "aarch64", and will send the patch once
that's confirmed.

[1] https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260729-j6j_xpuw/packages/diff-html/

Thanks,
Sunil

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

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

end of thread, other threads:[~2026-09-03 18:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 15:54 [PATCH v3] rust: Avoid passing host-specific information to crates Strict Version Hash Alejandro Hernandez
2026-08-26 18:25 ` Dora, Sunil Kumar
2026-08-26 19:17   ` [OE-core] " Richard Purdie
2026-08-26 20:08     ` Alejandro Hernandez
2026-08-26 20:47       ` Richard Purdie
     [not found]       ` <18CF75EE37DB8543.642712@lists.openembedded.org>
2026-08-27  7:53         ` Richard Purdie
2026-08-28 15:46           ` Alejandro Hernandez
2026-08-28 17:56             ` Richard Purdie
2026-09-03 18:40               ` Dora, Sunil Kumar

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