[Buildroot] [git commit] package/pocketpy: fix build without threads

Julien Olivain ju.o at free.fr
Sun Sep 13 16:30:51 UTC 2026


commit: https://gitlab.com/buildroot.org/buildroot/-/commit/376daf3dd0ac4dda52ede3284dec59a92bb24130
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master

pocketpy enables thread support by default (PK_ENABLE_THREADS=ON) and
then requires Threads from cmake, which fails on toolchains without
thread support:

  CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find Threads (missing: Threads_FOUND)

Thread support is optional, so enable it only when the toolchain
provides threads.

Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
 package/pocketpy/pocketpy.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/pocketpy/pocketpy.mk b/package/pocketpy/pocketpy.mk
index 23789dd620..c1ae075d38 100644
--- a/package/pocketpy/pocketpy.mk
+++ b/package/pocketpy/pocketpy.mk
@@ -12,6 +12,12 @@ POCKETPY_INSTALL_STAGING = YES
 
 POCKETPY_CONF_OPTS = -DPK_BUILD_SHARED_LIB=ON
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+POCKETPY_CONF_OPTS += -DPK_ENABLE_THREADS=ON
+else
+POCKETPY_CONF_OPTS += -DPK_ENABLE_THREADS=OFF
+endif
+
 define POCKETPY_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/libpocketpy.so* $(TARGET_DIR)/usr/lib
 endef


More information about the buildroot mailing list