All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] llvm: add PACKAGECONFIG[optviewer]
@ 2022-06-22 20:47 Luca Ceresoli
  2022-06-26  9:51 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Ceresoli @ 2022-06-22 20:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Markus Volk, Stefan Herbrechtsmeier, Luca Ceresoli

Currently the CMake configuration for llvm finds the python pygments and
pyyaml if they are installed on the host. This makes builds
non-reproducible across different machines, some having those modules
installed and some others not.

This has been causing a 'reproducible' failure on one of the autobuilders:

  AssertionError: The following deb packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/deb/./core2-64/llvm-dev_14.0.4-r0_amd64.deb
  The following ipk packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/ipk/./core2-64/llvm-dev_14.0.4-r0_core2-64.ipk
  The following rpm packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/rpm/./core2_64/llvm-dev-14.0.4-r0.core2_64.rpm

Fix by adding an explicit PACKAGECONFIG to control the
LLVM_HAVE_OPT_VIEWER_MODULES option in CMake. If unset, it forces CMake to
ignore pygments and pyyaml, no matter it they are available on the host. If
set, it DEPENDS on the pygments and pyyaml modules so that CMake will find
and use them.

Based on suggestions from Stefan and Markus -- thanks.

Proposed-by: "Stefan Herbrechtsmeier" <stefan.herbrechtsmeier-oss@weidmueller.com>
Proposed-by: "Markus Volk" <f_l_k@t-online.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index 67ed1eab00fe..d06341f06388 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -56,6 +56,10 @@ def get_llvm_arch(bb, d, arch_var):
 def get_llvm_host_arch(bb, d):
     return get_llvm_arch(bb, d, 'HOST_ARCH')
 
+PACKAGECONFIG ??= ""
+# if optviewer OFF, force the modules to be not found or the ones on the host would be found
+PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml"
+
 #
 # Default to build all OE-Core supported target arches (user overridable).
 #
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] llvm: add PACKAGECONFIG[optviewer]
  2022-06-22 20:47 [PATCH] llvm: add PACKAGECONFIG[optviewer] Luca Ceresoli
@ 2022-06-26  9:51 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2022-06-26  9:51 UTC (permalink / raw)
  To: luca.ceresoli, openembedded-core; +Cc: Markus Volk, Stefan Herbrechtsmeier

On Wed, 2022-06-22 at 22:47 +0200, Luca Ceresoli via
lists.openembedded.org wrote:
> Currently the CMake configuration for llvm finds the python pygments and
> pyyaml if they are installed on the host. This makes builds
> non-reproducible across different machines, some having those modules
> installed and some others not.
> 
> This has been causing a 'reproducible' failure on one of the autobuilders:
> 
>   AssertionError: The following deb packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/deb/./core2-64/llvm-dev_14.0.4-r0_amd64.deb
>   The following ipk packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/ipk/./core2-64/llvm-dev_14.0.4-r0_core2-64.ipk
>   The following rpm packages are missing or different and not in exclusion list: /home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/rpm/./core2_64/llvm-dev-14.0.4-r0.core2_64.rpm
> 
> Fix by adding an explicit PACKAGECONFIG to control the
> LLVM_HAVE_OPT_VIEWER_MODULES option in CMake. If unset, it forces CMake to
> ignore pygments and pyyaml, no matter it they are available on the host. If
> set, it DEPENDS on the pygments and pyyaml modules so that CMake will find
> and use them.
> 
> Based on suggestions from Stefan and Markus -- thanks.
> 
> Proposed-by: "Stefan Herbrechtsmeier" <stefan.herbrechtsmeier-oss@weidmueller.com>
> Proposed-by: "Markus Volk" <f_l_k@t-online.de>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

Just wanted to say thanks for the help on this one, I think we ended up
with a better fix than I'd originally thought we'd have!

It is one less issue to cause problems on the infrastructure too :)

Cheers,

Richard



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-26  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 20:47 [PATCH] llvm: add PACKAGECONFIG[optviewer] Luca Ceresoli
2022-06-26  9:51 ` [OE-core] " Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.