Message ID | 20220622173251.478588-1-f_l_k@t-online.de |
---|---|
State | New |
Headers | show |
Series | [1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional | expand |
Hi Markus, On Wed, 22 Jun 2022 19:32:50 +0200 "Markus Volk" <f_l_k@t-online.de> wrote: > Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > meta/recipes-devtools/llvm/llvm_git.bb | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb > index 67ed1eab00..b86605cbce 100644 > --- a/meta/recipes-devtools/llvm/llvm_git.bb > +++ b/meta/recipes-devtools/llvm/llvm_git.bb > @@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ > -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ > " > > +PACKAGECONFIG ?= "" > +PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml" > + I have been working on a different version of this patch earlier today based on the discussion on this mailing list. Now it completed testing on my machine and I have run a build on the autobuilders: https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/1049 My approach was slightly different, but not dramatically. I wrote a more informative commit message though. I'm sending my patch to have both out so that we can find which is the best one.
Hi Luca, your commit message is way better than mine. One suggestion on your patch. I guess to be working on the target it would be needed to add python3-pygment and python3-pyyaml as runtime dependencies as well. PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" Markus Am 22.06.22 um 22:44 schrieb Luca Ceresoli: > Hi Markus, > > On Wed, 22 Jun 2022 19:32:50 +0200 > "Markus Volk" <f_l_k@t-online.de> wrote: > >> Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility >> >> Signed-off-by: Markus Volk <f_l_k@t-online.de> >> --- >> meta/recipes-devtools/llvm/llvm_git.bb | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb >> index 67ed1eab00..b86605cbce 100644 >> --- a/meta/recipes-devtools/llvm/llvm_git.bb >> +++ b/meta/recipes-devtools/llvm/llvm_git.bb >> @@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ >> -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ >> " >> >> +PACKAGECONFIG ?= "" >> +PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml" >> + > I have been working on a different version of this patch earlier today > based on the discussion on this mailing list. Now it completed testing > on my machine and I have run a build on the autobuilders: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/1049 > > My approach was slightly different, but not dramatically. I wrote a > more informative commit message though. I'm sending my patch to have > both out so that we can find which is the best one. >
Hi Markus, On Wed, 22 Jun 2022 23:03:47 +0200 "Markus Volk" <f_l_k@t-online.de> wrote: > Hi Luca, > > your commit message is way better than mine. > > One suggestion on your patch. I guess to be working on the target it > would be needed to add python3-pygment and python3-pyyaml as runtime > dependencies as well. > > PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" Good catch. So if you are OK I will take care of this, send v2, test it on the autobuilder where it did fail and if there is no surprise send it to Richard.
Hi Luca, the reason i made the switch working manually both sides was that i wanted to remove those python modules from build dependencies as i thought they would only be needed at runtime. But this should work as well and I'm of course OK with it. Markus Am 23.06.22 um 09:40 schrieb Luca Ceresoli: > Hi Markus, > > On Wed, 22 Jun 2022 23:03:47 +0200 > "Markus Volk" <f_l_k@t-online.de> wrote: > >> Hi Luca, >> >> your commit message is way better than mine. >> >> One suggestion on your patch. I guess to be working on the target it >> would be needed to add python3-pygment and python3-pyyaml as runtime >> dependencies as well. >> >> PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" > Good catch. So if you are OK I will take care of this, send v2, test it > on the autobuilder where it did fail and if there is no surprise send it > to Richard. > >
Hi Markus, On Thu, 23 Jun 2022 09:57:11 +0200 "Markus Volk" <f_l_k@t-online.de> wrote: > Hi Luca, > > the reason i made the switch working manually both sides was that i > wanted to remove those python modules from build dependencies as i > thought they would only be needed at runtime. Sure, fair enough. As for me, I preferred to do the opposite because the CMake configuration process might look into anything specific of those modules, and if they add such code in future versions we might not notice and experience issues. Maybe unlikely, but my approach was to prefer a "safe" build to build time. It's a matter of choice I guess, no approach is clearly "wrong" or "right" here. > But this should work as > well and I'm of course OK with it. OK. My v2 is under testing right now.
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 67ed1eab00..b86605cbce 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb @@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ " +PACKAGECONFIG ?= "" +PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml" + # patch out build host paths for reproducibility do_compile:prepend:class-target() { sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc
Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility Signed-off-by: Markus Volk <f_l_k@t-online.de> --- meta/recipes-devtools/llvm/llvm_git.bb | 3 +++ 1 file changed, 3 insertions(+)