diff mbox series

[meta-oe] libgpiod-1: Inherit python3targetconfig

Message ID 20260324151508.2702-1-mark.jonas@de.bosch.com
State Accepted
Headers show
Series [meta-oe] libgpiod-1: Inherit python3targetconfig | expand

Commit Message

Jonas Mark (BT-EL/ESW1) March 24, 2026, 3:15 p.m. UTC
From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>

Inherit python3targetconfig so that cross python3-config is used instead
of native.

This fixes the below error when building on a 64 bit host for a 32 bit
target:

| In file included from /workspaces/yocto/build/tmp/work/core2-32-poky-linux/libgpiod/1.6.5/recipe-sysroot-native/usr/include/python3.14/Python.h:72,
|                  from ../../../sources/libgpiod-1.6.5/bindings/python/gpiodmodule.c:8:
| /workspaces/yocto/build/tmp/work/core2-32-poky-linux/libgpiod/1.6.5/recipe-sysroot-native/usr/include/python3.14/pyport.h:429:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
|   429 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
|       |  ^~~~~

Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

Jonas Mark (BT-EL/ESW1) March 24, 2026, 3:40 p.m. UTC | #1
Hi Bartosz,

I am sorry, I used an outdated email address of yours. I hope I got it right this time.

Cheers,
Mark

> -----Ursprüngliche Nachricht-----
> Von: Jonas Mark (BT-EL/ESW1) <mark.jonas@de.bosch.com>
> Gesendet: Dienstag, 24. März 2026 16:15
> An: openembedded-devel@lists.openembedded.org
> Cc: Khem Raj <raj.khem@gmail.com>; Bartosz Golaszewski
> <bartosz.golaszewski@linaro.org>; Simoes Ricardo (BT-EL/ESW2)
> <ricardo.simoes@pt.bosch.com>; Jonas Mark (BT-EL/ESW1)
> <mark.jonas@de.bosch.com>
> Betreff: [meta-oe][PATCH] libgpiod-1: Inherit python3targetconfig
> 
> From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> 
> Inherit python3targetconfig so that cross python3-config is used
> instead of native.
> 
> This fixes the below error when building on a 64 bit host for a 32 bit
> target:
> 
> | In file included from /workspaces/yocto/build/tmp/work/core2-32-
> poky-linux/libgpiod/1.6.5/recipe-sysroot-
> native/usr/include/python3.14/Python.h:72,
> |                  from ../../../sources/libgpiod-
> 1.6.5/bindings/python/gpiodmodule.c:8:
> | /workspaces/yocto/build/tmp/work/core2-32-poky-
> linux/libgpiod/1.6.5/recipe-sysroot-
> native/usr/include/python3.14/pyport.h:429:2: error: #error "LONG_BIT
> definition appears wrong for platform (bad gcc/glibc config?)."
> |   429 | #error "LONG_BIT definition appears wrong for platform (bad
> gcc/glibc config?)."
> |       |  ^~~~~
> 
> Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> ---
>  meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
> b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
> index 009cf9897a..583648a6a3 100644
> --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
> @@ -10,6 +10,7 @@ SRC_URI[sha256sum] =
> "ae280f697bf035a1fb780c9972e5c81d0d2712b7ab6124fb3fba24619d
>  FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-1.x:"
> 
>  inherit python3native
> +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3',
> +'python3targetconfig', '', d)}
> 
>  PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev
> glib-2.0 catch2"
>  PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-
> bindings-python,python3"
> --
> 2.34.1
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
index 009cf9897a..583648a6a3 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.5.bb
@@ -10,6 +10,7 @@  SRC_URI[sha256sum] = "ae280f697bf035a1fb780c9972e5c81d0d2712b7ab6124fb3fba24619d
 FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}-1.x:"
 
 inherit python3native
+inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3targetconfig', '', d)}
 
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
 PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"