rust-cross-* imported from meta-rust has incorrect signatures, depending on MACHINEOVERRIDES making it effectively MACHINE_ARCH as shown by sstate-diff-machines.sh: oe-core$ openembedded-core/scripts/sstate-diff-machines.sh --tmpdir=tmp-glibc --machines="qemux86 qemux86copy qemuarm" --targets=rust-cross-i686 --analyze === Comparing signatures for task do_populate_sysroot.sigdata between qemux86 and qemux86copy === ERROR: rust-cross-i686 different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy NOTE: Reconnecting to bitbake server... Hash for dependent task rust/rust-cross_1.54.0.bb:do_install changed from 37177b89e1a76ec6909e82b96628d18981e1364707419717bff49b778eba04b6 to b7291126cd73c139372aa5fa32fa78be1882005ac62110513dec609d30fbb2ba Unable to find matching sigdata for /OE/build/oe-core/meta-rust/recipes-devtools/rust/rust-cross_1.54.0.bb:do_install with hashes 37177b89e1a76ec6909e82b96628d18981e1364707419717bff49b778eba04b6 or b7291126cd73c139372aa5fa32fa78be1882005ac62110513dec609d30fbb2ba ... ERROR: 2 issues were found in these recipes: rust-cross-i686 INFO: Output written in: /OE/build/oe-core/tmp-glibc/sstate-diff/1633081880 oe-core$ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1633081880/qemu*/*/rust-cross*/*do_rust_gen_targets* NOTE: Reconnecting to bitbake server... basehash changed from ece96c782bdfbeaabfb3e9c7e30e4713afa1ed4f1f208f3adcbf0f10f1c25114 to 87bc2d064dc9b7cdd6d91598f8660238ef345385ac4df7474edf918223e6e779 Variable MACHINE value changed from 'qemux86copy' to 'qemux86' Variable MACHINEOVERRIDES value changed: @@ -1,3 +1,3 @@ -${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE}:qemux86 +${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE} TUNE_FEATURES{m32} = Set TUNE_FEATURES{mx32} = Unset Just dropping the suspiciously looking MACHINEOVERRIDES from meta/classes/rust-common.bbclass and meta/recipes-devtools/rust/rust-common.inc isn't as easy, because it was introduced in: https://github.com/meta-rust/meta-rust/commit/186ec59085be9282ad56541356b7e3d3609e5075 https://github.com/meta-rust/meta-rust/commit/cb4f8294d4b2037e80ff772c985f5ee370e7c956 because of this oe-core change in warrior: https://github.com/openembedded/openembedded-core/commit/ac83d22eb5031f7fdd09d34a1a46d92fd3e39a3c and the reason is still valid, e.g. for qemuarm: $ grep TUNE_FEATURES= env.rust-cross-arm TUNE_FEATURES="arm vfp cortexa15 neon thumb callconvention-hard" $ grep MACHINEOVERRIDES= env.rust-cross-arm MACHINEOVERRIDES="qemuall:armv7ve:qemuarm" Some other way to detect v7 target should be implemented and now when it's in oe-core and doesn't need the backwards compatibility with pre-warrior releases, we probably don't need to look at both TUNE_FEATURES and MACHINEOVERRIDES when doing that.
Martin, thanks for creating the defect; assigning to Naveen.
I had a look into this. The dependency comes through TARGET_LLVM_FEATURES which is dependent both on TUNE_FEATURES and MACHINEOVERRIDES. The simplest way to handle this is to make llvm-cross tune specific, i.e. add PACKAGE_ARCH to the PN for rust-cross. That is pretty horrible but is effectively what already happens today. That should already be visible in rust-cross rebuilding if you switch between two different machines with different tunes.
Note that PACKAGE_ARCH is probaby good enough since the machine specific info that the code is gaining from MACHINEOVERRIDES is probably already reflected in PACKAGE_ARCH. That does mean MACHINEOVERRIDES probably should be excluded from the hash with: llvm_features_from_tune[vardepsexclude] += "MACHINEOVERRIDES" I am nervous of this though as it would be very easy to break that function to be machine specific. I'd suggest a note warning about this in the function where MACHINEOVERRIDES is used.
This was partially fixed by https://git.openembedded.org/openembedded-core/commit/?id=72d67410e92207a98a801ddf0cb9f1297a752975 and https://git.openembedded.org/openembedded-core/commit/?id=33be44a02beb7c52f075f660ad8e0641e360011c The later missing in honister. And is no longer reproducible with qemux86 and qemux86copy, but it's still not fixed completely. It seems that to reproduce it you need to use 2 MACHINEs with the same architecture, but different DEFAULTTUNE. I'll try to prepare such reproducer with oe-core only. Bellow is reproducer with LuneOS where I was seeing it, but there is something strange going on, so wait for oe-core reproducer. e.g. I'm seeing it with rust-cross-arm-glibc for raspberrypi2 and mako or rust-cross-aarch64-glibc for tissot and raspberrypi3-64 (mako and tissot are from meta-smartphone layers, raspberrypi* from meta-raspberrypi, but it should be possible to reproduced on qemuarm and some qemuarmcopy with modified DEFAULTTUNE. Now the difference seems to be caused by dependency on target gcc-runtime: OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ ls tmp-glibc/sstate-diff/1635856309/[tr]*/*/rust-cross-aarch64-glibc/*do_configure* tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/x86_64-linux/rust-cross-aarch64-glibc/1.56.0-r0.do_configure.sigdata.11d20df50dc0420ff3ba5881688c4372824c6bf6e4c7f952486de04220c1f660 tmp-glibc/sstate-diff/1635856309/tissot/x86_64-linux/rust-cross-aarch64-glibc/1.56.0-r0.do_configure.sigdata.757af34bcb0e150e74bc6fffb939b6b847d645ea75bf7fb4b9c08831d06e3444 OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/*/rust-cross-aarch64-glibc/*do_configure* NOTE: Starting bitbake server... Hash for dependent task rust/rust-cross_1.56.0.bb:do_rust_create_wrappers changed from 92fc4e5ed9a0ddd682673f1a7a4e1dadef2a87cd8716e45a35e5a449d79baceb to 972257d92dd468c91cd47d7ec572113502abaf766f2a864f76ea65a7b06f782b Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/rust/rust-cross_1.56.0.bb:do_rust_create_wrappers with hashes 92fc4e5ed9a0ddd682673f1a7a4e1dadef2a87cd8716e45a35e5a449d79baceb or 972257d92dd468c91cd47d7ec572113502abaf766f2a864f76ea65a7b06f782b OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/*/rust-cross-aarch64-glibc/*do_rust_create* NOTE: Starting bitbake server... Hash for dependent task rust/rust-cross_1.56.0.bb:do_prepare_recipe_sysroot changed from 715ab3b31e87de9a020bd6ea60eb60e803b43d0cd957c693c1bf7ba32076e4be to 3cbbc622aae78529fd6d4ab25ef7182533c9bd8f21713ff23b06048ab5e64869 Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/rust/rust-cross_1.56.0.bb:do_prepare_recipe_sysroot with hashes 715ab3b31e87de9a020bd6ea60eb60e803b43d0cd957c693c1bf7ba32076e4be or 3cbbc622aae78529fd6d4ab25ef7182533c9bd8f21713ff23b06048ab5e64869 OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/*/rust-cross-aarch64-glibc/*do_prepare_recipe* NOTE: Starting bitbake server... Hash for dependent task gcc/gcc-runtime_11.2.bb:do_populate_sysroot changed from 23822baa21858948c90ce579b9d45aedc7b7063b0d2ee234038b41cdd6297f6b to b43f9e165b288312bc2365afee793be12ea527015fea9ea8f287ad3be2734529 Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_11.2.bb:do_populate_sysroot with hashes 23822baa21858948c90ce579b9d45aedc7b7063b0d2ee234038b41cdd6297f6b or b43f9e165b288312bc2365afee793be12ea527015fea9ea8f287ad3be2734529 not sure why I have 4 gcc-runtime signatures now: OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ ls tmp-glibc/sstate-diff/1635856309/[tr]*/*/gcc-runtime/*do_populate_sysroot* tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/aarch64-rpi-webos-linux/gcc-runtime/11.2.0-r0.do_populate_sysroot.sigdata.23822baa21858948c90ce579b9d45aedc7b7063b0d2ee234038b41cdd6297f6b tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_populate_sysroot.a06d1dcdeacc8b1f7a8efa97c8195b2873aa3c2d0c571593faeb72801920afb3 tmp-glibc/sstate-diff/1635856309/tissot/aarch64-halium-webos-linux/gcc-runtime/11.2.0-r0.do_populate_sysroot.sigdata.b43f9e165b288312bc2365afee793be12ea527015fea9ea8f287ad3be2734529 tmp-glibc/sstate-diff/1635856309/tissot/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_populate_sysroot.a06d1dcdeacc8b1f7a8efa97c8195b2873aa3c2d0c571593faeb72801920afb3 and why is one of them failing with "zstd: /*stdin*\: unexpected end of file": OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ ls tmp-glibc/sstate-diff/1635856309/[tr]*/*/gcc-runtime/*do_configure* tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/aarch64-rpi-webos-linux/gcc-runtime/11.2.0-r0.do_configure.sigdata.af1536dbaaf070f986d5e791e42f56d1be59568361147f2e25d8570c00055579 tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_configure.b53c0eb79ab5df24057018411da699caedfa91566ba760c9f86e5a1628d7d24c tmp-glibc/sstate-diff/1635856309/tissot/aarch64-halium-webos-linux/gcc-runtime/11.2.0-r0.do_configure.sigdata.d06db7c98bfba4fad209ba620763b7ef071ba5ecd5ecf627a2b1496b34a9133d tmp-glibc/sstate-diff/1635856309/tissot/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_configure.b53c0eb79ab5df24057018411da699caedfa91566ba760c9f86e5a1628d7d24c OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ ls tmp-glibc/sstate-diff/1635856309/[tr]*/c*/gcc-runtime/*do_configure* tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_configure.b53c0eb79ab5df24057018411da699caedfa91566ba760c9f86e5a1628d7d24c tmp-glibc/sstate-diff/1635856309/tissot/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_configure.b53c0eb79ab5df24057018411da699caedfa91566ba760c9f86e5a1628d7d24c OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/c*/gcc-runtime/*do_configure* NOTE: Starting bitbake server... zstd: /*stdin*\: unexpected end of file ERROR: Process died with 1 sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/core2-64-webos-linux/gcc-runtime/11.2.0-r0.do_configure.b53c0eb79ab5df24057018411da699caedfa91566ba760c9f86e5a1628d7d24c'> The aarch64* one works fine and leads to libgcc *do_fetch* difference: OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ ls tmp-glibc/sstate-diff/1635856309/[tr]*/a*/gcc-runtime/*do_configure* tmp-glibc/sstate-diff/1635856309/raspberrypi3-64/aarch64-rpi-webos-linux/gcc-runtime/11.2.0-r0.do_configure.sigdata.af1536dbaaf070f986d5e791e42f56d1be59568361147f2e25d8570c00055579 tmp-glibc/sstate-diff/1635856309/tissot/aarch64-halium-webos-linux/gcc-runtime/11.2.0-r0.do_configure.sigdata.d06db7c98bfba4fad209ba620763b7ef071ba5ecd5ecf627a2b1496b34a9133d OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/a*/gcc-runtime/*do_configure* NOTE: Starting bitbake server... Hash for dependent task gcc/gcc-runtime_11.2.bb:do_prepare_recipe_sysroot changed from e055dee0df538c297865e09ef7b8b3f9a3cbfe2d52204a2fa283c656e9280a71 to 61ad4a146f207ae5e3e31fe0756d91954612c4c3e3f4dfdda1ca6a3055a34264 Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_11.2.bb:do_prepare_recipe_sysroot with hashes e055dee0df538c297865e09ef7b8b3f9a3cbfe2d52204a2fa283c656e9280a71 or 61ad4a146f207ae5e3e31fe0756d91954612c4c3e3f4dfdda1ca6a3055a34264 OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/a*/gcc-runtime/*do_prepare_recipe_sysroot* NOTE: Starting bitbake server... Hash for dependent task gcc/libgcc_11.2.bb:do_populate_sysroot changed from 4fbf2d9503c68ea40440aa21d26f2c6ed3e92f5d8451d724f12c1b6425a5f2cb to 861c1bdd8d0212eda012aaa23d74c40674b2f562098270445d14f8da38461abd Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/gcc/libgcc_11.2.bb:do_populate_sysroot with hashes 4fbf2d9503c68ea40440aa21d26f2c6ed3e92f5d8451d724f12c1b6425a5f2cb or 861c1bdd8d0212eda012aaa23d74c40674b2f562098270445d14f8da38461abd OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/a*/libgcc/*do_prepare_recipe_sysroot* NOTE: Starting bitbake server... Hash for dependent task gcc/libgcc_11.2.bb:do_fetch changed from 86efbdc32789829400ba0ce67230928644c9fa03faae89120e666786a05df1b4 to 9629ddae808b9310ae02f5166e84ab9962c3a8b3f9680a98b5eede2ce7d1acc4 Unable to find matching sigdata for /OE/build/luneos-kirkstone/webos-ports/openembedded-core/meta/recipes-devtools/gcc/libgcc_11.2.bb:do_fetch with hashes 86efbdc32789829400ba0ce67230928644c9fa03faae89120e666786a05df1b4 or 9629ddae808b9310ae02f5166e84ab9962c3a8b3f9680a98b5eede2ce7d1acc4 OE qemux86-64@luneos /OE/build/luneos-kirkstone/webos-ports $ bitbake-diffsigs tmp-glibc/sstate-diff/1635856309/[tr]*/a*/libgcc/*do_fetch* NOTE: Starting bitbake server... basehash changed from ded79fe0ed89112cf6f4a7bd4ae1f332ed65e6ea9611652063bc907571b3c521 to 40b3d87cc5393e4f37896b29071081b455f33d6bfe23ff814cb67cd462247fa2 Variable TUNE_CCARGS value changed from ' -march=armv8-a+crc+crypto' to ''
The reproducer in oe-core shows the same: openembedded-core$ cat meta/conf/machine/qemuarm64copy.conf require conf/machine/qemuarm64.conf MACHINEOVERRIDES .= ":qemuarm64" # qemuarm64 uses cortexa57, use cortexa57-crypto here DEFAULTTUNE = "cortexa57-crypto" oe-core$ openembedded-core/scripts/sstate-diff-machines.sh --tmpdir=tmp-glibc --machines="qemuarm64 qemuarm64copy qemuarm" --targets=rust-cross-aarch64-glibc --analyze === Comparing signatures for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy === ERROR: gcc-runtime different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task gcc/gcc-runtime_11.2.bb:do_install changed from 21a33681242e2ef212f715f71a7d173902df34ab3d2963f6a7e3b935f02a6dc0 to 536a6e24135f51b71bfc88cb9b78a76a7b214633e3cca2daf448e7e5c08323df Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_11.2.bb:do_install with hashes 21a33681242e2ef212f715f71a7d173902df34ab3d2963f6a7e3b935f02a6dc0 or 536a6e24135f51b71bfc88cb9b78a76a7b214633e3cca2daf448e7e5c08323df ERROR: glibc different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task glibc/glibc_2.34.bb:do_stash_locale changed from 54089c26230062be319ab167cac3ba4ee07c4de81ccb2a3abe11bc1e1dd90d0e to 4fe1fdd6c4589ac85e394864520157259a5398e2cb299e3e04a9363769b2115e Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-core/glibc/glibc_2.34.bb:do_stash_locale with hashes 54089c26230062be319ab167cac3ba4ee07c4de81ccb2a3abe11bc1e1dd90d0e or 4fe1fdd6c4589ac85e394864520157259a5398e2cb299e3e04a9363769b2115e ERROR: libgcc different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task gcc/libgcc_11.2.bb:do_multilib_install changed from ab29f3094237c8fcc0d4223d396c351e9d5d9230ec9254f116dd87378c779fee to e0a1774c04724afc715cdc4c1bbcc20ce8045b74651aa7d2c7692739b44bc281 Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/libgcc_11.2.bb:do_multilib_install with hashes ab29f3094237c8fcc0d4223d396c351e9d5d9230ec9254f116dd87378c779fee or e0a1774c04724afc715cdc4c1bbcc20ce8045b74651aa7d2c7692739b44bc281 ERROR: libgcc-initial different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task gcc/libgcc-initial_11.2.bb:do_multilib_install changed from 0a8b521a9acde99bc42b31959398408ffd4feebe0372ffc37ea1138e8d0ff3e5 to a20a196e43c240fe1a2c43415265b49ac62fa02928489f2005a5a5ccc4507500 Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/libgcc-initial_11.2.bb:do_multilib_install with hashes 0a8b521a9acde99bc42b31959398408ffd4feebe0372ffc37ea1138e8d0ff3e5 or a20a196e43c240fe1a2c43415265b49ac62fa02928489f2005a5a5ccc4507500 ERROR: linux-libc-headers different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task linux-libc-headers/linux-libc-headers_5.14.bb:do_install changed from a32a68b4aa52d7beb73536c6e20c76b1fd839742716c841300656c622e6b0a71 to d66d807b58a2a8e4562dc862d6145f2624f3718119bd319b2b834fc6bf075095 Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.14.bb:do_install with hashes a32a68b4aa52d7beb73536c6e20c76b1fd839742716c841300656c622e6b0a71 or d66d807b58a2a8e4562dc862d6145f2624f3718119bd319b2b834fc6bf075095 ERROR: rust-cross-aarch64-glibc different signature for task do_populate_sysroot.sigdata between qemuarm64 and qemuarm64copy NOTE: Reconnecting to bitbake server... Hash for dependent task rust/rust-cross_1.56.0.bb:do_install changed from 7c6f27aa3bbc962909be3f107e9a13838537a862c91fb7a8e6b466f5df709256 to 2435df4c2b1722f6f8e7d3a2ccb36ca2e6e0542b4d875aafa8122e5d5359d52d Unable to find matching sigdata for /OE/build/oe-core/openembedded-core/meta/recipes-devtools/rust/rust-cross_1.56.0.bb:do_install with hashes 7c6f27aa3bbc962909be3f107e9a13838537a862c91fb7a8e6b466f5df709256 or 2435df4c2b1722f6f8e7d3a2ccb36ca2e6e0542b4d875aafa8122e5d5359d52d ERROR: 6 errors found in /OE/build/oe-core/tmp-glibc/sstate-diff/1635863372/signatures.qemuarm64copy.do_populate_sysroot.sigdata.log
Can we append "TUNE_PKGARCH" to the PN as:- PN = "rust-cross-${TARGET_ARCH}-${TCLIBC}-${TUNE_PKGARCH}" It should then pick the exact TUNE_FEATURES and fix it.
Posted the patch as:- https://lists.openembedded.org/g/openembedded-core/message/158292
Committed as:- https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=b522aca87b52211c8b3355d3c04ae3e5aab1a837 Please let me know whether this issue can be resolved?
Martin can re-open if needed.