new file mode 100644
@@ -0,0 +1,38 @@
+From 54fdc743fbf0ea137b29c580fbeffe4afa610a78 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 25 Sep 2025 15:19:31 +0800
+Subject: [PATCH] fix racing on out of source tree build
+
+While building out of source tree, there is a racing issue
+on the existence of dir ./src
+...
+python3 ../sources/xcb-util-errors-1.0.1/src/extensions.py src/extensions.c.tmp path-to/1.0.1/recipe-sysroot/usr/share/xcb/*.xml && \
+mv src/extensions.c.tmp src/extensions.c
+ File "src/extensions.py", line 91, in <module>
+ output = open(output_file, "w")
+FileNotFoundError: [Errno 2] No such file or directory: 'src/extensions.c.tmp'
+make: *** [Makefile:1435: src/extensions.c] Error 1
+...
+
+Explicitly create dir ./src before generating src/extensions.c.tmp
+
+Upstream-Status: Submitted [xorg-devel@lists.x.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index bdf4a30..9defbb8 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -37,5 +37,5 @@ tests_test_LDADD = libxcb-errors.la $(XCB_LIBS)
+ CLEANFILES = src/extensions.c
+
+ src/extensions.c: src/extensions.py
+- $(AM_V_GEN)$(PYTHON) $(srcdir)/src/extensions.py $@.tmp ${XCBPROTO_XCBINCLUDEDIR}/*.xml && \
++ mkdir -p src && $(AM_V_GEN)$(PYTHON) $(srcdir)/src/extensions.py $@.tmp ${XCBPROTO_XCBINCLUDEDIR}/*.xml && \
+ mv $@.tmp $@
+--
+2.34.1
+
@@ -1,12 +1,15 @@
require recipes-graphics/xorg-lib/xcb-util.inc
+SRC_URI += " \
+ file://0001-fix-racing-on-out-of-source-tree-build.patch \
+"
SUMMARY = "xcb-util-errors gives human readable names to error codes and event codes"
DEPENDS += "xcb-util xorgproto"
-export PYTHON = "python3"
-
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c90ee77011043c608617f5323a523726"
SRC_URI[sha256sum] = "5628c87b984259ad927bacd8a42958319c36bdf4b065887803c9d820fb80f357"
+
+inherit python3native
While building out of source tree, there is a racing issue on the existence of dir ./src ... python3 ../sources/xcb-util-errors-1.0.1/src/extensions.py src/extensions.c.tmp path-to/1.0.1/recipe-sysroot/usr/share/xcb/*.xml && \ mv src/extensions.c.tmp src/extensions.c File "src/extensions.py", line 91, in <module> output = open(output_file, "w") FileNotFoundError: [Errno 2] No such file or directory: 'src/extensions.c.tmp' make: *** [Makefile:1435: src/extensions.c] Error 1 ... Explicitly create dir ./src before generating src/extensions.c.tmp Inherit python3native to instead of host python3 to run python script Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- ...x-racing-on-out-of-source-tree-build.patch | 38 +++++++++++++++++++ .../xorg-lib/xcb-util-errors_1.0.1.bb | 7 +++- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/xorg-lib/xcb-util-errors/0001-fix-racing-on-out-of-source-tree-build.patch