* [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2023-12-16 8:56 Deepthi.Hemraj 2023-12-22 14:40 ` [OE-core] " Ross Burton 2024-10-28 14:00 ` Richard Purdie 0 siblings, 2 replies; 15+ messages in thread From: Deepthi.Hemraj @ 2023-12-16 8:56 UTC (permalink / raw) To: openembedded-core Cc: Randy.MacLeod, Naveen.Gowda, Shivaprasad.Moodalappa, Sundeep.Kokkonda From: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> 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 current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros that uses MLPREFIX based on the multilib architecture. Hence, creates different file names for the environment setup scripts and resolves the issue. Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> --- meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index 7bfef6d175..9996d3d4a3 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc @@ -52,7 +52,7 @@ do_install () { ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d mkdir "${ENV_SETUP_DIR}" - RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" + RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${MLPREFIX}rust.sh" RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` @@ -66,7 +66,7 @@ do_install () { chown -R root.root ${D} - CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" + CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/${MLPREFIX}cargo.sh" cat <<- EOF > "${CARGO_ENV_SETUP_SH}" export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" mkdir -p "\$CARGO_HOME" -- 2.42.0 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2023-12-16 8:56 [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 Deepthi.Hemraj @ 2023-12-22 14:40 ` Ross Burton 2023-12-28 9:28 ` Hemraj, Deepthi 2024-02-02 20:16 ` [OE-core] " Randy MacLeod 2024-10-28 14:00 ` Richard Purdie 1 sibling, 2 replies; 15+ messages in thread From: Ross Burton @ 2023-12-22 14:40 UTC (permalink / raw) To: Deepthi.Hemraj@windriver.com Cc: OE Core mailing list, Randy.MacLeod@windriver.com, Naveen.Gowda@windriver.com, Shivaprasad.Moodalappa@windriver.com, Sundeep.Kokkonda@windriver.com On 16 Dec 2023, at 08:56, Hemraj, Deepthi via lists.openembedded.org <Deepthi.Hemraj=windriver.com@lists.openembedded.org> wrote: > The current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros that uses MLPREFIX based on the multilib architecture. > Hence, creates different file names for the environment setup scripts and resolves the issue. This solves the file conflicts if you put a 32-bit and 64-bit rust cross-compiler into a SDK, but is that actually a usable setup if the environment scripts are both overwriting the same environment variables? Ross ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2023-12-22 14:40 ` [OE-core] " Ross Burton @ 2023-12-28 9:28 ` Hemraj, Deepthi 2024-01-12 6:59 ` Hemraj, Deepthi 2024-02-02 20:16 ` [OE-core] " Randy MacLeod 1 sibling, 1 reply; 15+ messages in thread From: Hemraj, Deepthi @ 2023-12-28 9:28 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 481 bytes --] Hi Ross, >> if the environment scripts are both overwriting the same environment variables? The environment script variables are generated based on the architectures. Please find the environment variables generated in the script file: RUST_TARGET_PATH="$OECORE_NATIVE_SYSROOT/usr/lib/aarch64-poky-linux/rustlib" RUST_TARGET_PATH="$OECORE_NATIVE_SYSROOT/usr/lib/arm-pokymllib32-linux-gnueabi/rustlib" Please let me know if this was your query or did I misinterrupted it? [-- Attachment #2: Type: text/html, Size: 617 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-01-12 6:59 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-01-12 5:41 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 68 bytes --] Hi Ross, May I know if any changes are required for this patch? [-- Attachment #2: Type: text/html, Size: 76 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-01-12 6:59 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-01-12 6:59 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 126 bytes --] Hi Ross, May I know if any changes are required for this patch? If not, when it is planned to take into Kirkstone branch. [-- Attachment #2: Type: text/html, Size: 261 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2023-12-22 14:40 ` [OE-core] " Ross Burton 2023-12-28 9:28 ` Hemraj, Deepthi @ 2024-02-02 20:16 ` Randy MacLeod 2024-04-29 10:51 ` Hemraj, Deepthi 1 sibling, 1 reply; 15+ messages in thread From: Randy MacLeod @ 2024-02-02 20:16 UTC (permalink / raw) To: Ross Burton, Deepthi.Hemraj@windriver.com Cc: OE Core mailing list, Naveen.Gowda@windriver.com, Shivaprasad.Moodalappa@windriver.com, Sundeep.Kokkonda@windriver.com, alex.kiernan@gmail.com [-- Attachment #1: Type: text/plain, Size: 2712 bytes --] Add Alex, who might actually be using YP Rust with multilib support. On 2023-12-22 9:40 a.m., Ross Burton wrote: > On 16 Dec 2023, at 08:56, Hemraj, Deepthi via lists.openembedded.org<Deepthi.Hemraj=windriver.com@lists.openembedded.org> wrote: >> The current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros that uses MLPREFIX based on the multilib architecture. >> Hence, creates different file names for the environment setup scripts and resolves the issue. > This solves the file conflicts if you put a 32-bit and 64-bit rust cross-compiler into a SDK, but is that actually a usable setup if the environment scripts are both overwriting the same environment variables? > > Ross I think what Ross is asking is how would we actually use rust in the SDK if we wanted to target different multilibs? The rust compiler , unlike gcc, can actually target multiple target ABIs (x86-64, arm64, x86, arm) using a single binary: Try running one of|: | |❯ ||rustc --print=[target-list, target-cpus, target-features]| |eg on my laptop:||| |❯ rustc --version rustc 1.71.1 (eb26296b5 2023-08-03)| |❯ rustc --print=target-list | rg linux | wc -l 70 ❯ rustc --print=target-list | rg linux | head aarch64-linux-android aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu_ilp32 aarch64-unknown-linux-musl aarch64-unknown-linux-ohos aarch64_be-unknown-linux-gnu aarch64_be-unknown-linux-gnu_ilp32 arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf| |Please reply to this thread if you have a question or once you have confirmed that theses commands also work in a 32 and 64 bit SDKs from a Yocto build.| |Furthermore, if you have just one version of Rust, can you (easily) compile, link on the dev box and then copy the executable to a qemu instance and run hello-world for both multilibs. Please show each step to confirm that you are using the SDK version of Rust and then you aren't getting any help (rust or linker) from the host distro. The linker is target specific as shown, for Ubuntu, here: https://medium.com/swlh/compiling-rust-for-raspberry-pi-arm-922b55dbb050 | |Does it make sense to have two versions of |cargo.sh ? I suspect that it would not but I haven't worked with multlib SDKs very much, at least not recently. Also, I'm not sure off-hand, exactly how we should fix the original bug but maybe we should be adding code that just checks for multilib configuration and 'magically' decides which recipe will provide the Rust compiler and only installs the version of the linker needed or the non-default tune. | | | | -- # Randy MacLeod # Wind River Linux [-- Attachment #2: Type: text/html, Size: 5047 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:51 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-02-10 4:39 UTC (permalink / raw) To: MacLeod, Randy, Ross Burton Cc: OE Core mailing list, Gowda, Naveen, Moodalappa, Shivaprasad, Kokkonda, Sundeep, alex.kiernan@gmail.com [-- Attachment #1: Type: text/plain, Size: 4703 bytes --] Hi Randy, I couldn't reproduce the same issue with the latest commits. Below is the issue reproduced on the latest sources: file /usr/include/finclude/math-vector-fortran.h conflicts between attempted installs of lib32-libc6-dev-2.39+git0+6d1e3fb07b-r0.armv7at2hf_neon and libc6-dev-2.39+git0+6d1e3fb07b-r0.cortexa57 So I reverted to older commits and was able to reproduce the issue. Following the commands you provided: /ala-lpggp31/dhemraj/master/15061/poky/build > rustc --version rustc 1.72.1 (d5c2e9c34 2023-09-13) (built from a source tarball) /ala-lpggp31/dhemraj/master/15061/poky/build > rustc --print=target-list | rg linux | wc -l 70 /ala-lpggp31/dhemraj/master/15061/poky/build > rustc --print=target-list | rg linux | head aarch64-linux-android aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu_ilp32 aarch64-unknown-linux-musl aarch64-unknown-linux-ohos aarch64_be-unknown-linux-gnu aarch64_be-unknown-linux-gnu_ilp32 arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf The cargo.sh and rust.sh scripts generated for multilib libraries are identical, except for the file paths, which are different for 32-bit and 64-bit target architectures. This resolves the conflict issue between attempted installs of rust-cross-canadian-arm and rust-cross-canadian-aarch64. I will investigate on it further and inform. Thank you, Deepthi ________________________________ From: MacLeod, Randy <Randy.MacLeod@windriver.com> Sent: Saturday, February 3, 2024 1:46:09 AM To: Ross Burton <Ross.Burton@arm.com>; Hemraj, Deepthi <Deepthi.Hemraj@windriver.com> Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>; Gowda, Naveen <Naveen.Gowda@windriver.com>; Moodalappa, Shivaprasad <Shivaprasad.Moodalappa@windriver.com>; Kokkonda, Sundeep <Sundeep.Kokkonda@windriver.com>; alex.kiernan@gmail.com <alex.kiernan@gmail.com> Subject: Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 Add Alex, who might actually be using YP Rust with multilib support. On 2023-12-22 9:40 a.m., Ross Burton wrote: On 16 Dec 2023, at 08:56, Hemraj, Deepthi via lists.openembedded.org <Deepthi.Hemraj=windriver.com@lists.openembedded.org><mailto:Deepthi.Hemraj=windriver.com@lists.openembedded.org> wrote: The current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros that uses MLPREFIX based on the multilib architecture. Hence, creates different file names for the environment setup scripts and resolves the issue. This solves the file conflicts if you put a 32-bit and 64-bit rust cross-compiler into a SDK, but is that actually a usable setup if the environment scripts are both overwriting the same environment variables? Ross I think what Ross is asking is how would we actually use rust in the SDK if we wanted to target different multilibs? The rust compiler , unlike gcc, can actually target multiple target ABIs (x86-64, arm64, x86, arm) using a single binary: Try running one of: ❯ rustc --print=[target-list, target-cpus, target-features] eg on my laptop: ❯ rustc --version rustc 1.71.1 (eb26296b5 2023-08-03) ❯ rustc --print=target-list | rg linux | wc -l 70 ❯ rustc --print=target-list | rg linux | head aarch64-linux-android aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu_ilp32 aarch64-unknown-linux-musl aarch64-unknown-linux-ohos aarch64_be-unknown-linux-gnu aarch64_be-unknown-linux-gnu_ilp32 arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf Please reply to this thread if you have a question or once you have confirmed that theses commands also work in a 32 and 64 bit SDKs from a Yocto build. Furthermore, if you have just one version of Rust, can you (easily) compile, link on the dev box and then copy the executable to a qemu instance and run hello-world for both multilibs. Please show each step to confirm that you are using the SDK version of Rust and then you aren't getting any help (rust or linker) from the host distro. The linker is target specific as shown, for Ubuntu, here: https://medium.com/swlh/compiling-rust-for-raspberry-pi-arm-922b55dbb050 Does it make sense to have two versions of cargo.sh ? I suspect that it would not but I haven't worked with multlib SDKs very much, at least not recently. Also, I'm not sure off-hand, exactly how we should fix the original bug but maybe we should be adding code that just checks for multilib configuration and 'magically' decides which recipe will provide the Rust compiler and only installs the version of the linker needed or the non-default tune. -- # Randy MacLeod # Wind River Linux [-- Attachment #2: Type: text/html, Size: 8229 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:51 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-04-29 10:51 UTC (permalink / raw) To: MacLeod, Randy, Ross Burton Cc: OE Core mailing list, Gowda, Naveen, Moodalappa, Shivaprasad, Kokkonda, Sundeep, alex.kiernan@gmail.com [-- Attachment #1: Type: text/plain, Size: 4611 bytes --] Hi Randy, I couldn't reproduce the same issue with the latest commits. Below is the issue reproduced on the latest sources: file /usr/include/finclude/math-vector-fortran.h conflicts between attempted installs of lib32-libc6-dev-2.39+git0+6d1e3fb07b-r0.armv7at2hf_neon and libc6-dev-2.39+git0+6d1e3fb07b-r0.cortexa57 So I reverted to older commits and was able to reproduce the issue. Following the commands you provided: ...poky/build > rustc --version rustc 1.72.1 (d5c2e9c34 2023-09-13) (built from a source tarball) ...poky/build > rustc --print=target-list | rg linux | wc -l 70 ...poky/build > rustc --print=target-list | rg linux | head aarch64-linux-android aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu_ilp32 aarch64-unknown-linux-musl aarch64-unknown-linux-ohos aarch64_be-unknown-linux-gnu aarch64_be-unknown-linux-gnu_ilp32 arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf The cargo.sh and rust.sh scripts generated for multilib libraries are identical, except for the file paths, which are different for 32-bit and 64-bit target architectures. This resolves the conflict issue between attempted installs of rust-cross-canadian-arm and rust-cross-canadian-aarch64. I will investigate on it further and inform. Thank you, Deepthi *From:* MacLeod, Randy <Randy.MacLeod@windriver.com> *Sent:* Saturday, February 3, 2024 1:46:09 AM *To:* Ross Burton <Ross.Burton@arm.com>; Hemraj, Deepthi <Deepthi.Hemraj@windriver.com> *Cc:* OE Core mailing list <openembedded-core@lists.openembedded.org>; Gowda, Naveen <Naveen.Gowda@windriver.com>; Moodalappa, Shivaprasad <Shivaprasad.Moodalappa@windriver.com>; Kokkonda, Sundeep <Sundeep.Kokkonda@windriver.com>; alex.kiernan@gmail.com <alex.kiernan@gmail.com> *Subject:* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 Add Alex, who might actually be using YP Rust with multilib support. On 2023-12-22 9:40 a.m., Ross Burton wrote: > > On 16 Dec 2023, at 08:56, Hemraj, Deepthi via lists.openembedded.org <Deepthi.Hemraj=windriver.com@lists.openembedded.org> > ( Deepthi.Hemraj=windriver.com@lists.openembedded.org ) wrote: > >> The current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros >> that uses MLPREFIX based on the multilib architecture. >> Hence, creates >> different file names for the environment setup scripts and resolves the >> issue. >> > > This solves the file conflicts if you put a 32-bit and 64-bit rust > cross-compiler into a SDK, but is that actually a usable setup if the > environment scripts are both overwriting the same environment variables? > > Ross I think what Ross is asking is how would we actually use rust in the SDK if we wanted to target different multilibs? The rust compiler , unlike gcc, can actually target multiple target ABIs (x86-64, arm64, x86, arm) using a single binary: Try running one of : ❯ rustc --print=[target-list, target-cpus, target-features] eg on my laptop: ❯ rustc --version rustc 1.71.1 (eb26296b5 2023-08-03) ❯ rustc --print=target-list | rg linux | wc -l 70 ❯ rustc --print=target-list | rg linux | head aarch64-linux-android aarch64-unknown-linux-gnu aarch64-unknown-linux-gnu_ilp32 aarch64-unknown-linux-musl aarch64-unknown-linux-ohos aarch64_be-unknown-linux-gnu aarch64_be-unknown-linux-gnu_ilp32 arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf Please reply to this thread if you have a question or once you have confirmed that theses commands also work in a 32 and 64 bit SDKs from a Yocto build. Furthermore, if you have just one version of Rust, can you (easily) compile, link on the dev box and then copy the executable to a qemu instance and run hello-world for both multilibs. Please show each step to confirm that you are using the SDK version of Rust and then you aren't getting any help (rust or linker) from the host distro. The linker is target specific as shown, for Ubuntu, here: https://medium.com/swlh/compiling-rust-for-raspberry-pi-arm-922b55dbb050 ( https://medium.com/swlh/compiling-rust-for-raspberry-pi-arm-922b55dbb050 ) Does it make sense to have two versions of cargo.sh ? I suspect that it would not but I haven't worked with multlib SDKs very much, at least not recently. Also, I'm not sure off-hand, exactly how we should fix the original bug but maybe we should be adding code that just checks for multilib configuration and 'magically' decides which recipe will provide the Rust compiler and only installs the version of the linker needed or the non-default tune. -- # Randy MacLeod # Wind River Linux [-- Attachment #2: Type: text/html, Size: 6663 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:49 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-04-29 7:43 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1420 bytes --] Hi Randy, I copied the Rust compiler binaries generated for both armv7at2hf-neon-pokymllib32-linux-gnueabi and cortexa57-poky-linux into a QEMU environment and executed a simple "Hello, World!" program using these binaries. Below are the steps I followed: /ala-lpggp31/dhemraj/master/15061/poky/build/tmp/work/armv7at2hf-neon-pokymllib32-linux-gnueabi/lib32-rust/1.74.1/image/usr/bin > scp -r rustc root@192.168.7.6:/arm32/ rustc 100% 13KB 2.2MB/s 00:00 root@qemuarm64:/arm32# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm32# ./rustc hello.rs root@qemuarm64:/arm32# ./hello Hello, World! ------------------------------------------------------------------------------------------------------------------------ /ala-lpggp31/dhemraj/master/15061/poky/build/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/aarch64-poky-linux-gnu/stage2/bin > scp rustc root@192.168.7.6:/arm64 rustc 100% 74KB 4.6MB/s 00:00 root@qemuarm64:/arm64# ls rustc root@qemuarm64:/arm64# vi hello.rs root@qemuarm64:/arm64# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm64# ./rustc hello.rs root@qemuarm64:/arm64# ./hello Hello, World! [-- Attachment #2: Type: text/html, Size: 1862 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:49 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-04-29 11:04 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1892 bytes --] Hello Randy, I verified rust.sh and cargo.sh in the installed sdk those are generated differently based on the multilib tuning. ...poky/build/tmp/deploy/sdk/install > fd rust.sh sysroots/x86_64-pokysdk-linux/environment-setup.d/rust.sh sysroots/x86_64-pokysdk-linux/environment-setup.d/lib32-rust.sh ...poky/build/tmp/deploy/sdk/install > fd cargo.sh sysroots/x86_64-pokysdk-linux/environment-setup.d/cargo.sh sysroots/x86_64-pokysdk-linux/environment-setup.d/lib32-cargo.sh I tested a sample program on 32 and 64 bit targets and its working. Below are the steps: I copied the Rust compiler binaries generated for both armv7at2hf-neon-pokymllib32-linux-gnueabi and cortexa57-poky-linux into a QEMU environment and executed a simple "Hello, World!" program using these binaries. ...poky/build/tmp/work/armv7at2hf-neon-pokymllib32-linux-gnueabi/lib32-rust/1.74.1/image/usr/bin > scp -r rustc root@192.168.7.6:/arm32/ rustc 100% 13KB 2.2MB/s 00:00 root@qemuarm64:/arm32# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm32# ./rustc hello.rs root@qemuarm64:/arm32# ./hello Hello, World! ------------------------------------------------------------------------------------------------------------------------ ...poky/build/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/aarch64-poky-linux-gnu/stage2/bin > scp rustc root@192.168.7.6:/arm64 rustc 100% 74KB 4.6MB/s 00:00 root@qemuarm64:/arm64# ls rustc root@qemuarm64:/arm64# vi hello.rs root@qemuarm64:/arm64# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm64# ./rustc hello.rs root@qemuarm64:/arm64# ./hello Hello, World! [-- Attachment #2: Type: text/html, Size: 2651 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:49 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-04-29 10:52 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1358 bytes --] Hi Randy, I copied the Rust compiler binaries generated for both armv7at2hf-neon-pokymllib32-linux-gnueabi and cortexa57-poky-linux into a QEMU environment and executed a simple "Hello, World!" program using these binaries. Below are the steps I followed: ...poky/build/tmp/work/armv7at2hf-neon-pokymllib32-linux-gnueabi/lib32-rust/1.74.1/image/usr/bin > scp -r rustc root@192.168.7.6:/arm32/ rustc 100% 13KB 2.2MB/s 00:00 root@qemuarm64:/arm32# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm32# ./rustc hello.rs root@qemuarm64:/arm32# ./hello Hello, World! ------------------------------------------------------------------------------------------------------------------------ ...poky/build/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/aarch64-poky-linux-gnu/stage2/bin > scp rustc root@192.168.7.6:/arm64 rustc 100% 74KB 4.6MB/s 00:00 root@qemuarm64:/arm64# ls rustc root@qemuarm64:/arm64# vi hello.rs root@qemuarm64:/arm64# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm64# ./rustc hello.rs root@qemuarm64:/arm64# ./hello Hello, World! [-- Attachment #2: Type: text/html, Size: 1992 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 @ 2024-04-29 10:49 ` Hemraj, Deepthi 0 siblings, 0 replies; 15+ messages in thread From: Hemraj, Deepthi @ 2024-04-29 10:49 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1358 bytes --] Hi Randy, I copied the Rust compiler binaries generated for both armv7at2hf-neon-pokymllib32-linux-gnueabi and cortexa57-poky-linux into a QEMU environment and executed a simple "Hello, World!" program using these binaries. Below are the steps I followed: ...poky/build/tmp/work/armv7at2hf-neon-pokymllib32-linux-gnueabi/lib32-rust/1.74.1/image/usr/bin > scp -r rustc root@192.168.7.6:/arm32/ rustc 100% 13KB 2.2MB/s 00:00 root@qemuarm64:/arm32# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm32# ./rustc hello.rs root@qemuarm64:/arm32# ./hello Hello, World! ------------------------------------------------------------------------------------------------------------------------ ...poky/build/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/aarch64-poky-linux-gnu/stage2/bin > scp rustc root@192.168.7.6:/arm64 rustc 100% 74KB 4.6MB/s 00:00 root@qemuarm64:/arm64# ls rustc root@qemuarm64:/arm64# vi hello.rs root@qemuarm64:/arm64# cat hello.rs fn main() { println!("Hello, World!"); } root@qemuarm64:/arm64# ./rustc hello.rs root@qemuarm64:/arm64# ./hello Hello, World! [-- Attachment #2: Type: text/html, Size: 1794 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2024-04-29 10:51 ` Hemraj, Deepthi (?) (?) @ 2024-10-28 12:04 ` Hemraj, Deepthi 2024-10-28 14:00 ` [OE-core] " Richard Purdie -1 siblings, 1 reply; 15+ messages in thread From: Hemraj, Deepthi @ 2024-10-28 12:04 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 285 bytes --] Hi, I have verified that the issue is reproducible with the latest sources, and the patch provided above resolves the issue. All necessary testing has been done, and the results have been addressed on the same thread. Could someone please review the patch? Thank you, Deepthi [-- Attachment #2: Type: text/html, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2024-10-28 12:04 ` Hemraj, Deepthi @ 2024-10-28 14:00 ` Richard Purdie 0 siblings, 0 replies; 15+ messages in thread From: Richard Purdie @ 2024-10-28 14:00 UTC (permalink / raw) To: Deepthi.Hemraj, openembedded-core On Mon, 2024-10-28 at 05:04 -0700, Hemraj, Deepthi via lists.openembedded.org wrote: > Hi, > > I have verified that the issue is reproducible with the latest > sources, and the patch provided above resolves the issue. All > necessary testing has been done, and the results have been addressed > on the same thread. > Could someone please review the patch? I've reviewed it and I believe Ross' feedback stands. I've tried to explain why. Cheers, Richard ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 2023-12-16 8:56 [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 Deepthi.Hemraj 2023-12-22 14:40 ` [OE-core] " Ross Burton @ 2024-10-28 14:00 ` Richard Purdie 1 sibling, 0 replies; 15+ messages in thread From: Richard Purdie @ 2024-10-28 14:00 UTC (permalink / raw) To: Deepthi.Hemraj, openembedded-core Cc: Randy.MacLeod, Naveen.Gowda, Shivaprasad.Moodalappa, Sundeep.Kokkonda On Sat, 2023-12-16 at 00:56 -0800, Hemraj, Deepthi via lists.openembedded.org wrote: > From: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> > > 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 current patch modifies CARGO_ENV_SETUP_SH and RUST_ENV_SETUP_SH macros that uses MLPREFIX based on the multilib architecture. > Hence, creates different file names for the environment setup scripts and resolves the issue. > > Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com> > --- > meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc > index 7bfef6d175..9996d3d4a3 100644 > --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc > +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc > @@ -52,7 +52,7 @@ do_install () { > > ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d > mkdir "${ENV_SETUP_DIR}" > - RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" > + RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${MLPREFIX}rust.sh" > > RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` > RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` > @@ -66,7 +66,7 @@ do_install () { > > chown -R root.root ${D} > > - CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" > + CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/${MLPREFIX}cargo.sh" > cat <<- EOF > "${CARGO_ENV_SETUP_SH}" > export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" > mkdir -p "\$CARGO_HOME" > Sorry, but this patch isn't correct as far as I can tell. As I understand it, the files in environment-setup.d will be sourced by the parent environment script. Whilst this patch gives them separate filenames and hence avoids a conflict at build, it places them both in the directory and both will be sourced, one will win and the other will never get used. This means we swap a build failure for it being usuable at execution time in the SDK. If I'm misunderstanding how this is used, please correct me but it looks incorrect. Cheers, Richard ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-10-28 14:01 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-16 8:56 [PATCH V3] rust-cross-canadian: Fix file conflicts for arm and aarch64 Deepthi.Hemraj 2023-12-22 14:40 ` [OE-core] " Ross Burton 2023-12-28 9:28 ` Hemraj, Deepthi 2024-01-12 5:41 ` Hemraj, Deepthi 2024-01-12 6:59 ` Hemraj, Deepthi 2024-02-02 20:16 ` [OE-core] " Randy MacLeod 2024-02-10 4:39 ` Hemraj, Deepthi 2024-04-29 10:51 ` Hemraj, Deepthi 2024-04-29 7:43 ` Hemraj, Deepthi 2024-04-29 11:04 ` Hemraj, Deepthi 2024-04-29 10:52 ` Hemraj, Deepthi 2024-04-29 10:49 ` Hemraj, Deepthi 2024-10-28 12:04 ` Hemraj, Deepthi 2024-10-28 14:00 ` [OE-core] " Richard Purdie 2024-10-28 14:00 ` Richard Purdie
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.