Skip to contentSkip to conversation

openjdk-build-helper: fix arm64 build

PATCH In review Jerome Brunet 2 participants 5 messages Oct 22, 2021 – Nov 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openjdk-build-helper: fix arm64 build

When trying to build for an arm64 machine, such as qemuarm64, parsing of the recipes fails with the following messages:

WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Exception during build_dependencies for LLVM_CONFIGURE_ARCH
WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Error during finalise of /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
ERROR: ExpansionError during parsing /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
Traceback (most recent call last):
File "Var <LLVM_CONFIGURE_ARCH>", line 1, in <module>
File "/meta-java/classes/openjdk-build-helper.bbclass", line 86, in openjdk_build_helper_get_llvm_configure_arch(d=<bb.data_smart.DataSmart object at 0x7f08fed017c0>):
else:
> if 'shark' in d.getVar('PACKAGECONFIG').split():
bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
bb.data_smart.ExpansionError: Failure expanding variable LLVM_CONFIGURE_ARCH, expression was ${@openjdk_build_helper_get_llvm_configure_arch(d)} which triggered exception AttributeError: 'NoneType' object has no attribute 'split'

Using 'bb.utils.contains' solves the problem.

---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/openjdk-build-helper.bbclass +1 -1
index 4e334c26c166..5f838b4f8a17 100644
@@ -83,7 +83,7 @@ def openjdk_build_helper_get_llvm_configure_arch(d):
     elif arch == "arm":
         arch = "arm"
     else:
-        if 'shark' in d.getVar('PACKAGECONFIG').split():
+        if bb.utils.contains('PACKAGECONFIG', 'shark', True, False, d):
             bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
 
     return arch
Signature · 1 line
2.33.0
#1 lore raw

Hi Jerome,

thanks for the patch! I've just applied it to master-next and if everything goes well it will be merged to master after some testing.
If you want to see it backported to other branches please let me know!

lg;rl

Quoted 37 lines · Jerome Brunet via lists.openembedded.org

When trying to build for an arm64 machine, such as qemuarm64, parsing of the recipes fails with the following messages:

WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Exception during build_dependencies for LLVM_CONFIGURE_ARCH
WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Error during finalise of /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
ERROR: ExpansionError during parsing /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
Traceback (most recent call last):
File "Var <LLVM_CONFIGURE_ARCH>", line 1, in <module>
File "/meta-java/classes/openjdk-build-helper.bbclass", line 86, in openjdk_build_helper_get_llvm_configure_arch(d=<bb.data_smart.DataSmart object at 0x7f08fed017c0>):
else:
> if 'shark' in d.getVar('PACKAGECONFIG').split():
bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
bb.data_smart.ExpansionError: Failure expanding variable LLVM_CONFIGURE_ARCH, expression was ${@openjdk_build_helper_get_llvm_configure_arch(d)} which triggered exception AttributeError: 'NoneType' object has no attribute 'split'

Using 'bb.utils.contains' solves the problem.

---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/openjdk-build-helper.bbclass +1 -1
index 4e334c26c166..5f838b4f8a17 100644
@@ -83,7 +83,7 @@ def openjdk_build_helper_get_llvm_configure_arch(d):
     elif arch == "arm":
         arch = "arm"
     else:
-        if 'shark' in d.getVar('PACKAGECONFIG').split():
+        if bb.utils.contains('PACKAGECONFIG', 'shark', True, False, d):
             bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
 
     return arch
Signature · 1 line
2.33.0
#2 lore raw
Quoted 5 lines · Richard Leitner - SKIDATA

Hi Jerome,

thanks for the patch! I've just applied it to master-next and if everything goes well it will be merged to master after some testing.
If you want to see it backported to other branches please let me know!

It would be great to have an hardknott branch and have it on it. Having an hardknott branch would help with override syntax change coming with honister

Quoted 41 lines

lg;rl

Quoted 37 lines · Jerome Brunet via lists.openembedded.org

When trying to build for an arm64 machine, such as qemuarm64, parsing of the recipes fails with the following messages:

WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Exception during build_dependencies for LLVM_CONFIGURE_ARCH
WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Error during finalise of /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
ERROR: ExpansionError during parsing /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb
Traceback (most recent call last):
File "Var <LLVM_CONFIGURE_ARCH>", line 1, in <module>
File "/meta-java/classes/openjdk-build-helper.bbclass", line 86, in openjdk_build_helper_get_llvm_configure_arch(d=<bb.data_smart.DataSmart object at 0x7f08fed017c0>):
else:
> if 'shark' in d.getVar('PACKAGECONFIG').split():
bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
bb.data_smart.ExpansionError: Failure expanding variable LLVM_CONFIGURE_ARCH, expression was ${@openjdk_build_helper_get_llvm_configure_arch(d)} which triggered exception AttributeError: 'NoneType' object has no attribute 'split'

Using 'bb.utils.contains' solves the problem.

---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
classes/openjdk-build-helper.bbclass +1 -1
index 4e334c26c166..5f838b4f8a17 100644
@@ -83,7 +83,7 @@ def openjdk_build_helper_get_llvm_configure_arch(d):
     elif arch == "arm":
         arch = "arm"
     else:
-        if 'shark' in d.getVar('PACKAGECONFIG').split():
+        if bb.utils.contains('PACKAGECONFIG', 'shark', True, False, d):
             bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) );
 
     return arch
Signature · 1 line
2.33.0
#3 lore raw
Quoted 5 lines · Jerome Brunet
Quoted 2 lines · Richard Leitner - SKIDATA

Hi Jerome,

Quoted 7 lines
Quoted 3 lines

thanks for the patch! I've just applied it to master-next and if everything goes well it will be merged to master after some testing.
If you want to see it backported to other branches please let me know!

It would be great to have an hardknott branch and have it on it. Having an hardknott branch would help with override syntax change coming with honister

I've just created a hardknott branch with the same head as master. As soon I've tested master-next I'll also add it to hardknott.

regards;rl

#4 lore raw
Quoted 10 lines · Richard Leitner - SKIDATA
Quoted 9 lines · Jerome Brunet
Quoted 5 lines · Richard Leitner - SKIDATA

Hi Jerome,

thanks for the patch! I've just applied it to master-next and if everything goes well it will be merged to master after some testing.
If you want to see it backported to other branches please let me know!

Quoted 8 lines
Quoted 3 lines

It would be great to have an hardknott branch and have it on it. Having an hardknott branch would help with override syntax change coming with honister

I've just created a hardknott branch with the same head as master. As soon I've tested master-next I'll also add it to hardknott.

regards;rl

Awesome !

Thanks a lot