Skip to contentSkip to conversation

python3-dbus-deviation: Drop all setup_requires to fix build failure

PATCH New Khem Raj 1 participant 8 messages Jul 13

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/8 python3-dbus-deviation: Drop all setup_requires to fix build failure

do_compile failed with:

AttributeError: 'NoneType' object has no attribute 'lower'

A non-empty setup_requires makes setuptools run fetch_build_eggs(), which enumerates every distribution in the native sysroot and calls packaging.utils.canonicalize_name(dist.name). Under the setuptools/ Python 3.14 in the sysroot one distribution exposes a None name, so canonicalize_name() crashes on None.lower() and aborts the build.

Extend the existing patch to drop the whole setup_requires block instead of only setuptools_git. sphinx is only used by the build_sphinx command (not run during do_compile) and is already provided via DEPENDS, so removing it is safe and keeps setuptools out of the fetch_build_eggs() path.

---
 ...o-donwload-requierment-which-will-ca.patch | 25 +++++++++++++------
 1 file changed, 17 insertions(+), 8 deletions(-)
meta-python/recipes-devtools/python/python3-dbus-deviation/0001-Prevent-trying-to-donwload-requierment-which-will-ca.patch +17 -8
index b163db772c..7acb4493c8 100644
@@ -3,25 +3,34 @@ Subject: [PATCH] Prevent trying to donwload requierment which will cause
 
 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1e83062ad0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-git/
 
+Dropping all setup_requires entries also avoids setuptools'
+fetch_build_eggs() code path, which enumerates every installed
+distribution in the native sysroot and crashes with
+"AttributeError: 'NoneType' object has no attribute 'lower'" when one of
+them exposes a None name under newer setuptools/Python. sphinx is only
+needed for the build_sphinx command (not run during do_compile) and is
+provided via DEPENDS, so it is safe to remove here.
+
 Upstream-Status: Inappropriate [oe specific]
 
-Signed-off-by: Liu Yiding <[email protected]>
+Signed-off-by: Liu Yiding <[email protected]>
 ---
- setup.py | 1 -
- 1 file changed, 1 deletion(-)
+ setup.py | 4 ----
+ 1 file changed, 4 deletions(-)
 
 diff --git a/setup.py b/setup.py
 index 245193f..d899e4c 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -92,7 +92,6 @@ setuptools.setup(
+@@ -92,8 +92,4 @@ setuptools.setup(
      exclude_package_data={'': ['.gitignore']},
      zip_safe=True,
-     setup_requires=[
+-    setup_requires=[
 -        'setuptools_git >= 0.3',
-         'sphinx',
-     ],
+-        'sphinx',
+-    ],
      install_requires=['lxml'],
---
+     tests_require=[],
+--
 2.43.0
 
author
#1 lore raw

PATCH 2/8 sysdig: Fix intermittent missing libsinsp/libscap headers on rebuild

do_compile could fail with many:

fatal error: 'libsinsp/sinsp.h' file not found
fatal error: 'sinsp.h' file not found
fatal error: 'libscap/strl.h' file not found

across all userspace/sysdig objects, even though the headers exist in the fetched falcosecurity-libs source.

The add_library de-duplication patch guarded the libscap/libsinsp modules with a HAVE_LIBSCAP/HAVE_LIBSINSP flag set as CACHE INTERNAL. Because that value persists in CMakeCache, ninja's build-time regeneration rule (cmake --regenerate-during-build, which fires whenever a CMake input's timestamp changes between do_configure and do_compile) re-runs cmake with the flag already true. The libscap/libsinsp add_subdirectory() is then skipped, dropping the scap/sinsp targets and their PUBLIC include directories, so target_link_libraries(sysdig sinsp) degrades to a bare -lsinsp with no header propagation.

Guard on target existence (if(NOT TARGET scap|sinsp)) instead. Target existence is global within a single cmake run -- so it still prevents the duplicate add_library -- but is not persisted across runs, so the modules are correctly re-processed on every regeneration.

Verified: a build-time cmake regeneration now keeps the libsinsp/libscap object rules and falcosecurity-libs include paths in build.ninja, and a full clean build plus a post-touch recompile both succeed.

---
 ...-duplicate-operations-of-add_library.patch | 34 +++++++++++++------
 1 file changed, 23 insertions(+), 11 deletions(-)
meta-oe/recipes-extended/sysdig/sysdig/0001-Avoid-duplicate-operations-of-add_library.patch +23 -11
index b8ca7dd38b..ec9ca46269 100644
@@ -9,36 +9,48 @@ To fix following configure error
 |   add_library cannot create target "scap_error" because another target with
 |   the same name already exists.  The existing target is a static library
 
+Guard the libscap/libsinsp modules on the existence of the "scap"/"sinsp"
+targets rather than on a cached HAVE_LIBSCAP/HAVE_LIBSINSP flag. A cached
+flag persists into the CMakeCache, so when Ninja re-runs CMake during the
+build (the "cmake --regenerate-during-build" RERUN rule fires whenever a
+CMake input's timestamp changes) the guard is already true and the
+add_subdirectory() for libscap/libsinsp is skipped. That drops the scap/
+sinsp targets and their PUBLIC include directories, and the userspace/
+sysdig targets then fail to compile with "'libsinsp/sinsp.h' file not
+found". Target existence is global within a single CMake run (so it still
+prevents the duplicate add_library) but is not persisted across runs, so
+the modules are re-processed on every regeneration.
+
 Upstream-Status: Inappropriate [oe-specific]
 Signed-off-by: Liu Yiding <[email protected]>
 ---
- cmake/modules/libscap.cmake  | 2 +-
- cmake/modules/libsinsp.cmake | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ cmake/modules/libscap.cmake  | 3 +--
+ cmake/modules/libsinsp.cmake | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/cmake/modules/libscap.cmake b/cmake/modules/libscap.cmake
-index b41b12ff3..1753598e9 100644
 --- a/cmake/modules/libscap.cmake
 +++ b/cmake/modules/libscap.cmake
-@@ -14,7 +14,7 @@
+@@ -13,8 +13,7 @@
+ # the License.
  #
 
- if(NOT HAVE_LIBSCAP)
+-if(NOT HAVE_LIBSCAP)
 -	set(HAVE_LIBSCAP On)
-+        set(HAVE_LIBSCAP On CACHE INTERNAL "Flag to indicate libscap has been processed")
++if(NOT TARGET scap)
 
  	if(NOT LIBS_DIR)
  		get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
 diff --git a/cmake/modules/libsinsp.cmake b/cmake/modules/libsinsp.cmake
-index ff336e27f..0fdd2d4a9 100644
 --- a/cmake/modules/libsinsp.cmake
 +++ b/cmake/modules/libsinsp.cmake
-@@ -14,7 +14,7 @@
+@@ -13,8 +13,7 @@
+ # the License.
  #
 
- if(NOT HAVE_LIBSINSP)
+-if(NOT HAVE_LIBSINSP)
 -	set(HAVE_LIBSINSP On)
-+        set(HAVE_LIBSINSP On CACHE INTERNAL "Flag to indicate libsinsp has been processed")
++if(NOT TARGET sinsp)
 
  	if(NOT LIBS_DIR)
  		get_filename_component(LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
author
#2 lore raw

PATCH 3/8 bpftrace: link test data source binary without host runtime

In reply to Khem Raj

The build host HOME directory check recently added to OE-Core's buildpaths QA test flags the ptest gtest binary:

WARNING: bpftrace-0.25.1-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/bpftrace_test in package bpftrace-ptest contains a reference to the build host HOME directory. [buildpaths]

WARNING: bpftrace-0.25.1-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/.debug/bpftrace_test in package bpftrace-dbg contains a reference to the build host HOME directory. [buildpaths]

cmake/BuildBPF.cmake links the intermediate DWARF carrier binary data_source_exe with the plain build host gcc, which bakes the host dynamic loader's absolute path into the PT_INTERP segment. With a distro gcc that is an innocuous /lib64/ld-linux-x86-64.so.2, but when the host toolchain is a buildtools-extended/SDK gcc installed under the build user's home directory (as on the autobuilder workers), it is a $HOME-prefixed path like

/srv/pokybuild/.../buildtools/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2

The executable is then embedded byte-for-byte into bpftrace_test via embed()/xxd (tests/data/CMakeLists.txt), so the path ends up in the test binary's .rodata, triggering the bpftrace-ptest warning. And because cmake/Embed.tmpl declares the embedded blob as a constexpr array, gcc additionally copies its contents into .debug_info as DW_AT_const_value, which is how the same string survives objcopy --only-keep-debug into the split debug file, triggering the bpftrace-dbg warning. This is the same embedding mechanism that previously leaked TMPDIR paths, fixed for the compile step by the DEBUG_PREFIX_MAP patch; the link step was still leaking.

The tests only write this binary to a temp file and use it as a uprobe target (tests/dwarf_common.h), parsing its DWARF and symbols; it is never executed. So link it with -nostdlib -no-pie -Wl,--entry=0:
no interpreter, no host crt objects, no dynamic segment, and thus nothing host-specific in the embedded blob. Function symbols, DWARF type information and the pahole -J BTF encoding step are unaffected, and the field_analyser_dwarf ptests still pass.

Because the object is now linked -nostdlib it must not reference the libc stack-protector runtime. Host gcc toolchains that default to -fstack-protector-strong (e.g. Debian/Ubuntu and the Yocto autobuilder workers) otherwise leave an undefined reference and the link fails:

ld: data_source.o: in function `main':
data_source.c:212: undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status

Compile the object and link the binary with -fno-stack-protector; the canary is irrelevant to a DWARF/BTF carrier that is never run.

---
 ...make-link-data-source-binary-without.patch | 78 +++++++++++++++++++
 .../bpftrace/bpftrace_0.25.1.bb               |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-cmake-BuildBPF.cmake-link-data-source-binary-without.patch
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-cmake-BuildBPF.cmake-link-data-source-binary-without.patch new file +78 -0
new file mode 100644
index 0000000000..7a69d0f8c1
@@ -0,0 +1,78 @@
+From: Khem Raj <[email protected]>
+Date: Thu, 2 Jul 2026 15:30:00 -0700
+Subject: [PATCH] cmake/BuildBPF.cmake: link data source binary without host
+ runtime
+
+The `bpf()` helper links the intermediate DWARF carrier binary
+(data_source_exe) with the plain host gcc:
+
+  ${GCC} -g -o data_source_exe data_source.o
+
+and the resulting executable is then embedded byte-for-byte into
+bpftrace_test via embed()/xxd (tests/data/CMakeLists.txt). Linking it as
+a regular dynamic executable bakes host-toolchain artifacts into it:
+
+  * PT_INTERP: the absolute path of the host toolchain's dynamic
+    loader. With a vendored/SDK toolchain (e.g. Yocto
+    buildtools-extended installed under the build user's home) this is
+    an absolute build-host path such as
+    /srv/pokybuild/.../buildtools/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2
+  * crt startup objects (crt1.o, crti.o, crtbegin.o) including whatever
+    debug info the host libc was built with.
+
+Since the embedded blob carries these strings into the packaged test
+binary, the build is not reproducible across hosts and leaks build host
+paths, flagged by OE's buildpaths QA check:
+
+  WARNING: bpftrace-0.25.1-r0 do_package_qa: QA Issue: File
+  /usr/lib/bpftrace/ptest/tests/bpftrace_test in package bpftrace-ptest
+  contains a reference to the build host HOME directory. [buildpaths]
+
+The binary only serves as a DWARF/BTF container: the tests write it to
+a temp file and use it as a uprobe target (tests/dwarf_common.h), which
+parses debug info and symbols but never executes it. So link it with
+-nostdlib -no-pie: no interpreter, no dynamic segment, no host crt
+code. -Wl,--entry=0 silences the "cannot find entry symbol _start"
+warning. All function symbols, DWARF type information and the
+pahole -J BTF encoding step are unaffected.
+
+Because the object is now linked -nostdlib, it must not emit references
+to the libc stack-protector runtime. Host gcc toolchains that default to
+-fstack-protector-strong (e.g. Debian/Ubuntu, the Yocto autobuilders)
+otherwise leave an undefined reference and the link fails:
+
+  ld: data_source.o: in function `main':
+  data_source.c:212: undefined reference to `__stack_chk_fail'
+  collect2: error: ld returned 1 exit status
+
+Compile the object (and link the binary) with -fno-stack-protector; the
+canary is irrelevant to a DWARF/BTF carrier that is never run.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ cmake/BuildBPF.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/BuildBPF.cmake b/cmake/BuildBPF.cmake
+index cb8cd68..8aa059f 100644
+--- a/cmake/BuildBPF.cmake
++++ b/cmake/BuildBPF.cmake
+@@ -90,7 +90,7 @@ function(bpf NAME)
+     OUTPUT ${ARG_OBJECT}
+     DEPENDS ${ARG_SOURCE} ${ARG_DEPENDS}
+     # See above: fresh compilation and the use of `gcc`.
+-    COMMAND ${GCC} -Wno-attributes -g -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
++    COMMAND ${GCC} -Wno-attributes -fno-stack-protector -g -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
+     COMMAND cmake -E env LLVM_OBJCOPY=${LLVM_OBJCOPY} ${PAHOLE} -J ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
+     VERBATIM
+   )
+@@ -107,7 +107,7 @@ function(bpf NAME)
+     add_custom_command(
+       OUTPUT ${ARG_BINARY}
+       DEPENDS ${ARG_SOURCE} ${NAME}_gen_object
+-      COMMAND ${GCC} -g -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_BINARY} ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
++      COMMAND ${GCC} -g -fno-stack-protector -nostdlib -no-pie -Wl,--entry=0 -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_BINARY} ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
+       COMMAND cmake -E env LLVM_OBJCOPY=${LLVM_OBJCOPY} ${PAHOLE} -J ${CMAKE_CURRENT_BINARY_DIR}/${ARG_BINARY}
+       VERBATIM
+     )
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.25.1.bb +1 -0
index 62e0c17f9d..7daf02ba1c 100644
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.25.x;protocol=http
            file://run-ptest \
            file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \
            file://0001-cmake-BuildBPF.cmake-introduce-DEBUG_PREFIX_MAP.patch \
+           file://0003-cmake-BuildBPF.cmake-link-data-source-binary-without.patch \
 "
 SRCREV = "e491811e5d648288c01f42ce087967b271f504a0"
 
author
#3 lore raw

PATCH 4/8 sysdig: Use LuaJIT headers to match the linked LuaJIT library

In reply to Khem Raj

csysdig fails to link when stock Lua is also present in the sysroot:

ld.lld: error: undefined symbol: luaL_openselectedlibs

Quoted 1 line
Quoted 1 line
Quoted 1 line

referenced by chisel.cpp:1190

ld.lld: error: undefined symbol: lua_pcallk
ld.lld: error: undefined symbol: lua_setglobal

sysdig's chisel code does #include "lua.h" and links against LuaJIT (lua${JIT}), but the recipe-sysroot also carries stock Lua headers (openembedded-core lua installs lua.h into ${includedir}). Those headers win the include search over ${includedir}/luajit-2.1, so the chisel objects are compiled against stock Lua while the binary links libluajit-5.1.so. In Lua >= 5.4.4 luaL_openlibs is a macro for luaL_openselectedlibs and lua_setglobal/lua_pcallk are real symbols, none of which LuaJIT (a Lua 5.1 ABI) provides, hence the undefined references. -DLUA_INCLUDE_DIR does not help: sysdig's luajit.cmake only consults it in its stock-Lua fallback, not when it finds LuaJIT.

Prepend ${STAGING_INCDIR}/luajit-2.1 to CFLAGS/CXXFLAGS. These land in CMAKE_CXX_FLAGS, which precede CMake's generated -I includes, so LuaJIT's lua.h is found first and matches the linked library.

---
 meta-oe/recipes-extended/sysdig/sysdig_0.39.0.bb | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/sysdig/sysdig_0.39.0.bb +11 -2
index 6d754b9bd0..bea66ad17c 100644
@@ -62,9 +62,18 @@ EXTRA_OECMAKE = "\
                 -DCREATE_TEST_TARGETS=OFF \
 "
 
+# sysdig's chisel code does #include "lua.h". The recipe-sysroot also carries
+# stock Lua headers (openembedded-core lua installs lua.h into ${includedir}),
+# which are ABI-incompatible with the LuaJIT library sysdig links against: in
+# Lua >= 5.4.4 luaL_openlibs is a macro for luaL_openselectedlibs and
+# lua_setglobal/lua_pcallk are real symbols, none of which LuaJIT provides.
+# sysdig's luajit.cmake only honours LUA_INCLUDE_DIR in its stock-Lua fallback,
+# not when it finds LuaJIT, and the LuaJIT include dir does not win the search
+# order, so lua.h resolves to the stock header and the link fails. Put the
+# LuaJIT include dir first so its lua.h is used and matches the linked library.
 #Add include dir to find driver_config.h
-CXXFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src"
-CFLAGS:append = " -I${WORKDIR}/driver_Make/driver/src"
+CXXFLAGS:append = " -I${STAGING_INCDIR}/luajit-2.1 -I${WORKDIR}/driver_Make/driver/src"
+CFLAGS:append = " -I${STAGING_INCDIR}/luajit-2.1 -I${WORKDIR}/driver_Make/driver/src"
 
 #To fix do_package QA Issue
 do_compile:append() {
author
#4 lore raw

PATCH 5/8 gerbera: fix build against fmt 12.2.0

In reply to Khem Raj

fmt 12.2.0 turns <fmt/core.h> into a shim that only pulls in <fmt/base.h>, which no longer declares fmt::format() and no longer drags in <cstring> transitively. gerbera 3.0.0 relied on both, so do_compile fails first with:

src/exceptions.cc:37:31: error: no member named 'format' in namespace 'fmt'

and, once that is addressed, with a second wave of:

src/util/thread_runner.h:194:68: error: no member named 'strerror' in namespace 'std' src/content/inotify/mt_inotify.cc:163:13: error: no member named 'memcpy' in namespace 'std' src/util/url_utils.cc:144:24: error: no member named 'strchr' in namespace 'std'

Add two backport patches:

* 0001 switches the central headers exceptions.h and search_handler.h from <fmt/core.h> to <fmt/format.h> (upstream commit 9507706136fd).
* 0002 adds an explicit #include <cstring> to every translation unit that uses std::strerror/std::memcpy/std::strchr (based on upstream commit 7caa9ae9ebf5, extended to cover all affected files in this release).

Neither fix is in any released gerbera tag (both are master-only), so a version bump would not help; backporting is the least invasive option.

---
 ...-against-fmt-12-include-fmt-format.h.patch |  53 +++++
 ...-cstring-for-std-strerror-std-memcpy.patch | 204 ++++++++++++++++++
 .../gerbera/gerbera_3.0.0.bb                  |   5 +-
 3 files changed, 261 insertions(+), 1 deletion(-)
 create mode 100644 meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-fix-build-against-fmt-12-include-fmt-format.h.patch
 create mode 100644 meta-multimedia/recipes-multimedia/gerbera/gerbera/0002-include-cstring-for-std-strerror-std-memcpy.patch
meta-multimedia/recipes-multimedia/gerbera/gerbera/0001-fix-build-against-fmt-12-include-fmt-format.h.patch new file +53 -0
new file mode 100644
index 0000000000..eaaf7869e5
@@ -0,0 +1,53 @@
+From 9507706136fd0000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 8 Jul 2026 00:00:00 +0000
+Subject: [PATCH] fix build against fmt 12: include fmt/format.h
+
+Since fmt 11, <fmt/core.h> is a thin shim that only pulls in <fmt/base.h>
+and no longer declares fmt::format() unless FMT_DEPRECATED_HEAVY_CORE is
+defined. fmt 12.2.0 finishes the job and the build fails with:
+
+  src/exceptions.cc:37:31: error: no member named 'format' in namespace 'fmt'
+      : std::runtime_error(fmt::format("{}: Error: {}", message, userMessage))
+
+Include <fmt/format.h> in the central headers that expose fmt::format()
+to the rest of the tree (exceptions.h via throw_std_runtime_error, and
+search_handler.h) so all consumers see the declaration again.
+
+Backport of gerbera commit 9507706136fd.
+
+Upstream-Status: Backport [https://github.com/gerbera/gerbera/commit/9507706136fd]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/exceptions.h            | 2 +-
+ src/database/search_handler.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/exceptions.h b/src/exceptions.h
+index 1111111..2222222 100644
+--- a/src/exceptions.h
++++ b/src/exceptions.h
+@@ -34,7 +34,7 @@
+ #ifndef __EXCEPTIONS_H__
+ #define __EXCEPTIONS_H__
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+ #include <stdexcept>
+ #include <string>
+
+diff --git a/src/database/search_handler.h b/src/database/search_handler.h
+index 3333333..4444444 100644
+--- a/src/database/search_handler.h
++++ b/src/database/search_handler.h
+@@ -32,7 +32,7 @@
+ #include "util/tools.h"
+
+ #include <algorithm>
+-#include <fmt/core.h>
++#include <fmt/format.h>
+ #include <map>
+ #include <memory>
+ #include <tuple>
+--
+2.43.0
meta-multimedia/recipes-multimedia/gerbera/gerbera/0002-include-cstring-for-std-strerror-std-memcpy.patch new file +204 -0

204 lines not on this page · raw message

meta-multimedia/recipes-multimedia/gerbera/gerbera_3.0.0.bb +4 -1
index fdbd91f9b0..a08c31d0c2 100644
@@ -3,7 +3,10 @@ Description = "Gerbera is a UPnP media server which allows you to stream your di
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
 
-SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master;tag=v${PV}"
+SRC_URI = "git://github.com/gerbera/gerbera.git;protocol=https;branch=master;tag=v${PV} \
+           file://0001-fix-build-against-fmt-12-include-fmt-format.h.patch \
+           file://0002-include-cstring-for-std-strerror-std-memcpy.patch \
+           "
 SRCREV = "7846f3dd5d0f848a60d0c3146c3b7290881a8992"
 
 
author
#5 lore raw

PATCH 6/8 librav1e: fix nasm-native dependency override for x86-64

In reply to Khem Raj

The DEPENDS append used the raw TARGET_ARCH value "x86_64" as an override:

DEPENDS:append:x86_64 = " nasm-native"

but OVERRIDES is built from TRANSLATED_TARGET_ARCH, which replaces "_" with "-", so the effective override token is "x86-64". The "x86_64" form never matches and nasm-native is never pulled in, so do_compile fails on x86-64 with:

error: Unable to run nasm: No such file or directory (os error 2)

Use the correct "x86-64" token (matching the INHIBIT_PACKAGE_DEBUG_SPLIT line right below it) and also add the "x86" variant for 32-bit x86 targets, mirroring dav1d.

---
 meta-multimedia/recipes-multimedia/rav1e/librav1e_p20250902.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/rav1e/librav1e_p20250902.bb +2 -1
index 80ac5d9268..4c03c9417d 100644
@@ -7,7 +7,8 @@ inherit cargo_c pkgconfig cargo-update-recipe-crates
 
 require ${PN}-crates.inc
 
-DEPENDS:append:x86_64 = " nasm-native"
+DEPENDS:append:x86 = " nasm-native"
+DEPENDS:append:x86-64 = " nasm-native"
 
 SRC_URI += "git://github.com/xiph/rav1e.git;protocol=https;nobranch=1;tag=${PV}"
 SRCREV = "a2f01b3e233f531c28a20b4c29fb5c9e5d29fa6d"
author
#6 lore raw

PATCH 7/8 bpftrace: fix patch context so -fno-stack-protector applies to test object

In reply to Khem Raj

The 0003 patch that links the data_source test carrier binary without the host runtime also adds -fno-stack-protector to the object compile line, needed because host gcc toolchains default to -fstack-protector-strong and the -nostdlib link then fails with:

data_source.c:212: undefined reference to `__stack_chk_fail'

However patch 0001 (DEBUG_PREFIX_MAP) runs first in SRC_URI and rewrites the same compile line to insert ${DEBUG_PREFIX_MAP_LIST}, so 0003's first hunk no longer matched the tree and the -fno-stack-protector flag was silently dropped from the object compile (it only landed on the link line). Rebase 0003's first hunk onto the post-0001 context so the flag is applied where it is needed.

---
 ...cmake-BuildBPF.cmake-link-data-source-binary-without.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-cmake-BuildBPF.cmake-link-data-source-binary-without.patch +2 -2
index 7a69d0f8c1..695f709d6b 100644
@@ -62,8 +62,8 @@ index cb8cd68..8aa059f 100644
      OUTPUT ${ARG_OBJECT}
      DEPENDS ${ARG_SOURCE} ${ARG_DEPENDS}
      # See above: fresh compilation and the use of `gcc`.
--    COMMAND ${GCC} -Wno-attributes -g -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
-+    COMMAND ${GCC} -Wno-attributes -fno-stack-protector -g -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
+-    COMMAND ${GCC} -Wno-attributes -g ${DEBUG_PREFIX_MAP_LIST} -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
++    COMMAND ${GCC} -Wno-attributes -fno-stack-protector -g ${DEBUG_PREFIX_MAP_LIST} -I ${CMAKE_CURRENT_BINARY_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
      COMMAND cmake -E env LLVM_OBJCOPY=${LLVM_OBJCOPY} ${PAHOLE} -J ${CMAKE_CURRENT_BINARY_DIR}/${ARG_OBJECT}
      VERBATIM
    )
author
#7 lore raw

PATCH 8/8 mpd: fix build against fmt 12.2.0

In reply to Khem Raj

Since fmt 12.2.0, <fmt/core.h> is a shim that only includes <fmt/base.h>, which does not declare fmt::format(). Building mpd 0.24.9 against it fails with:

src/net/ToString.cxx:80:16: error: no member named 'format' in namespace 'fmt' src/lib/avahi/Publisher.cxx:37:9: error: no member named 'format' in namespace 'fmt'

Add a patch that includes <fmt/format.h> directly in the files that call fmt::format(). This mirrors the upstream fix (MPD commits 88d5b5248d71 and 109c26258b9d), extended to the files present in the 0.24.9 release that call fmt::format() but were not covered by those commits.

---
 ...port-use-fmt-format.h-not-fmt-core.h.patch | 208 ++++++++++++++++++
 .../recipes-multimedia/musicpd/mpd_0.24.9.bb  |   1 +
 2 files changed, 209 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0001-libfmt-12.2.0-support-use-fmt-format.h-not-fmt-core.h.patch
meta-multimedia/recipes-multimedia/musicpd/mpd/0001-libfmt-12.2.0-support-use-fmt-format.h-not-fmt-core.h.patch new file +208 -0
new file mode 100644
index 0000000000..cf5da582c8
@@ -0,0 +1,208 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 8 Jul 2026 00:00:00 +0000
+Subject: [PATCH] libfmt 12.2.0 support: use fmt/format.h not fmt/core.h
+
+Since libfmt 12.2.0, <fmt/core.h> is a shim that only includes
+<fmt/base.h>, which does not declare fmt::format(). Building against it
+fails with:
+
+  src/net/ToString.cxx:80:16: error: no member named 'format' in namespace 'fmt'
+  src/lib/avahi/Publisher.cxx:37:9: error: no member named 'format' in namespace 'fmt'
+
+Include <fmt/format.h> directly in the files that call fmt::format().
+This mirrors the upstream fix (MPD commits 88d5b5248d71 and 109c26258b9d)
+extended to the files present in this release that call fmt::format().
+
+Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/88d5b5248d71]
+Signed-off-by: Khem Raj <[email protected]>
+---
+--- a/src/client/New.cxx
++++ b/src/client/New.cxx
+@@ -17,7 +17,7 @@
+ #include "Log.hxx"
+ #include "Version.h"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+
+--- a/src/db/plugins/upnp/UpnpDatabasePlugin.cxx
++++ b/src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+@@ -24,7 +24,7 @@
+ #include "util/StringSplit.hxx"
+ #include "config/Block.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+ #include <string>
+--- a/src/db/update/Playlist.cxx
++++ b/src/db/update/Playlist.cxx
+@@ -20,7 +20,7 @@
+ #include "fs/Traits.hxx"
+ #include "Log.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ inline void
+ UpdateWalk::UpdatePlaylistFile(Directory &directory,
+--- a/src/input/plugins/AlsaInputPlugin.cxx
++++ b/src/input/plugins/AlsaInputPlugin.cxx
+@@ -27,7 +27,7 @@
+
+ #include <alsa/asoundlib.h>
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+
+--- a/src/input/plugins/QobuzClient.cxx
++++ b/src/input/plugins/QobuzClient.cxx
+@@ -4,7 +4,7 @@
+ #include "QobuzClient.hxx"
+ #include "lib/crypto/MD5.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+ #include <stdexcept>
+--- a/src/input/plugins/QobuzLoginRequest.cxx
++++ b/src/input/plugins/QobuzLoginRequest.cxx
+@@ -6,7 +6,7 @@
+ #include "QobuzSession.hxx"
+ #include "lib/curl/Form.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+ #include <nlohmann/json.hpp>
+
+ #include <cassert>
+--- a/src/input/plugins/QobuzTrackRequest.cxx
++++ b/src/input/plugins/QobuzTrackRequest.cxx
+@@ -5,7 +5,7 @@
+ #include "QobuzErrorParser.hxx"
+ #include "QobuzClient.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+ #include <nlohmann/json.hpp>
+
+ using std::string_view_literals::operator""sv;
+--- a/src/lib/avahi/Publisher.cxx
++++ b/src/lib/avahi/Publisher.cxx
+@@ -13,7 +13,7 @@
+ #include <avahi-common/malloc.h>
+ #include <avahi-common/alternative.h>
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+
+--- a/src/lib/nfs/FileReader.cxx
++++ b/src/lib/nfs/FileReader.cxx
+@@ -10,7 +10,7 @@
+
+ #include <nfsc/libnfs.h> // for struct nfs_stat_64
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+ #include <cstring>
+--- a/src/output/Init.cxx
++++ b/src/output/Init.cxx
+@@ -24,7 +24,7 @@
+ #include "util/StringAPI.hxx"
+ #include "Log.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+ #include <stdexcept>
+--- a/src/output/plugins/httpd/HttpdClient.cxx
++++ b/src/output/plugins/httpd/HttpdClient.cxx
+@@ -13,7 +13,7 @@
+ #include "util/StringSplit.hxx"
+ #include "Log.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+
+--- a/src/output/plugins/httpd/IcyMetaDataServer.cxx
++++ b/src/output/plugins/httpd/IcyMetaDataServer.cxx
+@@ -5,7 +5,7 @@
+ #include "tag/Tag.hxx"
+ #include "util/TruncateString.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <iterator>
+
+--- a/src/song/AddedSinceSongFilter.cxx
++++ b/src/song/AddedSinceSongFilter.cxx
+@@ -6,7 +6,7 @@
+ #include "time/ISO8601.hxx"
+ #include "util/StringBuffer.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ using std::string_view_literals::operator""sv;
+
+--- a/src/song/AudioFormatSongFilter.cxx
++++ b/src/song/AudioFormatSongFilter.cxx
+@@ -5,7 +5,7 @@
+ #include "LightSong.hxx"
+ #include "util/StringBuffer.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ using std::string_view_literals::operator""sv;
+
+--- a/src/song/ModifiedSinceSongFilter.cxx
++++ b/src/song/ModifiedSinceSongFilter.cxx
+@@ -6,7 +6,7 @@
+ #include "time/ISO8601.hxx"
+ #include "util/StringBuffer.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ using std::string_view_literals::operator""sv;
+
+--- a/src/storage/plugins/NfsStorage.cxx
++++ b/src/storage/plugins/NfsStorage.cxx
+@@ -28,7 +28,7 @@
+ #include <nfsc/libnfs-raw-nfs.h>
+ }
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <cassert>
+ #include <string>
+--- a/src/net/ToString.cxx
++++ b/src/net/ToString.cxx
+@@ -6,7 +6,7 @@
+ #include "SocketAddress.hxx"
+ #include "IPv4Address.hxx"
+
+-#include <fmt/core.h>
++#include <fmt/format.h>
+
+ #include <algorithm>
+ #include <cassert>
+--
+2.43.0
meta-multimedia/recipes-multimedia/musicpd/mpd_0.24.9.bb +1 -0
index 0c3d672949..b4d6604b21 100644
@@ -20,6 +20,7 @@ DEPENDS += " \
 
 SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https;tag=v${PV} \
            file://mpd.conf.in \
+           file://0001-libfmt-12.2.0-support-use-fmt-format.h-not-fmt-core.h.patch \
            "
 SRCREV = "7a9afa059e95668c912f779219ee8fe1e44dd2aa"