| Message ID | 20250413080802.602658-1-yoann.congal@smile.fr |
|---|---|
| State | Accepted |
| Headers | show |
| Series | [meta-python,1/2] python3-evdev: Use Yocto kernel headers instead of host's | expand |
This is now needed in walnascar branch as well. On Sun, Apr 13, 2025 at 10:08 AM Yoann Congal via lists.openembedded.org <yoann.congal=smile.fr@lists.openembedded.org> wrote: > > From: Yoann Congal <yoann.congal@smile.fr> > > Commit 01ebfecf1c94 ("python3-evdev: switch to PEP-517 build backend") > did not update the way build arguments are passed to the build making > them unused. In python3-evdev case that meant that the build used host > kernel headers instead of Yocto's. > > When host's and Yocto's headers were different (currently the case on > Debian 12 as seen on AB[0]), that triggered: > > | src/evdev/ecodes.c:542:29: error: 'KEY_LINK_PHONE' undeclared (first use in this function); did you mean 'KEY_PICKUP_PHONE'? > | 542 | PyModule_AddIntMacro(m, KEY_LINK_PHONE); > | | ^~~~~~~~~~~~~~ > [...] > ERROR: Task (.../../../layers/meta-openembedded/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb:do_compile) failed with exit code '1' > > To fix this, use PEP517_BUILD_OPTS with the working (but weird looking) escaping. > > Now that correct headers are used, their paths end up in the ecode.c > file which lead to a buildpaths error, skip the check for this patch. > This will be fixed in a following patch. > > [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/40/steps/40/logs/stdio > > Signed-off-by: Yoann Congal <yoann.congal@smile.fr> > --- > meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb b/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb > index c48bc39c1f..b8930c97d5 100644 > --- a/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb > +++ b/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb > @@ -11,7 +11,8 @@ do_compile:prepend() { > rm -rf ${S}/evdev/ecodes.c > } > > -SETUPTOOLS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h" > +PEP517_BUILD_OPTS = "--config-setting=--build-option='build_ecodes \ > + --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h'" > > RDEPENDS:${PN} += "\ > python3-ctypes \ > @@ -20,3 +21,4 @@ RDEPENDS:${PN} += "\ > python3-shell \ > python3-stringold \ > " > +INSANE_SKIP:${PN}-src = "buildpaths" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116822): https://lists.openembedded.org/g/openembedded-devel/message/116822 > Mute This Topic: https://lists.openembedded.org/mt/112238391/3617156 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb b/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb index c48bc39c1f..b8930c97d5 100644 --- a/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb +++ b/meta-python/recipes-devtools/python/python3-evdev_1.9.1.bb @@ -11,7 +11,8 @@ do_compile:prepend() { rm -rf ${S}/evdev/ecodes.c } -SETUPTOOLS_BUILD_ARGS = "build_ecodes --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h" +PEP517_BUILD_OPTS = "--config-setting=--build-option='build_ecodes \ + --evdev-headers ${STAGING_DIR_TARGET}/usr/include/linux/input.h:${STAGING_DIR_TARGET}/usr/include/linux/input-event-codes.h'" RDEPENDS:${PN} += "\ python3-ctypes \ @@ -20,3 +21,4 @@ RDEPENDS:${PN} += "\ python3-shell \ python3-stringold \ " +INSANE_SKIP:${PN}-src = "buildpaths"