From 79a013c5eab26a0bbbaadc9c766b228804ecb3dc Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Sat, 9 Aug 2025 23:08:54 +0200 Subject: [PATCH] package/pthreadpool: fix thread dependency On autobuilder config with BR2_TOOLCHAIN_HAS_THREADS not set the following error happens when building the pthreadpool package: ``` -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - no CMake Error at /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) /home/buildroot/instance-0/output-1/host/share/cmake-3.31/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:143 (FIND_PACKAGE) -- Configuring incomplete, errors occurred! ``` This can be reproduced with: ``` cat >.config < Signed-off-by: Romain Naour (cherry picked from commit 627af87bda2f14e42b127bb749ddeb4fd4a4f6b2) Signed-off-by: Thomas Perale --- package/pthreadpool/Config.in | 4 ++++ package/xnnpack/Config.in | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package/pthreadpool/Config.in b/package/pthreadpool/Config.in index 194ae33f85..8d163b16de 100644 --- a/package/pthreadpool/Config.in +++ b/package/pthreadpool/Config.in @@ -1,8 +1,12 @@ config BR2_PACKAGE_PTHREADPOOL bool "pthreadpool" + depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_FXDIV help Pthreadpool is a portable and efficient thread pool implementation. https://github.com/Maratyszcza/pthreadpool + +comment "pthreadpool needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/xnnpack/Config.in b/package/xnnpack/Config.in index e4b92f61e8..794c5c47d2 100644 --- a/package/xnnpack/Config.in +++ b/package/xnnpack/Config.in @@ -9,7 +9,7 @@ config BR2_PACKAGE_XNNPACK depends on BR2_PACKAGE_XNNPACK_ARCH_SUPPORTS depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14 - depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo + depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo, pthreadpool select BR2_PACKAGE_CPUINFO select BR2_PACKAGE_FP16 select BR2_PACKAGE_FXDIV