Skip to contentSkip to conversation

package/pkg-waf.mk: drop bundled waf/waflib when external waf is used

PATCH In review Peter Korsgaard 3 participants 17 messages Feb 8, 2023 – Feb 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 package/pkg-waf.mk: drop bundled waf/waflib when external waf is used

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

---
 package/pkg-waf.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-waf.mk +8 -0
index e090afa9e6..a067e69c9b 100644
@@ -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
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/5 package/aubio: drop AUBIO_REMOVE_OLD_WAF hook

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

---
 package/aubio/aubio.mk | 6 ------
 1 file changed, 6 deletions(-)
package/aubio/aubio.mk +0 -6
index c995fdfac7..64174a113d 100644
@@ -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
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v1 2/5
#2 lore raw

Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook

Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :

Quoted 3 lines

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

Quoted 9 lines
---
 package/aubio/aubio.mk | 6 ------
 1 file changed, 6 deletions(-)
package/aubio/aubio.mk +0 -0
index c995fdfac7..64174a113d 100644

package/aubio/aubio.mk AUBIO_CONF_OPTS = \ · line 28

Quoted 8 lines
package/aubio/aubio.mk +0 -5
@@ -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

package/aubio/aubio.mk AUBIO_CONF_OPTS = \ · line 26

Quoted 4 lines
package/aubio/aubio.mk +0 -1
-
 # Add --notests for each build step to avoid running unit tests on the
 # build machine.
 AUBIO_WAF_OPTS = --notests

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook

Quoted 22 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :

Quoted 3 lines

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

Quoted 12 lines

---
package/aubio/aubio.mk | 6 ------

1 file changed, 6 deletions(-)
package/aubio/aubio.mk +0 -0
index c995fdfac7..64174a113d 100644
@@ -21,12 +21,6 @@ AUBIO_CONF_OPTS = \
 # https://github.com/jackaudio/jack2/issues/898

AUBIO_NEEDS_EXTERNAL_WAF = YES

Quoted 7 lines

package/aubio/aubio.mk AUBIO_CONF_OPTS = \ · line 28

Quoted 5 lines
package/aubio/aubio.mk +0 -5
-# 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.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 2/5] package/aubio: drop AUBIO_REMOVE_OLD_WAF hook

In reply to Peter Korsgaard
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

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

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

PATCH 3/5 package/glmark2: use external waf

In reply to Peter Korsgaard

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.

---
 package/glmark2/glmark2.mk | 3 +++
 1 file changed, 3 insertions(+)
package/glmark2/glmark2.mk +3 -0
index e8d6f71dad..bac9d9ff6f 100644
@@ -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
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 3/5] package/glmark2: use external waf

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> 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.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH 4/5 package/jack2: fix build with python >= 3.11

In reply to Peter Korsgaard

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

---
 ...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
package/jack2/0001-Remove-usage-of-U-mode-bit-for-opening-files-in-pyth.patch new file +55 -0
new file mode 100644
index 0000000000..9ee5a43e18
@@ -0,0 +1,55 @@
+From 328c58967dce8be426f9208ba7717ab5afc2c4f3 Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

Re: [Buildroot] [PATCH 4/5] package/jack2: fix build with python >= 3.11

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> 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.

Quoted 7 lines

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

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

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

PATCH 5/5 package/norm: use external waf

In reply to Peter Korsgaard

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.

---
 package/norm/norm.mk | 3 +++
 1 file changed, 3 insertions(+)
package/norm/norm.mk +3 -0
index 2f9fc7b657..a3fa1b4f80 100644
@@ -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
Signature · 6 lines
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

Re: [Buildroot] [PATCH 5/5] package/norm: use external waf

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> 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.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw
In reply to Peter Korsgaard

Peter, All,

On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:

Quoted 30 lines

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

---
 package/pkg-waf.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-waf.mk +7 -0
index e090afa9e6..a067e69c9b 100644
@@ -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
 

package/pkg-waf.mk $(2)_NEEDS_EXTERNAL_WAF ?= NO · line 57

Quoted 4 lines
package/pkg-waf.mk +1 -0
@@ -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.

Quoted 6 lines
package/pkg-waf.mk +0 -0
 else
 $(2)_WAF ?= ./waf
 endif
Signature · 1 line
2.30.2
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw
Quoted 33 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Peter, All,
On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:

Quoted 29 lines

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

---
package/pkg-waf.mk | 8 ++++++++

1 file changed, 8 insertions(+)
package/pkg-waf.mk +0 -0
index e090afa9e6..a067e69c9b 100644
@@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 

define inner-waf-package

package/pkg-waf.mk +7 -0
+# 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

Quoted 8 lines
Quoted 5 lines
package/pkg-waf.mk +0 -0
@@ -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.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#13 lore raw
In reply to Yann E. MORIN
Quoted 33 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Peter, All,
On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:

Quoted 29 lines

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

---
package/pkg-waf.mk | 8 ++++++++

1 file changed, 8 insertions(+)
package/pkg-waf.mk +0 -0
index e090afa9e6..a067e69c9b 100644
@@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 

define inner-waf-package

package/pkg-waf.mk +7 -0
+# 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

Quoted 8 lines
Quoted 5 lines
package/pkg-waf.mk +0 -0
@@ -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.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#14 lore raw
In reply to Yann E. MORIN

Hello,

Le 08/02/2023 à 20:24, Yann E. MORIN a écrit :

Quoted 20 lines

Peter, All,

On 2023-02-08 19:19 +0100, Peter Korsgaard spake thusly:

Quoted 17 lines

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

---
 package/pkg-waf.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-waf.mk +0 -0
index e090afa9e6..a067e69c9b 100644
@@ -38,6 +38,13 @@ WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS)
 
Quoted 7 lines

package/pkg-waf.mk WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS) · line 45

Quoted 7 lines
package/pkg-waf.mk +5 -0
 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:

Quoted 1 line
Quoted 1 line
Quoted 1 line

aubio 0.4.9 Patching

rm -f -fr /waf /waflib

Best regards,
Romain

Quoted 14 lines

package/pkg-waf.mk $(2)_NEEDS_EXTERNAL_WAF ?= NO · line 57

Quoted 10 lines
package/pkg-waf.mk +3 -0
+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.

Quoted 10 lines

Regards,
Yann E. MORIN.

Quoted 6 lines
package/pkg-waf.mk +0 -0
 else
 $(2)_WAF ?= ./waf
 endif
Signature · 1 line
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#15 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 8 lines
Quoted 5 lines

package/pkg-waf.mk WAF_OPTS = $(if $(VERBOSE),-v) -j $(PARALLEL_JOBS) · line 45

Quoted 5 lines
package/pkg-waf.mk +5 -0
+# 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 :)

Quoted 4 lines

Otherwise:

Quoted 1 line
Quoted 1 line
Quoted 1 line

aubio 0.4.9 Patching

rm -f -fr /waf /waflib

Ahh crap, thanks for pointing it out.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v1 1/5
#16 lore raw
In reply to Peter Korsgaard

Hello Peter,

Le 08/02/2023 à 19:19, Peter Korsgaard a écrit :

Quoted 7 lines

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

Best regards,
Romain

Quoted 23 lines
---
 package/pkg-waf.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/pkg-waf.mk +7 -0
index e090afa9e6..a067e69c9b 100644
@@ -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
 

package/pkg-waf.mk $(2)_NEEDS_EXTERNAL_WAF ?= NO · line 60

Quoted 7 lines
package/pkg-waf.mk +1 -0
@@ -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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot