All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Peter Bergin <peter@berginkonsult.se>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 2/2] oeqa/sdk: extend rust test to also use a build script
Date: Thu, 25 Aug 2022 09:21:26 +0100	[thread overview]
Message-ID: <af63da104ec9d91ab441d3cabfaadfe4700760fa.camel@linuxfoundation.org> (raw)
In-Reply-To: <f7469b7e-7df2-e418-6da0-7427bbdc8cfd@berginkonsult.se>

Hi Peter,

On Thu, 2022-08-25 at 09:17 +0200, Peter Bergin wrote:
> On 2022-08-24 10:52, Richard Purdie wrote:
> > On Tue, 2022-08-23 at 10:56 +0200, Peter Bergin wrote:
> > > The test for rust in the SDK is extended with the simplest
> > > possible build script. This will make use of the host toolchain
> > > for building build.rs before building the rust package for target.
> > > 
> > > Signed-off-by: Peter Bergin <peter@berginkonsult.se>
> > > ---
> > >   meta/lib/oeqa/sdk/files/rust/hello/build.rs | 3 +++
> > >   1 file changed, 3 insertions(+)
> > >   create mode 100644 meta/lib/oeqa/sdk/files/rust/hello/build.rs
> > > 
> > > diff --git a/meta/lib/oeqa/sdk/files/rust/hello/build.rs b/meta/lib/oeqa/sdk/files/rust/hello/build.rs
> > > new file mode 100644
> > > index 00000000000..b1a533d5dfa
> > > --- /dev/null
> > > +++ b/meta/lib/oeqa/sdk/files/rust/hello/build.rs
> > > @@ -0,0 +1,3 @@
> > > +/* This is the simplest build script just to invoke host compiler
> > > +   in the build process. */
> > > +fn main() {}
> > This seemed to break everywhere :(
> Not good. :-|
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/5773/steps/13/logs/stdio
> > 
> > and many others.
> 
> I've tried locally to reproduce something. I've built and tested 
> genericx86 and qemuarm64 now on core-image-sato sdk that I saw was the 
> target for the autobuilder. Both tests passes. The failure I see in the 
> autobuilder logs is that the build script can not be executed. On my 
> machine I have that file and it can clearly be executed:
> 
> $ find 
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/ 
> -name build-script-build
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/debug/build/hello-4dbf26d86b93a892/build-script-build 
> 
> $ 
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/debug/build/hello-4dbf26d86b93a892/build-script-build 
> 
> $ file 
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/debug/build/hello-4dbf26d86b93a892/build-script-build 
> 
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/debug/build/hello-4dbf26d86b93a892/build-script-build: 
> ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically 
> linked, interpreter 
> /storage/yocto/esp5-platform/build/genericx86/tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2, 
> BuildID[sha1]=c5d5e70657f8342addf5343d0206c77d9d767fd8, for GNU/Linux 
> 3.2.0, with debug_info, not stripped
> 
> Found one interesting link here 
> https://github.com/rust-lang/cargo/issues/3553. Unfortunately without 
> answer. But also checked the interpreter in my build which looks correct?
> 
> $ readelf -a 
> tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/hello/target/debug/build/hello-4dbf26d86b93a892/build-script-build 
> > grep interpreter
>        [Requesting program interpreter: 
> /storage/yocto/esp5-platform/build/genericx86/tmp/work/genericx86-poky-linux/core-image-sato/1.0-r0/testimage-sdk/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2] 
> 
> 
> So there are some differences between my machine and the autobuilder 
> setup that I can't get. I would need help here as I'm not that familiar 
> with the autobuilder setup. Can it still be some host dependency? I'm 
> running on Ubuntu 22.04. Is it possible to check in a autobuilder setup 
> if the file 'build-script-build' is present and possible to execute?

After staring at this for an hour, I think the pattern is that is it
failing on builds with:

SDKMACHINE = "i686"

which probably means the linker isn't linking against the libc and
loader in the SDK properly.

(i686 SDK binaries should run on x86_64 hosts since we provide our own
loader and libc)

Cheers,

Richard



  reply	other threads:[~2022-08-25  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  8:56 [PATCH 1/2] packagegroup-rust-cross-canadian: add native compiler environment Peter Bergin
2022-08-23  8:56 ` [PATCH 2/2] oeqa/sdk: extend rust test to also use a build script Peter Bergin
2022-08-24  8:52   ` [OE-core] " Richard Purdie
2022-08-25  7:17     ` Peter Bergin
2022-08-25  8:21       ` Richard Purdie [this message]
2022-08-25 12:03         ` Peter Bergin
2022-08-25 15:25           ` Richard Purdie
2022-08-29 11:09             ` Peter Bergin
2022-09-02 13:33               ` Richard Purdie
     [not found]               ` <17110E74E03CD5FD.12033@lists.openembedded.org>
2022-09-02 13:58                 ` Richard Purdie
2022-09-03  8:22                   ` Peter Bergin
2022-08-23 11:49 ` [OE-core] [PATCH 1/2] packagegroup-rust-cross-canadian: add native compiler environment Otavio Salvador

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=af63da104ec9d91ab441d3cabfaadfe4700760fa.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter@berginkonsult.se \
    /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 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.