All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell][PATCH 0/2] Fix build issue for meta-oe
@ 2021-01-16 17:44 akuster
  2021-01-16 17:44 ` [dunfell][PATCH 1/2] classes/waf: Add build and install arguments akuster
  2021-01-16 17:44 ` [dunfell][PATCH 2/2] waf: don't assume the waf intepretter is good akuster
  0 siblings, 2 replies; 5+ messages in thread
From: akuster @ 2021-01-16 17:44 UTC (permalink / raw)
  To: openembedded-core

World builds failed for mvp. These two changes fix

Exception: PermissionError: [Errno 13] Permission denied: 'TOPDIR/tmp/work/core2-64-poky-linux/mpv/0.32.0-r0/git/waf'

https://errors.yoctoproject.org/Errors/Details/539929/

Issue introduced by https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-multimedia/mplayer?id=5af46f89fcef5c436786ed81978de60f26abe054


These fixes are in Gatesgarth.

Please concider these for Dunfell.

Joshua Watt (1):
  classes/waf: Add build and install arguments

Ross Burton (1):
  waf: don't assume the waf intepretter is good

 meta/classes/waf.bbclass | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

-- 
2.17.1


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

* [dunfell][PATCH 1/2] classes/waf: Add build and install arguments
  2021-01-16 17:44 [dunfell][PATCH 0/2] Fix build issue for meta-oe akuster
@ 2021-01-16 17:44 ` akuster
  2021-01-16 20:36   ` [OE-core] " Andreas Müller
       [not found]   ` <165AD0D36D4C4851.15753@lists.openembedded.org>
  2021-01-16 17:44 ` [dunfell][PATCH 2/2] waf: don't assume the waf intepretter is good akuster
  1 sibling, 2 replies; 5+ messages in thread
From: akuster @ 2021-01-16 17:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Watt, Richard Purdie

From: Joshua Watt <JPEWhacker@gmail.com>

Adds variables that can be used to allow a recipe to pass extra
arguments to `waf build` and `waf install`. In most cases, you want to
pass the same arguments to `build` and `install` (since install is a
superset of `build`), so by default setting EXTRA_OEWAF_BUILD also
affects `waf install`, but this can be overridded.

(From OE-Core rev: 493e17a2f5cbbbe3b1e435dadb281b007bca2cbf)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 633652284b13dc78206f4cc8e81f29de44777b75)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/classes/waf.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 900244004ec..309f625a40f 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -5,6 +5,11 @@ B = "${WORKDIR}/build"
 
 EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
 
+EXTRA_OEWAF_BUILD ??= ""
+# In most cases, you want to pass the same arguments to `waf build` and `waf
+# install`, but you can override it if necessary
+EXTRA_OEWAF_INSTALL ??= "${EXTRA_OEWAF_BUILD}"
+
 def waflock_hash(d):
     # Calculates the hash used for the waf lock file. This should include
     # all of the user controllable inputs passed to waf configure. Note
@@ -55,11 +60,11 @@ waf_do_configure() {
 
 do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
 waf_do_compile()  {
-	(cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)})
+	(cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} ${EXTRA_OEWAF_BUILD})
 }
 
 waf_do_install() {
-	(cd ${S} && ./waf install --destdir=${D})
+	(cd ${S} && ./waf install --destdir=${D} ${EXTRA_OEWAF_INSTALL})
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install
-- 
2.17.1


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

* [dunfell][PATCH 2/2] waf: don't assume the waf intepretter is good
  2021-01-16 17:44 [dunfell][PATCH 0/2] Fix build issue for meta-oe akuster
  2021-01-16 17:44 ` [dunfell][PATCH 1/2] classes/waf: Add build and install arguments akuster
@ 2021-01-16 17:44 ` akuster
  1 sibling, 0 replies; 5+ messages in thread
From: akuster @ 2021-01-16 17:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ross Burton, Ross Burton, Richard Purdie

From: Ross Burton <ross@burtonini.com>

Waf typically uses `python` as the intepretter but inside a task this
does not exist.  Typically this is solved by patching waf (see the
glmark2 recipe) but not all versionf of Waf support Python 3 so we can't
assume a specific interpretter.

Instead, create a new variable WAF_PYTHON for the correct interpretter,
and default this to `python3`.  If the user has a recipe that needs
Python 2 then this can be changed in the recipe.

(From OE-Core rev: 802e80d35e6374b9b80f89068d00b84fe2d04ca1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 85b6301c6190a1d1823de9bfe7285f7a7d15a46f)
[Fixes build issue on Ubuntu 20 with mvp
https://github.com/openembedded/meta-openembedded/issues/304 ]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/classes/waf.bbclass | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass
index 309f625a40f..8fa5063645c 100644
--- a/meta/classes/waf.bbclass
+++ b/meta/classes/waf.bbclass
@@ -1,6 +1,10 @@
 # avoids build breaks when using no-static-libs.inc
 DISABLE_STATIC = ""
 
+# What Python interpretter to use.  Defaults to Python 3 but can be
+# overridden if required.
+WAF_PYTHON ?= "python3"
+
 B = "${WORKDIR}/build"
 
 EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
@@ -40,9 +44,10 @@ python waf_preconfigure() {
     import subprocess
     from distutils.version import StrictVersion
     subsrcdir = d.getVar('S')
+    python = d.getVar('WAF_PYTHON')
     wafbin = os.path.join(subsrcdir, 'waf')
     try:
-        result = subprocess.check_output([wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
+        result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
         version = result.decode('utf-8').split()[1]
         if StrictVersion(version) >= StrictVersion("1.8.7"):
             d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
@@ -55,16 +60,16 @@ python waf_preconfigure() {
 do_configure[prefuncs] += "waf_preconfigure"
 
 waf_do_configure() {
-	(cd ${S} && ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
+	(cd ${S} && ${WAF_PYTHON} ./waf configure -o ${B} --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF})
 }
 
 do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
 waf_do_compile()  {
-	(cd ${S} && ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} ${EXTRA_OEWAF_BUILD})
+	(cd ${S} && ${WAF_PYTHON} ./waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)} ${EXTRA_OEWAF_BUILD})
 }
 
 waf_do_install() {
-	(cd ${S} && ./waf install --destdir=${D} ${EXTRA_OEWAF_INSTALL})
+	(cd ${S} && ${WAF_PYTHON} ./waf install --destdir=${D} ${EXTRA_OEWAF_INSTALL})
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install
-- 
2.17.1


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

* Re: [OE-core] [dunfell][PATCH 1/2] classes/waf: Add build and install arguments
  2021-01-16 17:44 ` [dunfell][PATCH 1/2] classes/waf: Add build and install arguments akuster
@ 2021-01-16 20:36   ` Andreas Müller
       [not found]   ` <165AD0D36D4C4851.15753@lists.openembedded.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Müller @ 2021-01-16 20:36 UTC (permalink / raw)
  To: akuster
  Cc: Patches and discussions about the oe-core layer, Joshua Watt,
	Richard Purdie

On Sat, Jan 16, 2021 at 6:44 PM akuster <akuster808@gmail.com> wrote:
>
> From: Joshua Watt <JPEWhacker@gmail.com>
>
> Adds variables that can be used to allow a recipe to pass extra
> arguments to `waf build` and `waf install`. In most cases, you want to
> pass the same arguments to `build` and `install` (since install is a
> superset of `build`), so by default setting EXTRA_OEWAF_BUILD also
> affects `waf install`, but this can be overridded.
>
Hi Armin,

Have no problem with this - most of my layers are compatible from
dunfell up to master but from meta-musicians (musicians seem to like
waf) I know that this can cause breakages for packages shipping (very)
old waf. Nothing unsolvable but...
Just out of my curiosity: Why add this patch to dunfell?
Cheers

Andreas

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

* Re: [OE-core] [dunfell][PATCH 1/2] classes/waf: Add build and install arguments
       [not found]   ` <165AD0D36D4C4851.15753@lists.openembedded.org>
@ 2021-01-16 20:37     ` Andreas Müller
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Müller @ 2021-01-16 20:37 UTC (permalink / raw)
  To: Andreas Müller
  Cc: akuster, Patches and discussions about the oe-core layer,
	Joshua Watt, Richard Purdie

Aargh just read cover letter - sorry

On Sat, Jan 16, 2021 at 9:37 PM Andreas Müller via
lists.openembedded.org
<schnitzeltony=gmail.com@lists.openembedded.org> wrote:
>
> On Sat, Jan 16, 2021 at 6:44 PM akuster <akuster808@gmail.com> wrote:
> >
> > From: Joshua Watt <JPEWhacker@gmail.com>
> >
> > Adds variables that can be used to allow a recipe to pass extra
> > arguments to `waf build` and `waf install`. In most cases, you want to
> > pass the same arguments to `build` and `install` (since install is a
> > superset of `build`), so by default setting EXTRA_OEWAF_BUILD also
> > affects `waf install`, but this can be overridded.
> >
> Hi Armin,
>
> Have no problem with this - most of my layers are compatible from
> dunfell up to master but from meta-musicians (musicians seem to like
> waf) I know that this can cause breakages for packages shipping (very)
> old waf. Nothing unsolvable but...
> Just out of my curiosity: Why add this patch to dunfell?
> Cheers
>
> Andreas
>
> 
>

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

end of thread, other threads:[~2021-01-16 20:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 17:44 [dunfell][PATCH 0/2] Fix build issue for meta-oe akuster
2021-01-16 17:44 ` [dunfell][PATCH 1/2] classes/waf: Add build and install arguments akuster
2021-01-16 20:36   ` [OE-core] " Andreas Müller
     [not found]   ` <165AD0D36D4C4851.15753@lists.openembedded.org>
2021-01-16 20:37     ` Andreas Müller
2021-01-16 17:44 ` [dunfell][PATCH 2/2] waf: don't assume the waf intepretter is good akuster

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.