Thread (2 messages) flat view 2 messages, 1 author, 7h ago

[Buildroot] [PATCH 1/2] package/pocketpy: fix build without threads

From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Date: 2026-09-07 12:24:39
Subsystem: the rest · Maintainer: Linus Torvalds

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@amarulasolutions.com>
---
 package/pocketpy/pocketpy.mk | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/package/pocketpy/pocketpy.mk b/package/pocketpy/pocketpy.mk
index 23789dd62028..c1ae075d3897 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
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help