diff mbox series

[meta-lts-mixins,kirkstone/rust,1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS

Message ID 20250318032001.2031160-1-soumya.sambu@windriver.com
State New
Headers show
Series [meta-lts-mixins,kirkstone/rust,1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS | expand

Commit Message

ssambu March 18, 2025, 3:20 a.m. UTC
From: Soumya Sambu <soumya.sambu@windriver.com>

The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
--target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:

error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".

Updated target configuration to resolve this.

Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
defining the linker for Rust.

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
---
 recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
 recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
 recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
 create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend

Comments

Gyorgy Sarvari March 20, 2025, 7:23 p.m. UTC | #1
I think these files should be in dynamic-layers folder, as rust-mixin
depends only on oe-core. Otherwise it will complain about dangling
bbappends if meta-oe and/or meta-python layers are not present.

Maybe meta-oe would be an even better place for these  bbappends, also
in dynamic-layers folders, depending on this mixin layer. (Though that
part is just an idea)

On 3/18/25 04:20, Soumya via lists.yoctoproject.org wrote:
> From: Soumya Sambu <soumya.sambu@windriver.com>
> 
> The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> 
> error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> 
> Updated target configuration to resolve this.
> 
> Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> defining the linker for Rust.
> 
> Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
> ---
>  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
>  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
>  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
>  3 files changed, 30 insertions(+)
>  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
>  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> 
> diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> index cc00053..2d91d68 100644
> --- a/recipes-devtools/rust/rust_1.81.0.bb
> +++ b/recipes-devtools/rust/rust_1.81.0.bb
> @@ -146,6 +146,9 @@ python do_configure() {
>      # harness are debuggable just from logfiles
>      config.set("rust", "verbose-tests", e(True))
>  
> +    # Override default linker cc.
> +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> +
>      # [build]
>      config.add_section("build")
>      config.set("build", "submodules", e(False))
> diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> new file mode 100644
> index 0000000..8e8c24a
> --- /dev/null
> +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> @@ -0,0 +1,14 @@
> +EXTRA_OECONF = " \
> +    --target=${RUST_TARGET_SYS} \
> +    --host=${BUILD_SYS} \
> +    --prefix=${prefix} \
> +    --libdir=${libdir} \
> +    --x-includes=${STAGING_INCDIR} \
> +    --x-libraries=${STAGING_LIBDIR} \
> +    --without-system-icu \
> +    --disable-tests --disable-strip --disable-optimize \
> +    --disable-jemalloc \
> +    --with-system-icu \
> +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> +    ${JIT} \
> +"
> diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> new file mode 100644
> index 0000000..c0214b0
> --- /dev/null
> +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> @@ -0,0 +1,13 @@
> +do_configure() {
> +        cd ${B}
> +        python3 ${S}/configure.py \
> +        --enable-project=js \
> +        --target=${RUST_HOST_SYS} \
> +        --host=${BUILD_SYS} \
> +        --prefix=${prefix} \
> +        --libdir=${libdir} \
> +        --disable-jemalloc \
> +        --disable-strip \
> +        ${JIT} \
> +        ${ICU}
> +}
Scott Murray March 25, 2025, 12:04 a.m. UTC | #2
On Tue, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:

> From: Soumya Sambu <soumya.sambu@windriver.com>
>
> The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
>
> error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
>
> Updated target configuration to resolve this.
>
> Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> defining the linker for Rust.
>
> Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>

I'm not planning to take this, since carrying bbappends for recipes
outside of oe-core is outside of what I had planned to support with
the mixin.  If I take it, I will be signing up to test building those
recipes on every Rust update for at least the next year, and it would
somewhat open the door for people advocating doing the same for
scarthgap/rust, which has 3 more years to go.

Scott


> ---
>  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
>  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
>  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
>  3 files changed, 30 insertions(+)
>  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
>  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
>
> diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> index cc00053..2d91d68 100644
> --- a/recipes-devtools/rust/rust_1.81.0.bb
> +++ b/recipes-devtools/rust/rust_1.81.0.bb
> @@ -146,6 +146,9 @@ python do_configure() {
>      # harness are debuggable just from logfiles
>      config.set("rust", "verbose-tests", e(True))
>
> +    # Override default linker cc.
> +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> +
>      # [build]
>      config.add_section("build")
>      config.set("build", "submodules", e(False))
> diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> new file mode 100644
> index 0000000..8e8c24a
> --- /dev/null
> +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> @@ -0,0 +1,14 @@
> +EXTRA_OECONF = " \
> +    --target=${RUST_TARGET_SYS} \
> +    --host=${BUILD_SYS} \
> +    --prefix=${prefix} \
> +    --libdir=${libdir} \
> +    --x-includes=${STAGING_INCDIR} \
> +    --x-libraries=${STAGING_LIBDIR} \
> +    --without-system-icu \
> +    --disable-tests --disable-strip --disable-optimize \
> +    --disable-jemalloc \
> +    --with-system-icu \
> +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> +    ${JIT} \
> +"
> diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> new file mode 100644
> index 0000000..c0214b0
> --- /dev/null
> +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> @@ -0,0 +1,13 @@
> +do_configure() {
> +        cd ${B}
> +        python3 ${S}/configure.py \
> +        --enable-project=js \
> +        --target=${RUST_HOST_SYS} \
> +        --host=${BUILD_SYS} \
> +        --prefix=${prefix} \
> +        --libdir=${libdir} \
> +        --disable-jemalloc \
> +        --disable-strip \
> +        ${JIT} \
> +        ${ICU}
> +}
>
ssambu March 26, 2025, 3:15 p.m. UTC | #3
That makes sense.
Should we create a mixins layer for meta-openembedded?
So far, we only have mozjs, that needs a bbappend.
@<mailto:raj.khem@gmail.com>Khem Raj, @Armin Kuster<mailto:akuster@mvista.com> - Does that make sense to you?
Regards,
Soumya
ssambu April 7, 2025, 1:12 p.m. UTC | #4
Just following up — @Khem Raj<mailto:raj.khem@gmail.com>, @Armin Kuster<mailto:akuster@mvista.com>. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.

Regards,
Soumya
Khem Raj April 7, 2025, 2:52 p.m. UTC | #5
On Mon, Apr 7, 2025 at 6:12 AM Sambu, Soumya <Soumya.Sambu@windriver.com> wrote:
>
> Just following up — @Khem Raj, @Armin Kuster. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.
>

I think adding bbappends via dynamic layers inside meta-lts-mixins
layer for this rust branch would be
something to consider, that will keep it simple for end users of this layer.

> Regards,
> Soumya
> ________________________________
> From: Sambu, Soumya <Soumya.Sambu@windriver.com>
> Sent: Wednesday, March 26, 2025 8:45 PM
> To: Scott Murray <scott.murray@konsulko.com>; yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> Cc: MacLeod, Randy <Randy.MacLeod@windriver.com>; akuster@mvista.com <akuster@mvista.com>; raj.khem@gmail.com <raj.khem@gmail.com>
> Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
>
> That makes sense.
> Should we create a mixins layer for meta-openembedded?
> So far, we only have mozjs, that needs a bbappend.
> @Khem Raj, @Armin Kuster - Does that make sense to you?
> Regards,
> Soumya
>
> ________________________________
> From: Scott Murray <scott.murray@konsulko.com>
> Sent: Tuesday, March 25, 2025 5:34 AM
> To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>
> Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
>
> 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, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:
>
> > From: Soumya Sambu <soumya.sambu@windriver.com>
> >
> > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> >
> > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> >
> > Updated target configuration to resolve this.
> >
> > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> > defining the linker for Rust.
> >
> > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
>
> I'm not planning to take this, since carrying bbappends for recipes
> outside of oe-core is outside of what I had planned to support with
> the mixin.  If I take it, I will be signing up to test building those
> recipes on every Rust update for at least the next year, and it would
> somewhat open the door for people advocating doing the same for
> scarthgap/rust, which has 3 more years to go.
>
> Scott
>
>
> > ---
> >  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
> >  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
> >  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
> >  3 files changed, 30 insertions(+)
> >  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
> >  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> >
> > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> > index cc00053..2d91d68 100644
> > --- a/recipes-devtools/rust/rust_1.81.0.bb
> > +++ b/recipes-devtools/rust/rust_1.81.0.bb
> > @@ -146,6 +146,9 @@ python do_configure() {
> >      # harness are debuggable just from logfiles
> >      config.set("rust", "verbose-tests", e(True))
> >
> > +    # Override default linker cc.
> > +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> > +
> >      # [build]
> >      config.add_section("build")
> >      config.set("build", "submodules", e(False))
> > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > new file mode 100644
> > index 0000000..8e8c24a
> > --- /dev/null
> > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > @@ -0,0 +1,14 @@
> > +EXTRA_OECONF = " \
> > +    --target=${RUST_TARGET_SYS} \
> > +    --host=${BUILD_SYS} \
> > +    --prefix=${prefix} \
> > +    --libdir=${libdir} \
> > +    --x-includes=${STAGING_INCDIR} \
> > +    --x-libraries=${STAGING_LIBDIR} \
> > +    --without-system-icu \
> > +    --disable-tests --disable-strip --disable-optimize \
> > +    --disable-jemalloc \
> > +    --with-system-icu \
> > +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> > +    ${JIT} \
> > +"
> > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > new file mode 100644
> > index 0000000..c0214b0
> > --- /dev/null
> > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > @@ -0,0 +1,13 @@
> > +do_configure() {
> > +        cd ${B}
> > +        python3 ${S}/configure.py \
> > +        --enable-project=js \
> > +        --target=${RUST_HOST_SYS} \
> > +        --host=${BUILD_SYS} \
> > +        --prefix=${prefix} \
> > +        --libdir=${libdir} \
> > +        --disable-jemalloc \
> > +        --disable-strip \
> > +        ${JIT} \
> > +        ${ICU}
> > +}
> >
Scott Murray April 7, 2025, 3:29 p.m. UTC | #6
On Mon, 7 Apr 2025, Khem Raj wrote:

> On Mon, Apr 7, 2025 at 6:12 AM Sambu, Soumya <Soumya.Sambu@windriver.com> wrote:
> >
> > Just following up — @Khem Raj, @Armin Kuster. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.
> >
>
> I think adding bbappends via dynamic layers inside meta-lts-mixins
> layer for this rust branch would be
> something to consider, that will keep it simple for end users of this layer.

As I stated in a previous response, my issue with that approach is
people's expectations of my testing whatever random packages in various
layers they want me to carry patches for.  Debugging build failures of
the in oe-core like librsvg and python3-cryptography has proven a bit
of timesink as it is, there's no way I have time to build test and
potentially fix issues with multiple flavors of mozjs, chromium, etc. on
each Rust upgrade backport.  If Wind River absolutely needs this for
their customers, I'll gladly hand over maintenance of the Rust mixin
layers to them and they can do it...

Scott


> > Regards,
> > Soumya
> > ________________________________
> > From: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > Sent: Wednesday, March 26, 2025 8:45 PM
> > To: Scott Murray <scott.murray@konsulko.com>; yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > Cc: MacLeod, Randy <Randy.MacLeod@windriver.com>; akuster@mvista.com <akuster@mvista.com>; raj.khem@gmail.com <raj.khem@gmail.com>
> > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> >
> > That makes sense.
> > Should we create a mixins layer for meta-openembedded?
> > So far, we only have mozjs, that needs a bbappend.
> > @Khem Raj, @Armin Kuster - Does that make sense to you?
> > Regards,
> > Soumya
> >
> > ________________________________
> > From: Scott Murray <scott.murray@konsulko.com>
> > Sent: Tuesday, March 25, 2025 5:34 AM
> > To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> >
> > 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, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:
> >
> > > From: Soumya Sambu <soumya.sambu@windriver.com>
> > >
> > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> > > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> > >
> > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> > >
> > > Updated target configuration to resolve this.
> > >
> > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> > > defining the linker for Rust.
> > >
> > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
> >
> > I'm not planning to take this, since carrying bbappends for recipes
> > outside of oe-core is outside of what I had planned to support with
> > the mixin.  If I take it, I will be signing up to test building those
> > recipes on every Rust update for at least the next year, and it would
> > somewhat open the door for people advocating doing the same for
> > scarthgap/rust, which has 3 more years to go.
> >
> > Scott
> >
> >
> > > ---
> > >  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
> > >  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
> > >  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
> > >  3 files changed, 30 insertions(+)
> > >  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
> > >  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> > >
> > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> > > index cc00053..2d91d68 100644
> > > --- a/recipes-devtools/rust/rust_1.81.0.bb
> > > +++ b/recipes-devtools/rust/rust_1.81.0.bb
> > > @@ -146,6 +146,9 @@ python do_configure() {
> > >      # harness are debuggable just from logfiles
> > >      config.set("rust", "verbose-tests", e(True))
> > >
> > > +    # Override default linker cc.
> > > +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> > > +
> > >      # [build]
> > >      config.add_section("build")
> > >      config.set("build", "submodules", e(False))
> > > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > new file mode 100644
> > > index 0000000..8e8c24a
> > > --- /dev/null
> > > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > @@ -0,0 +1,14 @@
> > > +EXTRA_OECONF = " \
> > > +    --target=${RUST_TARGET_SYS} \
> > > +    --host=${BUILD_SYS} \
> > > +    --prefix=${prefix} \
> > > +    --libdir=${libdir} \
> > > +    --x-includes=${STAGING_INCDIR} \
> > > +    --x-libraries=${STAGING_LIBDIR} \
> > > +    --without-system-icu \
> > > +    --disable-tests --disable-strip --disable-optimize \
> > > +    --disable-jemalloc \
> > > +    --with-system-icu \
> > > +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> > > +    ${JIT} \
> > > +"
> > > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > new file mode 100644
> > > index 0000000..c0214b0
> > > --- /dev/null
> > > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > @@ -0,0 +1,13 @@
> > > +do_configure() {
> > > +        cd ${B}
> > > +        python3 ${S}/configure.py \
> > > +        --enable-project=js \
> > > +        --target=${RUST_HOST_SYS} \
> > > +        --host=${BUILD_SYS} \
> > > +        --prefix=${prefix} \
> > > +        --libdir=${libdir} \
> > > +        --disable-jemalloc \
> > > +        --disable-strip \
> > > +        ${JIT} \
> > > +        ${ICU}
> > > +}
> > >
>
Scott Murray April 8, 2025, 8:51 p.m. UTC | #7
On Mon, 7 Apr 2025, Scott Murray via lists.yoctoproject.org wrote:

> On Mon, 7 Apr 2025, Khem Raj wrote:
>
> > On Mon, Apr 7, 2025 at 6:12 AM Sambu, Soumya <Soumya.Sambu@windriver.com> wrote:
> > >
> > > Just following up — @Khem Raj, @Armin Kuster. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.
> > >
> >
> > I think adding bbappends via dynamic layers inside meta-lts-mixins
> > layer for this rust branch would be
> > something to consider, that will keep it simple for end users of this layer.
>
> As I stated in a previous response, my issue with that approach is
> people's expectations of my testing whatever random packages in various
> layers they want me to carry patches for.  Debugging build failures of
> the in oe-core like librsvg and python3-cryptography has proven a bit
> of timesink as it is, there's no way I have time to build test and
> potentially fix issues with multiple flavors of mozjs, chromium, etc. on
> each Rust upgrade backport.  If Wind River absolutely needs this for
> their customers, I'll gladly hand over maintenance of the Rust mixin
> layers to them and they can do it...

After thinking this over last night, and some discussion on the YP
call this morning, I'll walk the above back somewhat.  I'd be willing to
consider setting up minimal dynamic layers in the Rust LTS mixins for
recipe tweaks with something along the following documented guidelines:

- Submissions would require the submitter committing to documentation of
  themselves as maintainer of the associated bbappends/recipes in either
  the top-level README or perhaps a new MAINTAINERS file.
- I will not commit to any testing of recipes supported by the dynamic
  layers bbappends, i.e. those maintainers need to be prepared to do their
  own testing on Rust upgrades, and having any complaints about breakage
  directed their way.  This will be documented in the layer README.
- dynamic layers will only be considered for layers from meta-openembedded.
- This may be more contentious, but I do not want to take non-backport
  changes to the Rust components in the mixin layers themselves if they
  can be carried in a bbappend in the dynamic layer.  As an example, the
  rust recipe tweak below is something I would prefer to see handled that
  way (i.e. with a rust bbappend in the meta-oe dynamic layer).  My
  reasoning is that such changes are likely to increase my backport
  effort over time.
- Straight backports of newer version recipes will generally be
  considered out of scope.  There is some potential for negotiation if a
  package on a LTS branch becomes impossible to compile with a newer Rust
  version, and patching proves extremely difficult compared to a bump to
  a newer version.  Note that such version bumps that require backports of
  other components from oe-core will default to being rejected since
  even in a dynamic layer the potential for side effects on downstream
  users can be very difficult to gauge.  An example of this from oe-core
  would be newer versions of python3-cryptography, which require maturin
  support (and a bunch of associated Python changes) unavailable in
  kirkstone.

If this seems workable for folks, I can push some documentation updates in
the next day or two, and will consider refreshed patches after that.  As I
mentioned on the YP call this morning, I do have some more work to get
python3-cryptography building with Rust 1.85 working for kirkstone/rust,
so that may impact things a bit.

Regards,

Scott

> > > Regards,
> > > Soumya
> > > ________________________________
> > > From: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > Sent: Wednesday, March 26, 2025 8:45 PM
> > > To: Scott Murray <scott.murray@konsulko.com>; yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > Cc: MacLeod, Randy <Randy.MacLeod@windriver.com>; akuster@mvista.com <akuster@mvista.com>; raj.khem@gmail.com <raj.khem@gmail.com>
> > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > >
> > > That makes sense.
> > > Should we create a mixins layer for meta-openembedded?
> > > So far, we only have mozjs, that needs a bbappend.
> > > @Khem Raj, @Armin Kuster - Does that make sense to you?
> > > Regards,
> > > Soumya
> > >
> > > ________________________________
> > > From: Scott Murray <scott.murray@konsulko.com>
> > > Sent: Tuesday, March 25, 2025 5:34 AM
> > > To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > >
> > > 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, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:
> > >
> > > > From: Soumya Sambu <soumya.sambu@windriver.com>
> > > >
> > > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> > > > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> > > >
> > > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> > > >
> > > > Updated target configuration to resolve this.
> > > >
> > > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> > > > defining the linker for Rust.
> > > >
> > > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
> > >
> > > I'm not planning to take this, since carrying bbappends for recipes
> > > outside of oe-core is outside of what I had planned to support with
> > > the mixin.  If I take it, I will be signing up to test building those
> > > recipes on every Rust update for at least the next year, and it would
> > > somewhat open the door for people advocating doing the same for
> > > scarthgap/rust, which has 3 more years to go.
> > >
> > > Scott
> > >
> > >
> > > > ---
> > > >  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
> > > >  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
> > > >  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
> > > >  3 files changed, 30 insertions(+)
> > > >  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
> > > >  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> > > >
> > > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> > > > index cc00053..2d91d68 100644
> > > > --- a/recipes-devtools/rust/rust_1.81.0.bb
> > > > +++ b/recipes-devtools/rust/rust_1.81.0.bb
> > > > @@ -146,6 +146,9 @@ python do_configure() {
> > > >      # harness are debuggable just from logfiles
> > > >      config.set("rust", "verbose-tests", e(True))
> > > >
> > > > +    # Override default linker cc.
> > > > +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> > > > +
> > > >      # [build]
> > > >      config.add_section("build")
> > > >      config.set("build", "submodules", e(False))
> > > > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > new file mode 100644
> > > > index 0000000..8e8c24a
> > > > --- /dev/null
> > > > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > @@ -0,0 +1,14 @@
> > > > +EXTRA_OECONF = " \
> > > > +    --target=${RUST_TARGET_SYS} \
> > > > +    --host=${BUILD_SYS} \
> > > > +    --prefix=${prefix} \
> > > > +    --libdir=${libdir} \
> > > > +    --x-includes=${STAGING_INCDIR} \
> > > > +    --x-libraries=${STAGING_LIBDIR} \
> > > > +    --without-system-icu \
> > > > +    --disable-tests --disable-strip --disable-optimize \
> > > > +    --disable-jemalloc \
> > > > +    --with-system-icu \
> > > > +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> > > > +    ${JIT} \
> > > > +"
> > > > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > new file mode 100644
> > > > index 0000000..c0214b0
> > > > --- /dev/null
> > > > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > @@ -0,0 +1,13 @@
> > > > +do_configure() {
> > > > +        cd ${B}
> > > > +        python3 ${S}/configure.py \
> > > > +        --enable-project=js \
> > > > +        --target=${RUST_HOST_SYS} \
> > > > +        --host=${BUILD_SYS} \
> > > > +        --prefix=${prefix} \
> > > > +        --libdir=${libdir} \
> > > > +        --disable-jemalloc \
> > > > +        --disable-strip \
> > > > +        ${JIT} \
> > > > +        ${ICU}
> > > > +}
> > > >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#1293): https://lists.yoctoproject.org/g/yocto-patches/message/1293
> Mute This Topic: https://lists.yoctoproject.org/mt/111764095/2167468
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13170805/2167468/856840347/xyzzy [scott.murray@konsulko.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
ssambu April 29, 2025, 3:54 a.m. UTC | #8
Hi Scott,

Just following up - do you have any updates on the documentation you mentioned earlier?

Regards,
Soumya
________________________________
From: Scott Murray <scott.murray@konsulko.com>
Sent: Wednesday, April 9, 2025 2:21 AM
To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>; Khem Raj <raj.khem@gmail.com>; akuster@mvista.com <akuster@mvista.com>; MacLeod, Randy <Randy.MacLeod@windriver.com>; Yang, Liezhi <Liezhi.Yang@windriver.com>
Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS

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 Mon, 7 Apr 2025, Scott Murray via lists.yoctoproject.org wrote:

> On Mon, 7 Apr 2025, Khem Raj wrote:
>
> > On Mon, Apr 7, 2025 at 6:12 AM Sambu, Soumya <Soumya.Sambu@windriver.com> wrote:
> > >
> > > Just following up — @Khem Raj, @Armin Kuster. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.
> > >
> >
> > I think adding bbappends via dynamic layers inside meta-lts-mixins
> > layer for this rust branch would be
> > something to consider, that will keep it simple for end users of this layer.
>
> As I stated in a previous response, my issue with that approach is
> people's expectations of my testing whatever random packages in various
> layers they want me to carry patches for.  Debugging build failures of
> the in oe-core like librsvg and python3-cryptography has proven a bit
> of timesink as it is, there's no way I have time to build test and
> potentially fix issues with multiple flavors of mozjs, chromium, etc. on
> each Rust upgrade backport.  If Wind River absolutely needs this for
> their customers, I'll gladly hand over maintenance of the Rust mixin
> layers to them and they can do it...

After thinking this over last night, and some discussion on the YP
call this morning, I'll walk the above back somewhat.  I'd be willing to
consider setting up minimal dynamic layers in the Rust LTS mixins for
recipe tweaks with something along the following documented guidelines:

- Submissions would require the submitter committing to documentation of
  themselves as maintainer of the associated bbappends/recipes in either
  the top-level README or perhaps a new MAINTAINERS file.
- I will not commit to any testing of recipes supported by the dynamic
  layers bbappends, i.e. those maintainers need to be prepared to do their
  own testing on Rust upgrades, and having any complaints about breakage
  directed their way.  This will be documented in the layer README.
- dynamic layers will only be considered for layers from meta-openembedded.
- This may be more contentious, but I do not want to take non-backport
  changes to the Rust components in the mixin layers themselves if they
  can be carried in a bbappend in the dynamic layer.  As an example, the
  rust recipe tweak below is something I would prefer to see handled that
  way (i.e. with a rust bbappend in the meta-oe dynamic layer).  My
  reasoning is that such changes are likely to increase my backport
  effort over time.
- Straight backports of newer version recipes will generally be
  considered out of scope.  There is some potential for negotiation if a
  package on a LTS branch becomes impossible to compile with a newer Rust
  version, and patching proves extremely difficult compared to a bump to
  a newer version.  Note that such version bumps that require backports of
  other components from oe-core will default to being rejected since
  even in a dynamic layer the potential for side effects on downstream
  users can be very difficult to gauge.  An example of this from oe-core
  would be newer versions of python3-cryptography, which require maturin
  support (and a bunch of associated Python changes) unavailable in
  kirkstone.

If this seems workable for folks, I can push some documentation updates in
the next day or two, and will consider refreshed patches after that.  As I
mentioned on the YP call this morning, I do have some more work to get
python3-cryptography building with Rust 1.85 working for kirkstone/rust,
so that may impact things a bit.

Regards,

Scott

> > > Regards,
> > > Soumya
> > > ________________________________
> > > From: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > Sent: Wednesday, March 26, 2025 8:45 PM
> > > To: Scott Murray <scott.murray@konsulko.com>; yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > Cc: MacLeod, Randy <Randy.MacLeod@windriver.com>; akuster@mvista.com <akuster@mvista.com>; raj.khem@gmail.com <raj.khem@gmail.com>
> > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > >
> > > That makes sense.
> > > Should we create a mixins layer for meta-openembedded?
> > > So far, we only have mozjs, that needs a bbappend.
> > > @Khem Raj, @Armin Kuster - Does that make sense to you?
> > > Regards,
> > > Soumya
> > >
> > > ________________________________
> > > From: Scott Murray <scott.murray@konsulko.com>
> > > Sent: Tuesday, March 25, 2025 5:34 AM
> > > To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > >
> > > 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, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:
> > >
> > > > From: Soumya Sambu <soumya.sambu@windriver.com>
> > > >
> > > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> > > > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> > > >
> > > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> > > >
> > > > Updated target configuration to resolve this.
> > > >
> > > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> > > > defining the linker for Rust.
> > > >
> > > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
> > >
> > > I'm not planning to take this, since carrying bbappends for recipes
> > > outside of oe-core is outside of what I had planned to support with
> > > the mixin.  If I take it, I will be signing up to test building those
> > > recipes on every Rust update for at least the next year, and it would
> > > somewhat open the door for people advocating doing the same for
> > > scarthgap/rust, which has 3 more years to go.
> > >
> > > Scott
> > >
> > >
> > > > ---
> > > >  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
> > > >  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
> > > >  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
> > > >  3 files changed, 30 insertions(+)
> > > >  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
> > > >  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> > > >
> > > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> > > > index cc00053..2d91d68 100644
> > > > --- a/recipes-devtools/rust/rust_1.81.0.bb
> > > > +++ b/recipes-devtools/rust/rust_1.81.0.bb
> > > > @@ -146,6 +146,9 @@ python do_configure() {
> > > >      # harness are debuggable just from logfiles
> > > >      config.set("rust", "verbose-tests", e(True))
> > > >
> > > > +    # Override default linker cc.
> > > > +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> > > > +
> > > >      # [build]
> > > >      config.add_section("build")
> > > >      config.set("build", "submodules", e(False))
> > > > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > new file mode 100644
> > > > index 0000000..8e8c24a
> > > > --- /dev/null
> > > > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > @@ -0,0 +1,14 @@
> > > > +EXTRA_OECONF = " \
> > > > +    --target=${RUST_TARGET_SYS} \
> > > > +    --host=${BUILD_SYS} \
> > > > +    --prefix=${prefix} \
> > > > +    --libdir=${libdir} \
> > > > +    --x-includes=${STAGING_INCDIR} \
> > > > +    --x-libraries=${STAGING_LIBDIR} \
> > > > +    --without-system-icu \
> > > > +    --disable-tests --disable-strip --disable-optimize \
> > > > +    --disable-jemalloc \
> > > > +    --with-system-icu \
> > > > +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> > > > +    ${JIT} \
> > > > +"
> > > > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > new file mode 100644
> > > > index 0000000..c0214b0
> > > > --- /dev/null
> > > > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > @@ -0,0 +1,13 @@
> > > > +do_configure() {
> > > > +        cd ${B}
> > > > +        python3 ${S}/configure.py \
> > > > +        --enable-project=js \
> > > > +        --target=${RUST_HOST_SYS} \
> > > > +        --host=${BUILD_SYS} \
> > > > +        --prefix=${prefix} \
> > > > +        --libdir=${libdir} \
> > > > +        --disable-jemalloc \
> > > > +        --disable-strip \
> > > > +        ${JIT} \
> > > > +        ${ICU}
> > > > +}
> > > >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#1293): https://lists.yoctoproject.org/g/yocto-patches/message/1293
> Mute This Topic: https://lists.yoctoproject.org/mt/111764095/2167468
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13170805/2167468/856840347/xyzzy [scott.murray@konsulko.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
Scott Murray April 29, 2025, 10:12 p.m. UTC | #9
On Tue, 29 Apr 2025, Sambu, Soumya wrote:

> Hi Scott,
>
> Just following up - do you have any updates on the documentation you mentioned earlier?
>
> Regards,
> Soumya

My apologies for the delay, I got wrapped up in some other things for AGL.
I will be pushing some updates to the mixin layers in the next few days,
and will include the doc update on the dynamic-layers requirements.

Cheers,

Scott


> ________________________________
> From: Scott Murray <scott.murray@konsulko.com>
> Sent: Wednesday, April 9, 2025 2:21 AM
> To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>; Khem Raj <raj.khem@gmail.com>; akuster@mvista.com <akuster@mvista.com>; MacLeod, Randy <Randy.MacLeod@windriver.com>; Yang, Liezhi <Liezhi.Yang@windriver.com>
> Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
>
> 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 Mon, 7 Apr 2025, Scott Murray via lists.yoctoproject.org wrote:
>
> > On Mon, 7 Apr 2025, Khem Raj wrote:
> >
> > > On Mon, Apr 7, 2025 at 6:12 AM Sambu, Soumya <Soumya.Sambu@windriver.com> wrote:
> > > >
> > > > Just following up — @Khem Raj, @Armin Kuster. Does creating a mixins layer for meta-openembedded sound reasonable? Would really appreciate your input.
> > > >
> > >
> > > I think adding bbappends via dynamic layers inside meta-lts-mixins
> > > layer for this rust branch would be
> > > something to consider, that will keep it simple for end users of this layer.
> >
> > As I stated in a previous response, my issue with that approach is
> > people's expectations of my testing whatever random packages in various
> > layers they want me to carry patches for.  Debugging build failures of
> > the in oe-core like librsvg and python3-cryptography has proven a bit
> > of timesink as it is, there's no way I have time to build test and
> > potentially fix issues with multiple flavors of mozjs, chromium, etc. on
> > each Rust upgrade backport.  If Wind River absolutely needs this for
> > their customers, I'll gladly hand over maintenance of the Rust mixin
> > layers to them and they can do it...
>
> After thinking this over last night, and some discussion on the YP
> call this morning, I'll walk the above back somewhat.  I'd be willing to
> consider setting up minimal dynamic layers in the Rust LTS mixins for
> recipe tweaks with something along the following documented guidelines:
>
> - Submissions would require the submitter committing to documentation of
>   themselves as maintainer of the associated bbappends/recipes in either
>   the top-level README or perhaps a new MAINTAINERS file.
> - I will not commit to any testing of recipes supported by the dynamic
>   layers bbappends, i.e. those maintainers need to be prepared to do their
>   own testing on Rust upgrades, and having any complaints about breakage
>   directed their way.  This will be documented in the layer README.
> - dynamic layers will only be considered for layers from meta-openembedded.
> - This may be more contentious, but I do not want to take non-backport
>   changes to the Rust components in the mixin layers themselves if they
>   can be carried in a bbappend in the dynamic layer.  As an example, the
>   rust recipe tweak below is something I would prefer to see handled that
>   way (i.e. with a rust bbappend in the meta-oe dynamic layer).  My
>   reasoning is that such changes are likely to increase my backport
>   effort over time.
> - Straight backports of newer version recipes will generally be
>   considered out of scope.  There is some potential for negotiation if a
>   package on a LTS branch becomes impossible to compile with a newer Rust
>   version, and patching proves extremely difficult compared to a bump to
>   a newer version.  Note that such version bumps that require backports of
>   other components from oe-core will default to being rejected since
>   even in a dynamic layer the potential for side effects on downstream
>   users can be very difficult to gauge.  An example of this from oe-core
>   would be newer versions of python3-cryptography, which require maturin
>   support (and a bunch of associated Python changes) unavailable in
>   kirkstone.
>
> If this seems workable for folks, I can push some documentation updates in
> the next day or two, and will consider refreshed patches after that.  As I
> mentioned on the YP call this morning, I do have some more work to get
> python3-cryptography building with Rust 1.85 working for kirkstone/rust,
> so that may impact things a bit.
>
> Regards,
>
> Scott
>
> > > > Regards,
> > > > Soumya
> > > > ________________________________
> > > > From: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > > Sent: Wednesday, March 26, 2025 8:45 PM
> > > > To: Scott Murray <scott.murray@konsulko.com>; yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > > Cc: MacLeod, Randy <Randy.MacLeod@windriver.com>; akuster@mvista.com <akuster@mvista.com>; raj.khem@gmail.com <raj.khem@gmail.com>
> > > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > > >
> > > > That makes sense.
> > > > Should we create a mixins layer for meta-openembedded?
> > > > So far, we only have mozjs, that needs a bbappend.
> > > > @Khem Raj, @Armin Kuster - Does that make sense to you?
> > > > Regards,
> > > > Soumya
> > > >
> > > > ________________________________
> > > > From: Scott Murray <scott.murray@konsulko.com>
> > > > Sent: Tuesday, March 25, 2025 5:34 AM
> > > > To: yocto-patches@lists.yoctoproject.org <yocto-patches@lists.yoctoproject.org>
> > > > Cc: Sambu, Soumya <Soumya.Sambu@windriver.com>
> > > > Subject: Re: [yocto-patches] [meta-lts-mixins][kirkstone/rust][PATCH 1/1] mozjs: Use RUST_HOST_SYS and RUST_TARGET_SYS
> > > >
> > > > 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, 18 Mar 2025, Soumya via lists.yoctoproject.org wrote:
> > > >
> > > > > From: Soumya Sambu <soumya.sambu@windriver.com>
> > > > >
> > > > > The mozjs-91 and mozjs-78 recipe in meta-openembedded sets --target=${HOST_SYS} and
> > > > > --target=${TARGET_SYS} respectively, which leads to an error when using Rust from meta-lts-mixins:
> > > > >
> > > > > error: Error loading target specification: Could not find specification for target "x86_64-poky-linux".
> > > > >
> > > > > Updated target configuration to resolve this.
> > > > >
> > > > > Additionally, `mozjs-78` encountered "linker 'cc' not found" error. This was fixed by explicitly
> > > > > defining the linker for Rust.
> > > > >
> > > > > Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
> > > >
> > > > I'm not planning to take this, since carrying bbappends for recipes
> > > > outside of oe-core is outside of what I had planned to support with
> > > > the mixin.  If I take it, I will be signing up to test building those
> > > > recipes on every Rust update for at least the next year, and it would
> > > > somewhat open the door for people advocating doing the same for
> > > > scarthgap/rust, which has 3 more years to go.
> > > >
> > > > Scott
> > > >
> > > >
> > > > > ---
> > > > >  recipes-devtools/rust/rust_1.81.0.bb       |  3 +++
> > > > >  recipes-extended/mozjs/mozjs-78_%.bbappend | 14 ++++++++++++++
> > > > >  recipes-extended/mozjs/mozjs-91_%.bbappend | 13 +++++++++++++
> > > > >  3 files changed, 30 insertions(+)
> > > > >  create mode 100644 recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > >  create mode 100644 recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > >
> > > > > diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
> > > > > index cc00053..2d91d68 100644
> > > > > --- a/recipes-devtools/rust/rust_1.81.0.bb
> > > > > +++ b/recipes-devtools/rust/rust_1.81.0.bb
> > > > > @@ -146,6 +146,9 @@ python do_configure() {
> > > > >      # harness are debuggable just from logfiles
> > > > >      config.set("rust", "verbose-tests", e(True))
> > > > >
> > > > > +    # Override default linker cc.
> > > > > +    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
> > > > > +
> > > > >      # [build]
> > > > >      config.add_section("build")
> > > > >      config.set("build", "submodules", e(False))
> > > > > diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > > new file mode 100644
> > > > > index 0000000..8e8c24a
> > > > > --- /dev/null
> > > > > +++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
> > > > > @@ -0,0 +1,14 @@
> > > > > +EXTRA_OECONF = " \
> > > > > +    --target=${RUST_TARGET_SYS} \
> > > > > +    --host=${BUILD_SYS} \
> > > > > +    --prefix=${prefix} \
> > > > > +    --libdir=${libdir} \
> > > > > +    --x-includes=${STAGING_INCDIR} \
> > > > > +    --x-libraries=${STAGING_LIBDIR} \
> > > > > +    --without-system-icu \
> > > > > +    --disable-tests --disable-strip --disable-optimize \
> > > > > +    --disable-jemalloc \
> > > > > +    --with-system-icu \
> > > > > +    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
> > > > > +    ${JIT} \
> > > > > +"
> > > > > diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > > new file mode 100644
> > > > > index 0000000..c0214b0
> > > > > --- /dev/null
> > > > > +++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
> > > > > @@ -0,0 +1,13 @@
> > > > > +do_configure() {
> > > > > +        cd ${B}
> > > > > +        python3 ${S}/configure.py \
> > > > > +        --enable-project=js \
> > > > > +        --target=${RUST_HOST_SYS} \
> > > > > +        --host=${BUILD_SYS} \
> > > > > +        --prefix=${prefix} \
> > > > > +        --libdir=${libdir} \
> > > > > +        --disable-jemalloc \
> > > > > +        --disable-strip \
> > > > > +        ${JIT} \
> > > > > +        ${ICU}
> > > > > +}
> > > > >
> > >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#1293): https://lists.yoctoproject.org/g/yocto-patches/message/1293
> > Mute This Topic: https://lists.yoctoproject.org/mt/111764095/2167468
> > Group Owner: yocto-patches+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13170805/2167468/856840347/xyzzy [scott.murray@konsulko.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
> >
> >
>
diff mbox series

Patch

diff --git a/recipes-devtools/rust/rust_1.81.0.bb b/recipes-devtools/rust/rust_1.81.0.bb
index cc00053..2d91d68 100644
--- a/recipes-devtools/rust/rust_1.81.0.bb
+++ b/recipes-devtools/rust/rust_1.81.0.bb
@@ -146,6 +146,9 @@  python do_configure() {
     # harness are debuggable just from logfiles
     config.set("rust", "verbose-tests", e(True))
 
+    # Override default linker cc.
+    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
+
     # [build]
     config.add_section("build")
     config.set("build", "submodules", e(False))
diff --git a/recipes-extended/mozjs/mozjs-78_%.bbappend b/recipes-extended/mozjs/mozjs-78_%.bbappend
new file mode 100644
index 0000000..8e8c24a
--- /dev/null
+++ b/recipes-extended/mozjs/mozjs-78_%.bbappend
@@ -0,0 +1,14 @@ 
+EXTRA_OECONF = " \
+    --target=${RUST_TARGET_SYS} \
+    --host=${BUILD_SYS} \
+    --prefix=${prefix} \
+    --libdir=${libdir} \
+    --x-includes=${STAGING_INCDIR} \
+    --x-libraries=${STAGING_LIBDIR} \
+    --without-system-icu \
+    --disable-tests --disable-strip --disable-optimize \
+    --disable-jemalloc \
+    --with-system-icu \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
+    ${JIT} \
+"
diff --git a/recipes-extended/mozjs/mozjs-91_%.bbappend b/recipes-extended/mozjs/mozjs-91_%.bbappend
new file mode 100644
index 0000000..c0214b0
--- /dev/null
+++ b/recipes-extended/mozjs/mozjs-91_%.bbappend
@@ -0,0 +1,13 @@ 
+do_configure() {
+        cd ${B}
+        python3 ${S}/configure.py \
+        --enable-project=js \
+        --target=${RUST_HOST_SYS} \
+        --host=${BUILD_SYS} \
+        --prefix=${prefix} \
+        --libdir=${libdir} \
+        --disable-jemalloc \
+        --disable-strip \
+        ${JIT} \
+        ${ICU}
+}