From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Deepesh Varatharajan <deepesh.varatharajan@windriver.com>,
Khem Raj <raj.khem@gmail.com>, Ross Burton <ross.burton@arm.com>
Cc: openembedded-core@lists.openembedded.org, Sundeep.Kokkonda@windriver.com
Subject: Re: [OE-core] [PATCH V3 1/2] rust: Use clang instead of rust-llvm
Date: Fri, 10 Oct 2025 10:36:20 +0100 [thread overview]
Message-ID: <7e0eafcdb3e14505c20fd86e7e4c46aaf944e9e4.camel@linuxfoundation.org> (raw)
In-Reply-To: <c92e491f-6348-4c73-b899-c28611a5f803@windriver.com>
On Fri, 2025-10-10 at 14:57 +0530, Deepesh Varatharajan wrote:
>
> As you suggested, I was able to resolve the missing library issue by
> creating symlinks from the native sysroot to the target sysroot.
> However, I'm now encountering a linker error during the build:
>
> ../poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/rust/1.90.0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/15.2.0/ld:
> ../poky/build/tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/rust/1.90.0/sources/rustc-1.90.0-src/build/x86_64-unknown-linux-gnu/stage1-rustc/armv7-poky-linux-gnueabihf/release/deps/librustc_llvm-3e591ab97f1ae683.rlib:
>
> error adding symbols: file format not recognized
> > collect2: error: ld returned 1 exit status
>
> Upon investigation, I found that the issue stems from architecture
> mismatches within "librustc_llvm-3e591ab97f1ae683.rlib". I extracted
> the object files from this archive and ran the file command to inspect
> them. Most object files were correctly built for the ARM 32-bit (target):
> ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with
> debug_info, not stripped
>
> However, some of the object files (originating from the symlinked native
> sysroot libraries) were built for the host architecture (x86_64):
> ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
>
> This mixture of architectures in a single .rlib is causing the linker to
> fail, and confirms that symlinking missing libraries
> from the native sysroot won't work. So to resolve the issue we've left
> with only one option to build llvm target also for all
> the architectures as we build for native llvm build.
>
> Please let me know if you’re okay with this approach, and I can proceed
> with sending the patch.
Thanks for trying that, I think it was worth trying and it is shame it
didn't quite work out. I agree with proceeding with the other
direction, thanks.
Cheers,
Richard
next prev parent reply other threads:[~2025-10-10 9:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 10:24 [PATCH V3 1/2] rust: Use clang instead of rust-llvm Deepesh.Varatharajan
2025-09-26 10:24 ` [PATCH V3 2/2] rust: Drop rust-llvm Deepesh.Varatharajan
2025-09-26 16:50 ` [OE-core] [PATCH V3 1/2] rust: Use clang instead of rust-llvm Khem Raj
2025-09-29 10:17 ` Deepesh Varatharajan
2025-09-26 17:30 ` Khem Raj
2025-09-29 8:29 ` Deepesh Varatharajan
2025-10-01 19:29 ` Khem Raj
2025-10-07 11:10 ` Deepesh Varatharajan
2025-10-07 20:17 ` Khem Raj
2025-10-08 12:49 ` Deepesh Varatharajan
2025-10-08 12:54 ` Richard Purdie
2025-10-10 9:27 ` Deepesh Varatharajan
2025-10-10 9:36 ` Richard Purdie [this message]
2025-09-29 8:11 ` Mathieu Dubois-Briand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e0eafcdb3e14505c20fd86e7e4c46aaf944e9e4.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=deepesh.varatharajan@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=ross.burton@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox