Re: [OE-core] [PATCH] rust: added missing runtime dependencies to run rust on target

2023-03-08 Thread Sundeep KOKKONDA
All the 3 ' gcc g++ binutil ' are required to run rust on target.

> 
> Without binutils getting error 'cannot find ld ' and
> 

without g++ getting below error:

> 
> root@qemux86-64:~# rustc -o hello main.rs
> error: linking with `x86_64-poky-linux-gcc` failed: exit status: 1
> |
> = note: "x86_64-poky-linux-gcc" "/tmp/rustcuD3OmE/symbols.o"
> "hello.main.cbe1d0af-cgu.0.rcgu.o" "hello.main.cbe1d0af-cgu.1.rcgu.o"
> "hello.main.cbe1d0af-cgu.2.rcgu.o" "hello.main.cbe1d0af
> = note:
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find Scrt1.o: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find crti.o: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find crtbeginS.o: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lgcc_s: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lutil: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lrt: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lpthread: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lm: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -ldl: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find -lc: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find crtendS.o: No such file or directory
> /usr/lib/gcc/x86_64-poky-linux/12.2.0/../../../../x86_64-poky-linux/bin/ld:
> cannot find crtn.o: No such file or directory
> collect2: error: ld returned 1 exit status
> error: aborting due to previous error
> 

I tried the given dependencies ' gcc gcc-symlinks binutils ${LIBC_DEPENDENCIES} 
libgcc-dev ' to avoid g++ but that giving below QA error:

> 
> NOTE: Executing Tasks
> ERROR: rust-1.67.1-r0 do_package_qa: QA Issue: rust rdepends on glibc-dbg
> [debug-deps]
> ERROR: rust-1.67.1-r0 do_package_qa: QA Issue: rust rdepends on glibc-dev
> [dev-deps]
> ERROR: rust-1.67.1-r0 do_package_qa: QA Issue: rust rdepends on libgcc-dev
> [dev-deps]
> ERROR: rust-1.67.1-r0 do_package_qa: Fatal QA errors were found, failing
> task.
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178207): 
https://lists.openembedded.org/g/openembedded-core/message/178207
Mute This Topic: https://lists.openembedded.org/mt/97477865/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] rust: added missing runtime dependencies to run rust on target

2023-03-08 Thread Alexander Kanavin
On Wed, 8 Mar 2023 at 18:30, Sundeep KOKKONDA
 wrote:
> rust files are not linking on target due to missing dependencies and observed 
> below error.
> error: linker `x86_64-poky-linux-gcc` not found
>
> Added the required dependencies to run rust on target machine.
> +RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"

Are all three required? Particularly, why g++?

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178189): 
https://lists.openembedded.org/g/openembedded-core/message/178189
Mute This Topic: https://lists.openembedded.org/mt/97477865/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] rust: added missing runtime dependencies to run rust on target

2023-03-08 Thread Alex Kiernan
On Wed, Mar 8, 2023 at 5:30 PM Sundeep KOKKONDA
 wrote:
>
> [YOCTO #14975]
> rust files are not linking on target due to missing dependencies and observed 
> below error.
> error: linker `x86_64-poky-linux-gcc` not found
>
> Added the required dependencies to run rust on target machine.
>
> Signed-off-by: Sundeep KOKKONDA 
> ---
>  meta/recipes-devtools/rust/rust_1.67.1.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-devtools/rust/rust_1.67.1.bb 
> b/meta/recipes-devtools/rust/rust_1.67.1.bb
> index 2118faec8f..f4c6d9511d 100644
> --- a/meta/recipes-devtools/rust/rust_1.67.1.bb
> +++ b/meta/recipes-devtools/rust/rust_1.67.1.bb
> @@ -13,6 +13,8 @@ DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
>
>  DEPENDS += "rust-llvm (=${PV})"
>
> +RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
> +

I did some digging a while ago (so it may have drifted) - I got to
this list, which avoided g++

gcc gcc-symlinks binutils ${LIBC_DEPENDENCIES} libgcc-dev

What I don't understand is why doesn't gcc have a dependency on binutils?

>  # Otherwise we'll depend on what we provide
>  INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
>  # We don't need to depend on gcc-native because yocto assumes it exists
> --
> 2.34.1
>
>
> 
>


-- 
Alex Kiernan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178188): 
https://lists.openembedded.org/g/openembedded-core/message/178188
Mute This Topic: https://lists.openembedded.org/mt/97477865/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] rust: added missing runtime dependencies to run rust on target

2023-03-08 Thread Sundeep KOKKONDA
[YOCTO #14975]
rust files are not linking on target due to missing dependencies and observed 
below error.
error: linker `x86_64-poky-linux-gcc` not found

Added the required dependencies to run rust on target machine.

Signed-off-by: Sundeep KOKKONDA 
---
 meta/recipes-devtools/rust/rust_1.67.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust_1.67.1.bb 
b/meta/recipes-devtools/rust/rust_1.67.1.bb
index 2118faec8f..f4c6d9511d 100644
--- a/meta/recipes-devtools/rust/rust_1.67.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.67.1.bb
@@ -13,6 +13,8 @@ DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
 
 DEPENDS += "rust-llvm (=${PV})"
 
+RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
+
 # Otherwise we'll depend on what we provide
 INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
 # We don't need to depend on gcc-native because yocto assumes it exists
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178186): 
https://lists.openembedded.org/g/openembedded-core/message/178186
Mute This Topic: https://lists.openembedded.org/mt/97477865/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-