MantisBT - CMake
View Issue Details
0007830CMakeCMakepublic2008-10-19 07:242012-01-02 15:56
Tnlnmq3(ln 
David Cole 
normalminoralways
closedfixed 
CMake-2-6 
CMake 2.8.6CMake 2.8.6 
0007830: CMake 2.6.2 doesn't find pthread_* function in libc on OpenSolaris
On "SunOS 5.11 snv_99 x86" CMake can not find pthread_create (and others pthread function) though these function are in /lib/libc.so.1

For me, the following fix works fine:
$ diff cmake-2.6.2/Modules/FindThreads.cmake /usr/local/share/cmake-2.6/Modules/FindThreads.cmake
28a29,37
>
> # In OpenSolaris pthread_* in libc
> CHECK_FUNCTION_EXISTS(pthread_create CMAKE_HAVE_PTHREAD_CREATE)
> IF(CMAKE_HAVE_PTHREAD_CREATE)
> SET(CMAKE_THREAD_LIBS_INIT "")
> SET(CMAKE_HAVE_THREADS_LIBRARY 1)
> SET(Threads_FOUND TRUE)
> ELSEIF(CMAKE_HAVE_PTHREAD_CREATE)
>
51a61,63
>
> ENDIF(CMAKE_HAVE_PTHREAD_CREATE)
>

No tags attached.
related to 0011333closed Rolf Eike Beer FindThreads incorrectly adds -pthread to linker options 
Issue History
2008-10-19 07:24Tnlnmq3(lnNew Issue
2009-01-29 14:23Bill HoffmanNote Added: 0014720
2009-01-29 14:23Bill HoffmanStatusnew => assigned
2009-01-29 14:23Bill HoffmanAssigned To => Bill Hoffman
2011-04-17 05:25Rolf Eike BeerNote Added: 0026204
2011-04-18 16:17Brad KingRelationship addedrelated to 0011333
2011-08-01 10:51David ColeAssigned ToBill Hoffman => David Cole
2011-08-01 10:51David ColeTarget Version => CMake 2.8.6
2011-08-20 14:59David ColeNote Added: 0027257
2011-08-20 14:59David ColeStatusassigned => resolved
2011-08-20 14:59David ColeFixed in Version => CMake 2.8.6
2011-08-20 14:59David ColeResolutionopen => fixed
2012-01-02 15:56David ColeNote Added: 0028133
2012-01-02 15:56David ColeStatusresolved => closed

Notes
(0014720)
Bill Hoffman   
2009-01-29 14:23   
Can you provide a patch file, or give more context for this patch?
(0026204)
Rolf Eike Beer   
2011-04-17 05:25   
Solution may be in the patch to bug 11333.
(0027257)
David Cole   
2011-08-20 14:59   
Assuming this is fixed by the same commit that fixed 0011333 :

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd61be71401ef9e0a241562fc31539273084deff [^]

Please re-open and attach more information, or another proposed patch on top of current CMake sources if this is not actually the case...
(0028133)
David Cole   
2012-01-02 15:56   
Closing resolved issues that have not been updated in more than 4 months.