All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
@ 2023-02-08 18:19 Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-08 18:19 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E. MORIN

Waf requires that the version of the waf script matches the version of
waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
otherwise waf errors out with errors like:

Waf script '2.0.24' and library '1.9.3' do not match

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-waf.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
index e090afa9e6..a067e69c9b 100644
--- a/package/pkg-waf.mk
+++ b/package/pkg-waf.mk
@@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 
 define inner-waf-package
 
+# The version of waflib has to match with the version of waf,
+# otherwise waf errors out with:
+# Waf script 'X' and library 'Y' do not match
+define WAF_PACKAGE_REMOVE_WAF_LIB
+	$(RM) -fr $(@D)/waf $(@D)/waflib
+endef
+
 # We need host-python3 to run waf
 $(2)_DEPENDENCIES += host-python3
 
@@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
 ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
 $(2)_DEPENDENCIES += host-waf
 $(2)_WAF = $$(HOST_DIR)/bin/waf
+$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB
 else
 $(2)_WAF ?= ./waf
 endif
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
@ 2023-02-08 18:19 ` Peter Korsgaard
  2023-02-08 21:08   ` Romain Naour
  2023-02-10 14:11   ` Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 3/5] package/glmark2: use external waf Peter Korsgaard
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-08 18:19 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

As that is now handled by the waf-package infrastructure.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/aubio/aubio.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/aubio/aubio.mk b/package/aubio/aubio.mk
index c995fdfac7..64174a113d 100644
--- a/package/aubio/aubio.mk
+++ b/package/aubio/aubio.mk
@@ -21,12 +21,6 @@ AUBIO_CONF_OPTS = \
 # https://github.com/jackaudio/jack2/issues/898
 AUBIO_NEEDS_EXTERNAL_WAF = YES
 
-# The old waf script bundled in aubio 0.4.9 need to be removed first.
-define AUBIO_REMOVE_OLD_WAF
-	$(RM) -fr $(@D)/waf $(@D)/waflib
-endef
-AUBIO_POST_EXTRACT_HOOKS = AUBIO_REMOVE_OLD_WAF
-
 # Add --notests for each build step to avoid running unit tests on the
 # build machine.
 AUBIO_WAF_OPTS = --notests
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/5] package/glmark2: use external waf
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
@ 2023-02-08 18:19 ` Peter Korsgaard
  2023-02-10 14:11   ` Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11 Peter Korsgaard
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-08 18:19 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Spenser Gilliland

Fixes:
http://autobuild.buildroot.net/results/bbd/bbd90f11975b691f694412a6fc3446f37dd7c0aa/

The bundled waf script is too old (1.9.3) for python >= 3.11 as it uses the
'U' modifier to open (universal newlines), which have been deprecated since
python 3.3 and finally removed in 3.11.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/glmark2/glmark2.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
index e8d6f71dad..bac9d9ff6f 100644
--- a/package/glmark2/glmark2.mk
+++ b/package/glmark2/glmark2.mk
@@ -10,6 +10,9 @@ GLMARK2_LICENSE = GPL-3.0+, SGIv1
 GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
 GLMARK2_DEPENDENCIES = host-pkgconf jpeg libegl libpng
 
+# The bundled waf script is too old for >= python3.11
+GLMARK2_NEEDS_EXTERNAL_WAF = YES
+
 ifeq ($(BR2_PACKAGE_GLMARK2_FLAVOR_DRM_GLESV2),y)
 GLMARK2_DEPENDENCIES += libdrm libgbm libgles udev
 GLMARK2_FLAVORS += drm-glesv2
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 3/5] package/glmark2: use external waf Peter Korsgaard
@ 2023-02-08 18:19 ` Peter Korsgaard
  2023-02-10 14:13   ` Peter Korsgaard
  2023-02-08 18:19 ` [Buildroot] [PATCH 5/5] package/norm: use external waf Peter Korsgaard
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-08 18:19 UTC (permalink / raw)
  To: buildroot; +Cc: Wojciech M. Zabolotny

Fixes:
http://autobuild.buildroot.net/results/5ce/5ce5ebd20e0e509b31b51d2ec1aed56fdb8f45aa/

The bundled waf script is too old (2.0.12) for python >= 3.11 as it uses the
'U' modifier to open (universal newlines), which have been deprecated since
python 3.3 and finally removed in 3.11.

Jack unfortunately uses a modified waf, so we cannot just set
JACK2_NEEDS_EXTERNAL_WAF, so instead backport an upstream patch fixing the
compatibility issue:

https://github.com/jackaudio/jack2/pull/884

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...U-mode-bit-for-opening-files-in-pyth.patch | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/jack2/0001-Remove-usage-of-U-mode-bit-for-opening-files-in-pyth.patch

diff --git a/package/jack2/0001-Remove-usage-of-U-mode-bit-for-opening-files-in-pyth.patch b/package/jack2/0001-Remove-usage-of-U-mode-bit-for-opening-files-in-pyth.patch
new file mode 100644
index 0000000000..9ee5a43e18
--- /dev/null
+++ b/package/jack2/0001-Remove-usage-of-U-mode-bit-for-opening-files-in-pyth.patch
@@ -0,0 +1,55 @@
+From 328c58967dce8be426f9208ba7717ab5afc2c4f3 Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <daan.j.demeyer@gmail.com>
+Date: Mon, 11 Jul 2022 00:56:28 +0200
+Subject: [PATCH] Remove usage of 'U' mode bit for opening files in python
+
+The 'U' mode bit is removed in python 3.11. It has been
+deprecated for a long time. The 'U' mode bit has no effect
+so this change doesn't change any behavior.
+
+See https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ waflib/ConfigSet.py | 2 +-
+ waflib/Context.py   | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py
+index b300bb56..84736c9c 100644
+--- a/waflib/ConfigSet.py
++++ b/waflib/ConfigSet.py
+@@ -312,7 +312,7 @@ class ConfigSet(object):
+ 		:type filename: string
+ 		"""
+ 		tbl = self.table
+-		code = Utils.readf(filename, m='rU')
++		code = Utils.readf(filename, m='r')
+ 		for m in re_imp.finditer(code):
+ 			g = m.group
+ 			tbl[g(2)] = eval(g(3))
+diff --git a/waflib/Context.py b/waflib/Context.py
+index 9fee3fa1..761b521f 100644
+--- a/waflib/Context.py
++++ b/waflib/Context.py
+@@ -266,7 +266,7 @@ class Context(ctx):
+ 				cache[node] = True
+ 				self.pre_recurse(node)
+ 				try:
+-					function_code = node.read('rU', encoding)
++					function_code = node.read('r', encoding)
+ 					exec(compile(function_code, node.abspath(), 'exec'), self.exec_dict)
+ 				finally:
+ 					self.post_recurse(node)
+@@ -662,7 +662,7 @@ def load_module(path, encoding=None):
+ 
+ 	module = imp.new_module(WSCRIPT_FILE)
+ 	try:
+-		code = Utils.readf(path, m='rU', encoding=encoding)
++		code = Utils.readf(path, m='r', encoding=encoding)
+ 	except EnvironmentError:
+ 		raise Errors.WafError('Could not read the file %r' % path)
+ 
+-- 
+2.30.2
+
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 5/5] package/norm: use external waf
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
                   ` (2 preceding siblings ...)
  2023-02-08 18:19 ` [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11 Peter Korsgaard
@ 2023-02-08 18:19 ` Peter Korsgaard
  2023-02-10 14:13   ` Peter Korsgaard
  2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
  2023-02-08 21:05 ` Romain Naour
  5 siblings, 1 reply; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-08 18:19 UTC (permalink / raw)
  To: buildroot

Fixes:
http://autobuild.buildroot.net/results/ee1/ee15cadf8af10dee6c83b9726a034367e8ae81a7/

The bundled waf script is too old (2.0.7) for python >= 3.11 as it uses the
'U' modifier to open (universal newlines), which have been deprecated since
python 3.3 and finally removed in 3.11.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/norm/norm.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/norm/norm.mk b/package/norm/norm.mk
index 2f9fc7b657..a3fa1b4f80 100644
--- a/package/norm/norm.mk
+++ b/package/norm/norm.mk
@@ -11,6 +11,9 @@ NORM_INSTALL_STAGING = YES
 NORM_LICENSE = NRL License
 NORM_LICENSE_FILES = LICENSE.TXT
 
+# The bundled waf script is too old for >= python3.11
+NORM_NEEDS_EXTERNAL_WAF = YES
+
 ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y)
 NORM_DEPENDENCIES += libnetfilter_queue
 endif
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
                   ` (3 preceding siblings ...)
  2023-02-08 18:19 ` [Buildroot] [PATCH 5/5] package/norm: use external waf Peter Korsgaard
@ 2023-02-08 19:24 ` Yann E. MORIN
  2023-02-09  6:48   ` Peter Korsgaard
                     ` (2 more replies)
  2023-02-08 21:05 ` Romain Naour
  5 siblings, 3 replies; 17+ messages in thread
From: Yann E. MORIN @ 2023-02-08 19:24 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

Peter, All,

On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:
> Waf requires that the version of the waf script matches the version of
> waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
> otherwise waf errors out with errors like:
> 
> Waf script '2.0.24' and library '1.9.3' do not match
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  package/pkg-waf.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
> index e090afa9e6..a067e69c9b 100644
> --- a/package/pkg-waf.mk
> +++ b/package/pkg-waf.mk
> @@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
>  
>  define inner-waf-package
>  
> +# The version of waflib has to match with the version of waf,
> +# otherwise waf errors out with:
> +# Waf script 'X' and library 'Y' do not match
> +define WAF_PACKAGE_REMOVE_WAF_LIB
> +	$(RM) -fr $(@D)/waf $(@D)/waflib
> +endef
> +
>  # We need host-python3 to run waf
>  $(2)_DEPENDENCIES += host-python3
>  
> @@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
>  ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
>  $(2)_DEPENDENCIES += host-waf
>  $(2)_WAF = $$(HOST_DIR)/bin/waf
> +$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB

It would make more sense to make that either a post-extract or a
post-patch hook.

Regards,
Yann E. MORIN.

>  else
>  $(2)_WAF ?= ./waf
>  endif
> -- 
> 2.30.2
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
                   ` (4 preceding siblings ...)
  2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
@ 2023-02-08 21:05 ` Romain Naour
  5 siblings, 0 replies; 17+ messages in thread
From: Romain Naour @ 2023-02-08 21:05 UTC (permalink / raw)
  To: Peter Korsgaard, buildroot; +Cc: Yann E. MORIN

Hello Peter,

Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :
> Waf requires that the version of the waf script matches the version of
> waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
> otherwise waf errors out with errors like:
> 
> Waf script '2.0.24' and library '1.9.3' do not match
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Reviewed-by: Romain Naour <romain.naour@smile.fr>

Best regards,
Romain

> ---
>  package/pkg-waf.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
> index e090afa9e6..a067e69c9b 100644
> --- a/package/pkg-waf.mk
> +++ b/package/pkg-waf.mk
> @@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
>  
>  define inner-waf-package
>  
> +# The version of waflib has to match with the version of waf,
> +# otherwise waf errors out with:
> +# Waf script 'X' and library 'Y' do not match
> +define WAF_PACKAGE_REMOVE_WAF_LIB
> +	$(RM) -fr $(@D)/waf $(@D)/waflib
> +endef
> +
>  # We need host-python3 to run waf
>  $(2)_DEPENDENCIES += host-python3
>  
> @@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
>  ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
>  $(2)_DEPENDENCIES += host-waf
>  $(2)_WAF = $$(HOST_DIR)/bin/waf
> +$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB
>  else
>  $(2)_WAF ?= ./waf
>  endif

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook
  2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
@ 2023-02-08 21:08   ` Romain Naour
  2023-02-10 14:12     ` Peter Korsgaard
  2023-02-10 14:11   ` Peter Korsgaard
  1 sibling, 1 reply; 17+ messages in thread
From: Romain Naour @ 2023-02-08 21:08 UTC (permalink / raw)
  To: Peter Korsgaard, buildroot; +Cc: Romain Naour

Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :
> As that is now handled by the waf-package infrastructure.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Reviewed-by: Romain Naour <romain.naour@smile.fr>


> ---
>  package/aubio/aubio.mk | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/package/aubio/aubio.mk b/package/aubio/aubio.mk
> index c995fdfac7..64174a113d 100644
> --- a/package/aubio/aubio.mk
> +++ b/package/aubio/aubio.mk
> @@ -21,12 +21,6 @@ AUBIO_CONF_OPTS = \
>  # https://github.com/jackaudio/jack2/issues/898
>  AUBIO_NEEDS_EXTERNAL_WAF = YES
>  
> -# The old waf script bundled in aubio 0.4.9 need to be removed first.
> -define AUBIO_REMOVE_OLD_WAF
> -	$(RM) -fr $(@D)/waf $(@D)/waflib
> -endef
> -AUBIO_POST_EXTRACT_HOOKS = AUBIO_REMOVE_OLD_WAF

Note: the pkg-wag use a PRE_CONFIGURE_HOOKS instead of POST_EXTRACT_HOOKS.

Best regards,
Romain


> -
>  # Add --notests for each build step to avoid running unit tests on the
>  # build machine.
>  AUBIO_WAF_OPTS = --notests

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
@ 2023-02-09  6:48   ` Peter Korsgaard
  2023-02-10 14:09   ` Peter Korsgaard
  2023-02-11  9:33   ` Romain Naour
  2 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-09  6:48 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Peter, All,
 > On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:
 >> Waf requires that the version of the waf script matches the version of
 >> waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
 >> otherwise waf errors out with errors like:
 >> 
 >> Waf script '2.0.24' and library '1.9.3' do not match
 >> 
 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
 >> ---
 >> package/pkg-waf.mk | 8 ++++++++
 >> 1 file changed, 8 insertions(+)
 >> 
 >> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
 >> index e090afa9e6..a067e69c9b 100644
 >> --- a/package/pkg-waf.mk
 >> +++ b/package/pkg-waf.mk
 >> @@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 >> 
 >> define inner-waf-package
 >> 
 >> +# The version of waflib has to match with the version of waf,
 >> +# otherwise waf errors out with:
 >> +# Waf script 'X' and library 'Y' do not match
 >> +define WAF_PACKAGE_REMOVE_WAF_LIB
 >> +	$(RM) -fr $(@D)/waf $(@D)/waflib
 >> +endef
 >> +
 >> # We need host-python3 to run waf
 >> $(2)_DEPENDENCIES += host-python3
 >> 
 >> @@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
 >> ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
 >> $(2)_DEPENDENCIES += host-waf
 >> $(2)_WAF = $$(HOST_DIR)/bin/waf
 >> +$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB

 > It would make more sense to make that either a post-extract or a
 > post-patch hook.

I hesitated between post-patch and pre-configure, but went with
pre-configure as this is closely related to the configure step - But I'm
fine with making it a post-patch hook instead.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
  2023-02-09  6:48   ` Peter Korsgaard
@ 2023-02-10 14:09   ` Peter Korsgaard
  2023-02-11  9:33   ` Romain Naour
  2 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:09 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Peter, All,
 > On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:
 >> Waf requires that the version of the waf script matches the version of
 >> waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
 >> otherwise waf errors out with errors like:
 >> 
 >> Waf script '2.0.24' and library '1.9.3' do not match
 >> 
 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
 >> ---
 >> package/pkg-waf.mk | 8 ++++++++
 >> 1 file changed, 8 insertions(+)
 >> 
 >> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
 >> index e090afa9e6..a067e69c9b 100644
 >> --- a/package/pkg-waf.mk
 >> +++ b/package/pkg-waf.mk
 >> @@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 >> 
 >> define inner-waf-package
 >> 
 >> +# The version of waflib has to match with the version of waf,
 >> +# otherwise waf errors out with:
 >> +# Waf script 'X' and library 'Y' do not match
 >> +define WAF_PACKAGE_REMOVE_WAF_LIB
 >> +	$(RM) -fr $(@D)/waf $(@D)/waflib
 >> +endef
 >> +
 >> # We need host-python3 to run waf
 >> $(2)_DEPENDENCIES += host-python3
 >> 
 >> @@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
 >> ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
 >> $(2)_DEPENDENCIES += host-waf
 >> $(2)_WAF = $$(HOST_DIR)/bin/waf
 >> +$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB

 > It would make more sense to make that either a post-extract or a
 > post-patch hook.

Committed after changing it to use a post-patch hook, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook
  2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
  2023-02-08 21:08   ` Romain Naour
@ 2023-02-10 14:11   ` Peter Korsgaard
  1 sibling, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:11 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > As that is now handled by the waf-package infrastructure.
 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/5] package/glmark2: use external waf
  2023-02-08 18:19 ` [Buildroot] [PATCH 3/5] package/glmark2: use external waf Peter Korsgaard
@ 2023-02-10 14:11   ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:11 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Spenser Gilliland

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/bbd/bbd90f11975b691f694412a6fc3446f37dd7c0aa/

 > The bundled waf script is too old (1.9.3) for python >= 3.11 as it uses the
 > 'U' modifier to open (universal newlines), which have been deprecated since
 > python 3.3 and finally removed in 3.11.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook
  2023-02-08 21:08   ` Romain Naour
@ 2023-02-10 14:12     ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:12 UTC (permalink / raw)
  To: Romain Naour; +Cc: Romain Naour, buildroot

>>>>> "Romain" == Romain Naour <romain.naour@smile.fr> writes:

 > Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :
 >> As that is now handled by the waf-package infrastructure.
 >> 
 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 > Reviewed-by: Romain Naour <romain.naour@smile.fr>


 >> ---
 >> package/aubio/aubio.mk | 6 ------
 >> 1 file changed, 6 deletions(-)
 >> 
 >> diff --git a/package/aubio/aubio.mk b/package/aubio/aubio.mk
 >> index c995fdfac7..64174a113d 100644
 >> --- a/package/aubio/aubio.mk
 >> +++ b/package/aubio/aubio.mk
 >> @@ -21,12 +21,6 @@ AUBIO_CONF_OPTS = \
 >> # https://github.com/jackaudio/jack2/issues/898
 >> AUBIO_NEEDS_EXTERNAL_WAF = YES
 >> 
 >> -# The old waf script bundled in aubio 0.4.9 need to be removed first.
 >> -define AUBIO_REMOVE_OLD_WAF
 >> -	$(RM) -fr $(@D)/waf $(@D)/waflib
 >> -endef
 >> -AUBIO_POST_EXTRACT_HOOKS = AUBIO_REMOVE_OLD_WAF

 > Note: the pkg-wag use a PRE_CONFIGURE_HOOKS instead of POST_EXTRACT_HOOKS.

Correct. I don't think that has any functional change, but I did change
the waf-package logic to use a post-patch hook as suggested by Yann.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11
  2023-02-08 18:19 ` [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11 Peter Korsgaard
@ 2023-02-10 14:13   ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:13 UTC (permalink / raw)
  To: buildroot; +Cc: Wojciech M. Zabolotny

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/5ce/5ce5ebd20e0e509b31b51d2ec1aed56fdb8f45aa/

 > The bundled waf script is too old (2.0.12) for python >= 3.11 as it uses the
 > 'U' modifier to open (universal newlines), which have been deprecated since
 > python 3.3 and finally removed in 3.11.

 > Jack unfortunately uses a modified waf, so we cannot just set
 > JACK2_NEEDS_EXTERNAL_WAF, so instead backport an upstream patch fixing the
 > compatibility issue:

 > https://github.com/jackaudio/jack2/pull/884

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

I've tweaked the commit message to make it clear that this is about
host-python3 and commmitted, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 5/5] package/norm: use external waf
  2023-02-08 18:19 ` [Buildroot] [PATCH 5/5] package/norm: use external waf Peter Korsgaard
@ 2023-02-10 14:13   ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-10 14:13 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/ee1/ee15cadf8af10dee6c83b9726a034367e8ae81a7/

 > The bundled waf script is too old (2.0.7) for python >= 3.11 as it uses the
 > 'U' modifier to open (universal newlines), which have been deprecated since
 > python 3.3 and finally removed in 3.11.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
  2023-02-09  6:48   ` Peter Korsgaard
  2023-02-10 14:09   ` Peter Korsgaard
@ 2023-02-11  9:33   ` Romain Naour
  2023-02-11 13:17     ` Peter Korsgaard
  2 siblings, 1 reply; 17+ messages in thread
From: Romain Naour @ 2023-02-11  9:33 UTC (permalink / raw)
  To: Yann E. MORIN, Peter Korsgaard; +Cc: buildroot

Hello,

Le 08/02/2023 à 20:24, Yann E. MORIN a écrit :
> Peter, All,
> 
> On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:
>> Waf requires that the version of the waf script matches the version of
>> waflib, so drop any bundled waf/waflib if _NEEDS_EXTERNAL_WAF is used, as
>> otherwise waf errors out with errors like:
>>
>> Waf script '2.0.24' and library '1.9.3' do not match
>>
>> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
>> ---
>>  package/pkg-waf.mk | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
>> index e090afa9e6..a067e69c9b 100644
>> --- a/package/pkg-waf.mk
>> +++ b/package/pkg-waf.mk
>> @@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
>>  
>>  define inner-waf-package
>>  
>> +# The version of waflib has to match with the version of waf,
>> +# otherwise waf errors out with:
>> +# Waf script 'X' and library 'Y' do not match
>> +define WAF_PACKAGE_REMOVE_WAF_LIB
>> +	$(RM) -fr $(@D)/waf $(@D)/waflib

We need more $$ here :)

Otherwise:

>>> aubio 0.4.9 Patching
rm -f -fr /waf /waflib

Best regards,
Romain


>> +endef
>> +
>>  # We need host-python3 to run waf
>>  $(2)_DEPENDENCIES += host-python3
>>  
>> @@ -47,6 +54,7 @@ $(2)_NEEDS_EXTERNAL_WAF ?= NO
>>  ifeq ($$($(2)_NEEDS_EXTERNAL_WAF),YES)
>>  $(2)_DEPENDENCIES += host-waf
>>  $(2)_WAF = $$(HOST_DIR)/bin/waf
>> +$(2)_PRE_CONFIGURE_HOOKS += WAF_PACKAGE_REMOVE_WAF_LIB
> 
> It would make more sense to make that either a post-extract or a
> post-patch hook.
> 
> Regards,
> Yann E. MORIN.
> 
>>  else
>>  $(2)_WAF ?= ./waf
>>  endif
>> -- 
>> 2.30.2
>>
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used
  2023-02-11  9:33   ` Romain Naour
@ 2023-02-11 13:17     ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2023-02-11 13:17 UTC (permalink / raw)
  To: Romain Naour; +Cc: Yann E. MORIN, buildroot

>>>>> "Romain" == Romain Naour <romain.naour@smile.fr> writes:

Hi,

 >>> +# The version of waflib has to match with the version of waf,
 >>> +# otherwise waf errors out with:
 >>> +# Waf script 'X' and library 'Y' do not match
 >>> +define WAF_PACKAGE_REMOVE_WAF_LIB
 >>> +	$(RM) -fr $(@D)/waf $(@D)/waflib

 > We need more $$ here :)

 > Otherwise:

 >>>> aubio 0.4.9 Patching
 > rm -f -fr /waf /waflib

Ahh crap, thanks for pointing it out.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-02-11 13:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 18:19 [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Peter Korsgaard
2023-02-08 18:19 ` [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook Peter Korsgaard
2023-02-08 21:08   ` Romain Naour
2023-02-10 14:12     ` Peter Korsgaard
2023-02-10 14:11   ` Peter Korsgaard
2023-02-08 18:19 ` [Buildroot] [PATCH 3/5] package/glmark2: use external waf Peter Korsgaard
2023-02-10 14:11   ` Peter Korsgaard
2023-02-08 18:19 ` [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11 Peter Korsgaard
2023-02-10 14:13   ` Peter Korsgaard
2023-02-08 18:19 ` [Buildroot] [PATCH 5/5] package/norm: use external waf Peter Korsgaard
2023-02-10 14:13   ` Peter Korsgaard
2023-02-08 19:24 ` [Buildroot] [PATCH 1/5] package/pkg-waf.mk: drop bundled waf/waflib when external waf is used Yann E. MORIN
2023-02-09  6:48   ` Peter Korsgaard
2023-02-10 14:09   ` Peter Korsgaard
2023-02-11  9:33   ` Romain Naour
2023-02-11 13:17     ` Peter Korsgaard
2023-02-08 21:05 ` Romain Naour

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.