On Fri, 2022-08-19 at 19:29 -0700, Randy MacLeod wrote:
> For qemuppc/mips, rustfmt isn't being built so check
> that it and related tools exist before copying them.
> qemuppc/mips are not well-supported in the Rust world
> but will work to get the build to fixed later.
> 
> Signed-off-by: Randy MacLeod <[email protected]>
> ---
>  meta/recipes-devtools/rust/rust_1.63.0.bb | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-devtools/rust/rust_1.63.0.bb 
> b/meta/recipes-devtools/rust/rust_1.63.0.bb
> index 3081cd5ef3..050f398794 100644
> --- a/meta/recipes-devtools/rust/rust_1.63.0.bb
> +++ b/meta/recipes-devtools/rust/rust_1.63.0.bb
> @@ -43,8 +43,10 @@ rust_do_install:class-nativesdk() {
>  
>      install -d ${D}${bindir}
>      for i in cargo-clippy clippy-driver rustfmt; do
> -        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i 
> ${D}${bindir}
> -        chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
> +        if [ -e 
> build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ]; then
> +            cp 
> build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
> +            chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
> +        fi
>      done
>  
>      chown root:root ${D}/ -R
> @@ -60,8 +62,10 @@ rust_do_install:class-target() {
>  
>      install -d ${D}${bindir}
>      for i in cargo-clippy clippy-driver rustfmt; do
> -        cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i 
> ${D}${bindir}
> -        chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
> +        if [ -e 
> build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ]; then
> +            cp 
> build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
> +            chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
> +        fi
>      done
>  
>      chown root:root ${D}/ -R


I did look into this a bit. The compile logs for ppc are full of
horrible warnings and I have patches to clean that up. Once that is
done, it comes down to crossbeam-utils trying to use AtomicI64 which
doesn't exist on mips or powerpc 32 bit.

https://github.com/tikv/rust-prometheus/issues/315

has some interesting info.

error[E0412]: cannot find type `AtomicU64` in module `core::sync::atomic`
  --> 
/usr/src/debug/rust/1.63.0-r0/rustc-1.63.0-src/vendor/crossbeam-utils/src/atomic/consume.rs:78:14
   |
78 |   impl_atomic!(AtomicU64, u64);
   |                ^^^^^^^^^ help: a struct with a similar name exists: 
`AtomicU16`

error[E0412]: cannot find type `AtomicI64` in module `core::sync::atomic`

Digging further crossbeam-utils has a no_atomics.rs file listing all
the triplets that can't use atomic or have limited 64 bit ones.

Sadly those triplets don't match the ones were using as we have
TARGET_VENDOR in ours, for reasons. That will be why it breaks.

I'm trying a patch which changes TARGET_VENDOR -> "-unknown" but I've
never written rust code and it takes an age to cycle through so we'll
see...

Cheers,

Richard




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169840): 
https://lists.openembedded.org/g/openembedded-core/message/169840
Mute This Topic: https://lists.openembedded.org/mt/93137855/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to