From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Jaipaul Cheernam" <jaipaul.cheernam@est.tech>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH v3 3/4] u-boot-tools: fix pylibfdt build with swig 4.5.0
Date: Tue, 11 Aug 2026 14:58:08 +0200 [thread overview]
Message-ID: <DKM4RNDHJJQ3.13B6BZNOT7ZRM@bootlin.com> (raw)
In-Reply-To: <20260811111120.17612-4-jaipaul.cheernam@est.tech>
On Tue Aug 11, 2026 at 1:11 PM CEST, Jaipaul Cheernam wrote:
> SWIG 4.5.0 removed Python 2 compatibility macros (PyInt_*, PyString_*)
> from its runtime. Backport the dtc upstream fix to u-boot's bundled
> pylibfdt/libfdt.i to replace them with Python 3 equivalents.
>
> Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
> ---
Hi Jaipaul,
Thanks for your patch.
Can you confirm this is based on today master? The u-boot patch fails to
apply on my side:
ERROR: u-boot-tools-1_2026.07-r0 do_patch: Applying patch '/srv/pokybuild/yocto-worker/musl-qemux86-64/build/layers/openembedded-core/meta/recipes-bsp/u-boot/files/0001-pylibfdt-Replace-removed-SWIG-Python-2-compatibility.patch' on target directory '/srv/pokybuild/yocto-worker/musl-qemux86-64/build/build/tmp/work/x86-64-v3-poky-linux-musl/u-boot-tools/2026.07/sources/u-boot-tools-2026.07'
CmdError('quilt --quiltrc /srv/pokybuild/yocto-worker/musl-qemux86-64/build/build/tmp/work/x86-64-v3-poky-linux-musl/u-boot-tools/2026.07/recipe-sysroot-native/etc/quiltrc push', 1, "stdout: Applying patch 0001-pylibfdt-Replace-removed-SWIG-Python-2-compatibility.patch
can't find file to patch at input line 33
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 32378d7b4383a79d13da9005035600d8f0c8c29d Mon Sep 17 00:00:00 2001
|From: Jitka Plesnikova <jplesnik@redhat.com>
|Date: Tue, 29 Jul 2026 05:55:56 +0000
|Subject: [PATCH] pylibfdt: Replace removed SWIG Python 2 compatibility macros
|
|SWIG 4.5.0 removed Python 2 compatibility macros (PyInt_*, PyString_*)
|from its runtime header pyhead.swg (see commit 79f7a2b7cb7d). Replace
|them with their Python 3 C API equivalents:
|
|- PyString_FromString -> PyUnicode_FromString
|- PyString_AsString -> PyBytes_AsString
|- PyInt_AsLong -> PyLong_AsLong
|
|The replacements are safe since the macros were already aliased to
|these exact functions in SWIG's Python 3 code path.
|
|Signed-off-by: Jitka Plesnikova <jplesnik@redhat.com>
|Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|(cherry picked from commit 5008d1d6a356b8d0a78060da2e1021507d529cff)
|
|Upstream-Status: Backport [https://github.com/dgibson/dtc/commit/5008d1d6a356b8d0a78060da2e1021507d529cff]
|
|Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|---
| scripts/dtc/pylibfdt/libfdt.i | 6 +++---
| 1 file changed, 3 insertions(+), 3 deletions(-)
|
|diff --git a/scripts/dtc/pylibfdt/libfdt.i b/scripts/dtc/pylibfdt/libfdt.i
|index 1f9c0471..b1cb9873 100644
|--- a/scripts/dtc/pylibfdt/libfdt.i
|+++ b/scripts/dtc/pylibfdt/libfdt.i
--------------------------
No file to patch. Skipping patch.
2 out of 2 hunks ignored
Patch 0001-pylibfdt-Replace-removed-SWIG-Python-2-compatibility.patch does not apply (enforce with -f)
https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/4216
https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/4423
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-08-11 12:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 15:45 [PATCH] swig: upgrade 4.4.1 -> 4.5.0 Jaipaul Cheernam
2026-08-10 21:02 ` [OE-core] " Richard Purdie
2026-08-11 6:12 ` [PATCH v2 0/2] " Jaipaul Cheernam
2026-08-11 6:12 ` [PATCH v2 1/2] " Jaipaul Cheernam
2026-08-11 10:25 ` [OE-core] " Richard Purdie
2026-08-11 11:15 ` Jaipaul Cheernam
2026-08-11 6:12 ` [PATCH v2 2/2] babeltrace2: fix build with swig 4.5.0 Jaipaul Cheernam
2026-08-11 11:11 ` [PATCH v3 0/4] swig: upgrade 4.4.1 -> 4.5.0 Jaipaul Cheernam
2026-08-11 11:11 ` [PATCH v3 1/4] " Jaipaul Cheernam
2026-08-11 11:11 ` [PATCH v3 2/4] babeltrace2: fix build with swig 4.5.0 Jaipaul Cheernam
2026-08-11 11:11 ` [PATCH v3 3/4] u-boot-tools: fix pylibfdt " Jaipaul Cheernam
2026-08-11 12:58 ` Mathieu Dubois-Briand [this message]
2026-08-11 13:38 ` [OE-core] " Quentin Schulz
2026-08-11 11:11 ` [PATCH v3 4/4] python3-dtc: fix " Jaipaul Cheernam
2026-08-11 13:51 ` [PATCH v4 0/4] swig: upgrade 4.4.1 -> 4.5.0 Jaipaul Cheernam
2026-08-11 13:51 ` [PATCH v4 1/4] " Jaipaul Cheernam
2026-08-11 13:51 ` [PATCH v4 2/4] babeltrace2: fix build with swig 4.5.0 Jaipaul Cheernam
2026-08-11 13:51 ` [PATCH v4 3/4] u-boot-tools: fix pylibfdt " Jaipaul Cheernam
2026-08-11 13:52 ` [PATCH v4 4/4] python3-dtc: fix " Jaipaul Cheernam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DKM4RNDHJJQ3.13B6BZNOT7ZRM@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=jaipaul.cheernam@est.tech \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.