Skip to content

Project fails to configure in cmake since i updated emsdk to 6.0.6 #27520

Description

@Honya2000

Hello,

My project depends on or_tools third party project, which has those lines in cmake:

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREAD_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

The thing is I do not need threads (threads aren't enabled in my root CMakeLists.txt).
So I absolutely have no idea how this was working before. It was just working about 2 years so I didn't ask questions...

But now it fails:

CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.30/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
third_party/or_tools/cmake/system_deps.cmake:17 (find_package)
third_party/or_tools/CMakeLists.txt:450 (include)

Yesterday everything was fine. Since yesterday i just upgraded Python from 3.10.0 to 3.10.11 and emsdk to 6.0.6 (do not remember exactly which version was before, probably 6.0.4).

I doubt Python broke Threads setup in cmake.

Is anything were changed in emsdk regarding Threads setup with disabled pthreads recently ?

P.S. It's not just or_tools. Tried to disable Threads in or_tools:
if (NOT EMSCRIPTEN)
find_package(Threads REQUIRED)
endif()

But it fails in many other projects. For example Abseil also fails with the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions