diff mbox series

python3-dtc: fix language specific AppendOutput functions with swig 4.3.0

Message ID 20241028173602.1652935-1-f_l_k@t-online.de
State New
Headers show
Series python3-dtc: fix language specific AppendOutput functions with swig 4.3.0 | expand

Commit Message

Markus Volk Oct. 28, 2024, 5:36 p.m. UTC
Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 .../0001-libfdt.i-Use-SWIG_AppendOutput.patch | 51 +++++++++++++++++++
 .../python/python3-dtc_1.7.0.bb               |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch

Comments

Mathieu Dubois-Briand Oct. 29, 2024, 12:47 p.m. UTC | #1
On Mon, Oct 28, 2024 at 06:36:02PM +0100, Markus Volk wrote:
> Swig has changed language specific AppendOutput functions. The helper
> macro SWIG_AppendOutput remains unchanged. Use that instead
> of SWIG_Python_AppendOutput, which would require an extra parameter
> since swig 4.3.0.
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  .../0001-libfdt.i-Use-SWIG_AppendOutput.patch | 51 +++++++++++++++++++
>  .../python/python3-dtc_1.7.0.bb               |  1 +
>  2 files changed, 52 insertions(+)
>  create mode 100644 meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
> 
> diff --git a/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
> new file mode 100644
> index 0000000000..c9c3a886f1
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
> @@ -0,0 +1,51 @@
> +From 4eb1df0be56103b8058c126dd437bfb6dbaa5bb2 Mon Sep 17 00:00:00 2001
> +From: Markus Volk <f_l_k@t-online.de>
> +Date: Mon, 28 Oct 2024 18:05:53 +0100
> +Subject: [PATCH] libfdt.i: Use SWIG_AppendOutput
> +
> +Swig has changed language specific AppendOutput functions. The helper
> +macro SWIG_AppendOutput remains unchanged. Use that instead
> +of SWIG_Python_AppendOutput, which would require an extra parameter
> +since swig 4.3.0.
> +
> +Signed-off-by: Markus Volk <f_l_k@t-online.de>
> +

Hi Markus,

Thanks for the update, but it seems the issue is still present :(

https://valkyrie.yoctoproject.org/#/builders/6/builds/340/steps/11/logs/stdio
https://valkyrie.yoctoproject.org/#/builders/3/builds/343/steps/11/logs/stdio
Markus Volk Oct. 30, 2024, 5:23 a.m. UTC | #2
Hi Mathieu,

It took a while. I first had to investigate another problem I was 
having with swig and kodi. But that may have been related to the python 
3.13 update.

I have sent a patch to the u-boot mailing list. I had to register there 
and the confirmation is still pending. Unfortunately no patches are 
accepted via github. That's why I don't have a link, but I set the 
patch status to submitted anyway, because at least I got this 
confirmation:

Your mail to 'U-Boot' with the subject

    [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Post by non-member to a members-only list

Either the message will get posted to the list, or you will receive
notification of the moderator's decision.
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
new file mode 100644
index 0000000000..c9c3a886f1
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-dtc/0001-libfdt.i-Use-SWIG_AppendOutput.patch
@@ -0,0 +1,51 @@ 
+From 4eb1df0be56103b8058c126dd437bfb6dbaa5bb2 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Mon, 28 Oct 2024 18:05:53 +0100
+Subject: [PATCH] libfdt.i: Use SWIG_AppendOutput
+
+Swig has changed language specific AppendOutput functions. The helper
+macro SWIG_AppendOutput remains unchanged. Use that instead
+of SWIG_Python_AppendOutput, which would require an extra parameter
+since swig 4.3.0.
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Upstream-Status: Submitted [https://github.com/dgibson/dtc/pull/154]
+---
+ pylibfdt/libfdt.i | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i
+index 2361e22..e04053e 100644
+--- a/pylibfdt/libfdt.i
++++ b/pylibfdt/libfdt.i
+@@ -1080,7 +1080,7 @@ typedef uint32_t fdt32_t;
+ 			fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
+ 		buff = PyByteArray_FromStringAndSize(
+ 			(const char *)($1 + 1), fdt32_to_cpu($1->len));
+-		resultobj = SWIG_Python_AppendOutput(resultobj, buff);
++		resultobj = SWIG_AppendOutput(resultobj, buff);
+ 	}
+ }
+ 
+@@ -1121,7 +1121,7 @@ typedef uint32_t fdt32_t;
+ 
+ %typemap(argout) int *depth {
+         PyObject *val = Py_BuildValue("i", *arg$argnum);
+-        resultobj = SWIG_Python_AppendOutput(resultobj, val);
++        resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+ 
+ %apply int *depth { int *depth };
+@@ -1137,7 +1137,7 @@ typedef uint32_t fdt32_t;
+            if (PyTuple_GET_SIZE(resultobj) == 0)
+               resultobj = val;
+            else
+-              resultobj = SWIG_Python_AppendOutput(resultobj, val);
++              resultobj = SWIG_AppendOutput(resultobj, val);
+         }
+ }
+ 
+-- 
+2.47.0
+
diff --git a/meta/recipes-devtools/python/python3-dtc_1.7.0.bb b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
index 85e48d4694..a32db56cac 100644
--- a/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
+++ b/meta/recipes-devtools/python/python3-dtc_1.7.0.bb
@@ -8,6 +8,7 @@  DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native li
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
            file://0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch \
+           file://0001-libfdt.i-Use-SWIG_AppendOutput.patch \
           "
 
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"