summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2023-08-01 10:03:35 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-10 09:18:53 +0100
commit418f1609598d3645d7f8a79fb1599e5c5d9904dc (patch)
tree72d2970ebd974c8a440004e768732eaf398ec740
parentafeb3baa8a28d93845cbbe3fe14cb8a18284588b (diff)
downloadpoky-418f1609598d3645d7f8a79fb1599e5c5d9904dc.tar.gz
multilib.conf: explicitly make MULTILIB_VARIANTS vardeps on MULTILIBS
This patch is to ensure recipes get rebuilt correctly and avoid incorrect sstate cache reuse when toggling multilib. The following steps show one example of such incorrect sstate cache reuse. 1. enable multilib && bitbake <some_image> -c populate_sdk 2. disable multilib && bitbake <some_image> -c populate_sdk The error message is as below: Error: Problem: conflicting requests - nothing provides binutils-cross-canadian-i686 needed by packagegroup-cross-canadian-intel-x86-64-1.0-r0.x86_64_nativesdk - nothing provides gcc-cross-canadian-i686 needed by packagegroup-cross-canadian-intel-x86-64-1.0-r0.x86_64_nativesdk - nothing provides gdb-cross-canadian-i686 needed by packagegroup-cross-canadian-intel-x86-64-1.0-r0.x86_64_nativesdk (try to add '--skip-broken' to skip uninstallable packages) We get this error because packagegroup-cross-canadian recipe is not rebuilt when it should be. Current codes have tracked the dependency to MULTILIB_VARIANTS, as shown in the following chain: RDEPENDS:packagegroup-cross-canadian-intel-x86-64 -> all_multilib_tune_values -> MULTILIB_VARIANTS. However, MULTILIB_VARIANTS cannot automatically depend on MULTILIBS. See some results from 'bitbake-dumpsigs' below: List of dependencies for variable MULTILIB_VARIANTS is ['extend_variants'] Variable MULTILIB_VARIANTS value is ${@extend_variants(d,'MULTILIBS','multilib')} It's obvious that the value of MULTILIB_VARIANTS depend on the value of MULTILIBS, so let's set this dependency manually. (From OE-Core rev: 9f47d8eb51816d16078a23c0cef4d697555f913f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/multilib.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 7f3b9463ef..ef3605a73d 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -2,6 +2,7 @@
2baselib = "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}" 2baselib = "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}"
3 3
4MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" 4MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}"
5MULTILIB_VARIANTS[vardeps] += "MULTILIBS"
5MULTILIB_SAVE_VARNAME = "DEFAULTTUNE TARGET_ARCH TARGET_SYS TARGET_VENDOR" 6MULTILIB_SAVE_VARNAME = "DEFAULTTUNE TARGET_ARCH TARGET_SYS TARGET_VENDOR"
6 7
7MULTILIBS ??= "multilib:lib32" 8MULTILIBS ??= "multilib:lib32"