| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0009511 | CMake | Modules | public | 2009-09-09 11:31 | 2016-06-10 14:30 | ||||
| Reporter | dataangel | ||||||||
| Assigned To | Philip Lowman | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | CMake-2-6 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0009511: FindBoost.cmake won't work with static linking boost_thread on Solaris | ||||||||
| Description | Any compiles will fail at the link stage, complaining about missing symbols provided by the "implicit dependency librt.so". When dynamically linking, boost_thread will have been compiled to dynamically link against librt already. But when statically linking, you have to also pull in the dependencies of the library you're statically linking against, and on Solaris boost_thread needs librt. Basically, FindBoost should have a simple platform check, if Boost_USE_STATIC_LIBS is true, and boost_thread is a requested component, try to compile a test program that just creates a boost thread. If the compile fails, try adding -lrt, and see if that works. If so, add that to the libraries to link. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0026814) Philip Lowman (developer) 2011-06-10 00:59 |
Hi, I'm considering a fix for issue 0010692 and I'm wondering if I can get some testing on resolving this bug on Solaris.. The attached FindBoost.cmake (beta) contains the following function... Can you insert the code necessary to make this work on Solaris and test it? Rather than performing a test compilation/linking, would it be OK just to perform a find_library call on librt and also link against that? So long as this library is used during both a static & shared link this seems safe. You might be able to use CMAKE_SYSTEM_NAME... E.g. if(CMAKE_SYSTEM_NAME STREQUAL "Solaris") (not sure on the "Solaris" part) perform find_library() search for library if found add to list after pthread... endif() function(_Boost_consider_adding_pthreads _outvar) # On Unix platforms (excluding cygwin) add pthreads to Boost_LIBRARIES # if the user is searching for the boost-thread component. if(UNIX AND NOT CYGWIN) list(FIND Boost_FIND_COMPONENTS thread _using_boost_thread) if(_using_boost_thread GREATER -1) find_library(BOOST_THREAD_LIBRARY NAMES pthread DOC "The threading library used by boost-thread" ) if(BOOST_THREAD_LIBRARY) set(${_outvar} ${ARGN} ${BOOST_THREAD_LIBRARY} PARENT_SCOPE) endif() endif() endif() endfunction() |
|
(0031174) Philip Lowman (developer) 2012-10-04 01:49 |
Don't have time to work on this issue although I'd consider merging a patch if someone developed one, although I wouldn't really be able to do any testing on it. |
|
(0041591) Kitware Robot (administrator) 2016-06-10 14:27 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2009-09-09 11:32 | dataangel | New Issue | |
| 2009-09-11 17:19 | Bill Hoffman | Status | new => assigned |
| 2009-09-11 17:19 | Bill Hoffman | Assigned To | => Douglas Gregor |
| 2010-05-09 04:50 | Alex Neundorf | Category | CMake => Modules |
| 2010-09-10 23:50 | Philip Lowman | Assigned To | Douglas Gregor => Philip Lowman |
| 2011-06-10 00:59 | Philip Lowman | Note Added: 0026814 | |
| 2011-06-10 00:59 | Philip Lowman | File Added: FindBoost.cmake | |
| 2011-06-15 09:06 | Philip Lowman | Severity | major => minor |
| 2012-10-04 01:49 | Philip Lowman | Note Added: 0031174 | |
| 2012-10-04 01:49 | Philip Lowman | Status | assigned => backlog |
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041591 | |
| 2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved |
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |