Skip to content

Can't find Threads if compiled with Clang #22

@AngryPenguinPL

Description

@AngryPenguinPL

When compile qcoro 0.3.0 with LLVM/Clang 13.0.0 I see this configuration error:

DEBUG util.py:623:  -- Looking for C++ include pthread.h
DEBUG util.py:623:  -- Looking for C++ include pthread.h - not found
DEBUG util.py:621:  CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
DEBUG util.py:621:    Could NOT find Threads (missing: Threads_FOUND)
DEBUG util.py:621:  Call Stack (most recent call first):
DEBUG util.py:621:    /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
DEBUG util.py:621:    /usr/share/cmake/Modules/FindThreads.cmake:238 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
DEBUG util.py:621:    CMakeLists.txt:61 (find_package)
DEBUG util.py:623:  -- Configuring incomplete, errors occurred!

Full build log: https://file-store.openmandriva.org/api/v1/file_stores/432e3f9a77df2b7bc68ea7c1edbb36ce6018db68.log?show=true

Details:
OS: OpenMandriva Cooker
Compiler: LLVM/Clang 13.0.0
LTO: Enabled

I tried linking -pthread but was same.

Only compilation with GCC fixed the problem.

The problem is that in Mandriva we try to make sure that every (if possible) package is built with Clang.
So it would be great if a Clang compilation would be possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions