On Mon, 2024-11-04 at 03:21 -0800, Hemraj, Deepthi via lists.openembedded.org 
wrote:
> From: Deepthi Hemraj <[email protected]>
> 
> [YOCTO #15061]
> Rust multilib sdks broken because of the conflicts between attempted installs 
> of rust-cross-canadian for arm and aarch64.
> 
> Arm and aarch64 target architectures are trying to install cargo.sh and 
> rust.sh in the same path which resulted in the issue
> 
> The modification installs the scripts in different folders based on the 
> target acrhitecture and hence prevents the conflicts.
> 
> Signed-off-by: Deepthi Hemraj <[email protected]>
> ---
>  meta/recipes-devtools/rust/rust-cross-canadian.inc | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
> b/meta/recipes-devtools/rust/rust-cross-canadian.inc
> index c34b839d15..81d46a45e0 100644
> --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
> +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
> @@ -52,8 +52,8 @@ do_install () {
>      chmod +x "$outfile"
>      create_sdk_wrapper "${SYS_BINDIR}/target-rust-ccld-wrapper" "CC"
>  
> -    ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
> -    mkdir "${ENV_SETUP_DIR}"
> +    
> ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d/${TRANSLATED_TARGET_ARCH}
> +    mkdir -p "${ENV_SETUP_DIR}"
>      RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
>  
>      RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' 
> | sed 's/-/_/g'`
> @@ -89,5 +89,5 @@ do_install () {
>       EOF
>  }
>  
> -FILES:${PN} += "${base_prefix}/environment-setup.d"
> +FILES:${PN} += "${base_prefix}/environment-setup.d/${TRANSLATED_TARGET_ARCH}"

This has the same issue as the original patch. Instead of renaming the
file, it is being placed in a different directory. This avoids
conflicts but means two scripts are still being installed in a given
environment.

I'm still not seeing an explaintion of which one should "win" in such
cases or how the selection is made.

As far as I can tell the patch "papers over" a build issue and creates
a runtime usage issue instead.

Cheers,

Richard




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

Reply via email to