From: richard.purdie@linuxfoundation.org
To: Sundeep KOKKONDA <sundeep.kokkonda@gmail.com>,
openembedded-core@lists.openembedded.org, alex.kanavin@gmail.com
Cc: rwmacleod@gmail.com, umesh.kalappa0@gmail.com,
pgowda.cve@gmail.com, shivams@gmail.com
Subject: Re: [OE-core] [PATCH V4] meta: rust - Bug fix for target definitions returning 'NoneType' for arm
Date: Fri, 20 May 2022 23:02:14 +0100 [thread overview]
Message-ID: <b7357d18166022d50cb688d03bf076bd39d79fb6.camel@linuxfoundation.org> (raw)
In-Reply-To: <16F0CB5E9328617C.25584@lists.openembedded.org>
On Fri, 2022-05-20 at 12:04 +0100, Richard Purdie via
lists.openembedded.org wrote:
> On Fri, 2022-05-20 at 10:56 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > Let me jump in and explain a bit about what I think we need to do here
> > to move forward.
> >
> > With the patch in this series applied, "oe-selftest -r
> > sstatetests.SStateTests.test_sstate_allarch_samesigs" fails. Looking at
> > the test, it sets two different MACHINE values, "qemuarm" and "qemux86-
> > 64". Lets see if we can get more information about what is going on.
> >
> > With MACHINE = "qemux86-64", I run:
> >
> > bitbake adwaita-icon-theme rust-native cargo-native -S none
> >
> > (since adwaita-icon-theme is what is changing when it shouldn't and we
> > suspect a problem with rust-native and cargo-native).
> >
> > This generates a locked-sigs.inc, lets move that to a different
> > location:
> >
> > mv locked-sigs.inc locked-sigs2.inc
> >
> > Now with MACHINE = "qemuarm", I run:
> >
> > bitbake adwaita-icon-theme rust-native cargo-native -S none
> >
> > and we get another locked-sigs.inc.
> >
> > Comparing locked-sigs.inc with locked-sigs2.inc is revealing. I like:
> >
> > meld locked-sigs.inc locked-sigs2.inc
> >
> > but you could use diff too or whatever way you prefer to view
> > differences.
> >
> > adwaita-icon-theme is changing, there are a load of changes from
> > SIGGEN_LOCKEDSIGS_t-core2-64 to SIGGEN_LOCKEDSIGS_t-cortexa15t2hf-neon
> > which isn't surprising. You can see binutils-cross-arm becoming
> > binutils-cross-x86_64 which again, isn't surprising. cargo-native
> > changes which is a worry. rust-native also changes and is the likely
> > cause of our issues, it is furthest down the dependency stack. The
> > tasks which change are:
> >
> > rust-native:do_build
> > rust-native:do_compile
> > rust-native:do_install
> > rust-native:do_populate_sysroot
> > rust-native:do_rust_gen_targets
> >
> > and since the patch is changing do_rust_gen_targets, that is likely our
> > problem.
> >
> > Now we've proven that the signature of that task changes between these
> > two different configs, we need to investigate what the issue is there
> > and bitbake-diffsigs can likely help with that. The idea is that the
> > native recipes should be independent of the target machine choice so
> > that is the issue which now needs to be fixed.
> >
> > I did notice that if you compare qemux86-64 with qemuarm64, you don't
> > see this issue, it only happens with qemuarm. This probably means that
> > some 32 vs 64 bit issue is happening in rust-native.
> >
> > Note I did all of this without actually building anything, just some
> > recipe parses to dump the signatures.
> >
> > Does that help move things forward with the issue?
>
> Since I now had the environment, I help but complete this (taking the
> hashes from the difference between the locked-sigs diff):
>
> $ bitbake-diffsigs tmp/stamps/x86_64-linux/rust-native/1.60.0-r0.do_rust_gen_targets.sigdata.63* tmp/stamps/x86_64-linux/rust-native/1.60.0-r0.do_rust_gen_targets.sigdata.34*
> NOTE: Starting bitbake server...
> basehash changed from 860b8f11b10182dc5b2737f62cdb697477f714adb63eeb4d4b932d67cac8eec2 to 9379e8b9df9696e8056fec7d1534661f34dda073f6d816e241b09a2dff76ae2d
> Variable rust_base_triple value changed:
> @@ -36,4 +36,4 @@
>
>
> # In some cases uname and the toolchain differ on their idea of the arch name
> -TUNE_FEATURES{callconvention-hard} = Set
> +TUNE_FEATURES{callconvention-hard} = Unset
>
> The question now becomes how to fix that since I doubt rust-native
> really does depend on that.
The fix is probably this:
diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass
index 02a538258af..cb811ac5da7 100644
--- a/meta/classes/rust-common.bbclass
+++ b/meta/classes/rust-common.bbclass
@@ -117,8 +117,11 @@ RUST_BUILD_ARCH = "${@oe.rust.arch_to_rust_arch(d.getVar('BUILD_ARCH'))}"
# its likely best to not use the triple suffix due to potential confusion.
RUST_BUILD_SYS = "${@rust_base_triple(d, 'BUILD')}"
+RUST_BUILD_SYS[vardepvalue] = "${RUST_BUILD_SYS}"
RUST_HOST_SYS = "${@rust_base_triple(d, 'HOST')}"
+RUST_HOST_SYS[vardepvalue] = "${RUST_HOST_SYS}"
RUST_TARGET_SYS = "${@rust_base_triple(d, 'TARGET')}"
+RUST_TARGET_SYS[vardepvalue] = "${RUST_TARGET_SYS}"
# wrappers to get around the fact that Rust needs a single
# binary but Yocto's compiler and linker commands have
which makes the sstate signatures depend on the determined values
rather than the ingredients in them (which is usually what we want but
not here).
Cheers,
Richard
next prev parent reply other threads:[~2022-05-20 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 5:59 [PATCH V4] meta: rust - Bug fix for target definitions returning 'NoneType' for arm Sundeep KOKKONDA
2022-05-14 7:16 ` [OE-core] " richard.purdie
2022-05-19 11:11 ` Sundeep KOKKONDA
2022-05-20 9:07 ` Alexander Kanavin
2022-05-20 9:56 ` richard.purdie
[not found] ` <16F0C7AB36B6A2B7.30875@lists.openembedded.org>
2022-05-20 11:04 ` richard.purdie
[not found] ` <16F0CB5E9328617C.25584@lists.openembedded.org>
2022-05-20 22:02 ` richard.purdie [this message]
2022-05-24 10:21 ` Sundeep KOKKONDA
2022-05-24 11:04 ` [OE-core] " richard.purdie
2022-05-24 11:22 ` Sundeep KOKKONDA
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=b7357d18166022d50cb688d03bf076bd39d79fb6.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=pgowda.cve@gmail.com \
--cc=rwmacleod@gmail.com \
--cc=shivams@gmail.com \
--cc=sundeep.kokkonda@gmail.com \
--cc=umesh.kalappa0@gmail.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