* [PATCH] base: Fix HOST_ARCH for native builds
@ 2023-09-18 8:04 Jan Kiszka
2023-09-21 5:57 ` Uladzimir Bely
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2023-09-18 8:04 UTC (permalink / raw)
To: isar-users; +Cc: Moessbauer, Felix (T CED SES-DE)
From: Jan Kiszka <jan.kiszka@siemens.com>
HOST_ARCH must be DISTRO_ARCH when we are not cross-building. Otherwise,
recipes that set PACKAGE_ARCH to it will fail in native builds.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Affects specifically the starfive packages.
meta/classes/base.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 88004120..f315a9d5 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -49,13 +49,15 @@ def oe_import(d):
# We need the oe module name space early (before INHERITs get added)
OE_IMPORTED := "${@oe_import(d)}"
-def get_deb_host_arch():
+def get_deb_host_arch(d):
import subprocess
+ if d.getVar("ISAR_CROSS_COMPILE") != "1":
+ return d.getVar("DISTRO_ARCH")
host_arch = subprocess.check_output(
["dpkg", "--print-architecture"]
).decode('utf-8').strip()
return host_arch
-HOST_ARCH ??= "${@get_deb_host_arch()}"
+HOST_ARCH ??= "${@get_deb_host_arch(d)}"
HOST_DISTRO ??= "${DISTRO}"
die() {
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] base: Fix HOST_ARCH for native builds
2023-09-18 8:04 [PATCH] base: Fix HOST_ARCH for native builds Jan Kiszka
@ 2023-09-21 5:57 ` Uladzimir Bely
2023-09-21 10:36 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Uladzimir Bely @ 2023-09-21 5:57 UTC (permalink / raw)
To: Jan Kiszka, isar-users; +Cc: Moessbauer, Felix (T CED SES-DE)
[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]
On Mon, 2023-09-18 at 10:04 +0200, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> HOST_ARCH must be DISTRO_ARCH when we are not cross-building.
> Otherwise,
> recipes that set PACKAGE_ARCH to it will fail in native builds.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Affects specifically the starfive packages.
>
> meta/classes/base.bbclass | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 88004120..f315a9d5 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -49,13 +49,15 @@ def oe_import(d):
> # We need the oe module name space early (before INHERITs get added)
> OE_IMPORTED := "${@oe_import(d)}"
>
> -def get_deb_host_arch():
> +def get_deb_host_arch(d):
> import subprocess
> + if d.getVar("ISAR_CROSS_COMPILE") != "1":
> + return d.getVar("DISTRO_ARCH")
> host_arch = subprocess.check_output(
> ["dpkg", "--print-architecture"]
> ).decode('utf-8').strip()
> return host_arch
> -HOST_ARCH ??= "${@get_deb_host_arch()}"
> +HOST_ARCH ??= "${@get_deb_host_arch(d)}"
> HOST_DISTRO ??= "${DISTRO}"
>
> die() {
> --
> 2.35.3
>
With this patch CI fails in several tests at parsing stage in case few
"too different" multiconfigs are built in parallel:
For example, ReproTest.test_repro_unsigned:
```
[stdout] ERROR: /workspace/build/isar_ub_devel/317/meta-isar/recipes-
core/images/isar-image-debug.bb: Overrides could not be expanded into a
stable state after 5 iterations, overrides must be being referenced by
other overridden variables in some recursive fashion. Please provide
your configuration to bitbake-devel so we can laugh, er, I mean try and
understand how to make it work.
[stdlog] 2023-09-20 14:06:26,962 avocado.app ERROR| ERROR:
/workspace/build/isar_ub_devel/317/meta-isar/recipes-core/images/isar-
image-debug.bb: Overrides could not be expanded into a stable state
after 5 iterations, overrides must be being referenced by other
overridden variables in some recursive fashion. Please provide your
configuration to bitbake-devel so we can laugh, er, I mean try and
understand how to make it work.
```
I'm attaching kas config that easy reproduces the issue. When changed
"refspec" to "next", it works.
[-- Attachment #2: fix-host-arch-issue.yml --]
[-- Type: application/x-yaml, Size: 549 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] base: Fix HOST_ARCH for native builds
2023-09-21 5:57 ` Uladzimir Bely
@ 2023-09-21 10:36 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2023-09-21 10:36 UTC (permalink / raw)
To: Uladzimir Bely, isar-users; +Cc: Moessbauer, Felix (T CED SES-DE)
On 21.09.23 07:57, Uladzimir Bely wrote:
> On Mon, 2023-09-18 at 10:04 +0200, 'Jan Kiszka' via isar-users wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> HOST_ARCH must be DISTRO_ARCH when we are not cross-building.
>> Otherwise,
>> recipes that set PACKAGE_ARCH to it will fail in native builds.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> Affects specifically the starfive packages.
>>
>> meta/classes/base.bbclass | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index 88004120..f315a9d5 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -49,13 +49,15 @@ def oe_import(d):
>> # We need the oe module name space early (before INHERITs get added)
>> OE_IMPORTED := "${@oe_import(d)}"
>>
>> -def get_deb_host_arch():
>> +def get_deb_host_arch(d):
>> import subprocess
>> + if d.getVar("ISAR_CROSS_COMPILE") != "1":
>> + return d.getVar("DISTRO_ARCH")
>> host_arch = subprocess.check_output(
>> ["dpkg", "--print-architecture"]
>> ).decode('utf-8').strip()
>> return host_arch
>> -HOST_ARCH ??= "${@get_deb_host_arch()}"
>> +HOST_ARCH ??= "${@get_deb_host_arch(d)}"
>> HOST_DISTRO ??= "${DISTRO}"
>>
>> die() {
>> --
>> 2.35.3
>>
>
> With this patch CI fails in several tests at parsing stage in case few
> "too different" multiconfigs are built in parallel:
>
> For example, ReproTest.test_repro_unsigned:
>
> ```
> [stdout] ERROR: /workspace/build/isar_ub_devel/317/meta-isar/recipes-
> core/images/isar-image-debug.bb: Overrides could not be expanded into a
> stable state after 5 iterations, overrides must be being referenced by
> other overridden variables in some recursive fashion. Please provide
> your configuration to bitbake-devel so we can laugh, er, I mean try and
> understand how to make it work.
> [stdlog] 2023-09-20 14:06:26,962 avocado.app ERROR| ERROR:
> /workspace/build/isar_ub_devel/317/meta-isar/recipes-core/images/isar-
> image-debug.bb: Overrides could not be expanded into a stable state
> after 5 iterations, overrides must be being referenced by other
> overridden variables in some recursive fashion. Please provide your
> configuration to bitbake-devel so we can laugh, er, I mean try and
> understand how to make it work.
> ```
>
> I'm attaching kas config that easy reproduces the issue. When changed
> "refspec" to "next", it works.
>
>
Using d.getVar("ISAR_CROSS_COMPILE", expand=False) seems to break that
cycle. Now someone just needs to explain to me, why that helps - and if
it actually helps.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-21 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18 8:04 [PATCH] base: Fix HOST_ARCH for native builds Jan Kiszka
2023-09-21 5:57 ` Uladzimir Bely
2023-09-21 10:36 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox