On 4/22/20 1:40 PM, Victor Eijkhout wrote:
Cmake outputs this:

-- 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 - found

So your cmake configuration must be looking for pthread*s* and then 
misremembering the conclusion.

Maybe. But maybe also not. We never actually check for pthread_create in our own configuration. We do call this piece of code in cmake/configure/configure_1_threads.cmake:

MACRO(SETUP_THREADING)
  #
  # Unfortunately the FindThreads macro needs a working C compiler
  #
  IF(CMAKE_C_COMPILER_WORKS)
    #
    # Clear the test flags because FindThreads.cmake will use a C compiler:
    #
    CLEAR_CMAKE_REQUIRED()

    SWITCH_LIBRARY_PREFERENCE()
    FIND_PACKAGE(Threads)                   <<<<<<<<<<<<<<<<<<
    SWITCH_LIBRARY_PREFERENCE()

FIND_PACKAGE(Threads) calls a cmake-builtin module that on my system lives in /usr/share/cmake/Modules/FindThreads.cmake. It contains this piece of code:

        _check_threads_lib(pthreads pthread_create CMAKE_HAVE_PTHREADS_CREATE)
        _check_threads_lib(pthread  pthread_create CMAKE_HAVE_PTHREAD_CREATE)

It must be somewhere in this module that -lpthreads is added to the link line, though I have no idea why that would be given that the check fails (as shown above).

What's your version of cmake?

@tamiko: Any ideas?

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/74ae436a-3fa3-dfec-3e13-8c3ca4f3147f%40colostate.edu.

Reply via email to