View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014720CMakeModulespublic2014-01-27 10:272014-06-02 08:38
ReporterArne Nordmann 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platform64bitOSLinux UbuntuOS Versionprecise+quantal
Product VersionCMake 2.8.7 
Target VersionFixed in VersionCMake 2.8.11 
Summary0014720: FindBoost handles pthread different on first and second run
DescriptionWhen calling the macro find_package(Boost thread), I get different results for ${Boost_LIBRARIES} the first and the second time I execute cmake.

First time, ${Boost_LIBRARIES} contains '/usr/lib/libboost_thread-mt.so;pthread', the second time, ${Boost_LIBRARIES} just contains '/usr/lib/libboost_thread-mt.so' (without pthread).
Steps To ReproduceExecute the following cmake script twice (also attached):

> project("Test FindBoost")
> cmake_minimum_required(VERSION 2.8)
> find_package(Boost REQUIRED thread)
> message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")

Reproduced on several Ubuntu precise and quantal machines.
Additional InformationAn obvious workaround, calling the find boost macro twice in a cmake script, doesn't help.
TagsNo tags attached.
Attached Filestxt file icon CMakeLists.txt [^] (154 bytes) 2014-01-27 10:27 [Show Content]

 Relationships
related to 0010692closedPhilip Lowman FindBoost fails to add -lpthread 

  Notes
(0034998)
Brad King (manager)
2014-01-27 10:44

The FindBoost module has had a major overhaul since 2.8.7.

Please try with CMake 2.8.11 or higher, preferably the latest release.
(0034999)
Nils Gladitz (developer)
2014-01-27 10:46

When I run vanilla cmake 2.8.12.1 I get:
  -- Boost_LIBRARIES: /usr/lib/libboost_thread.so
both on the first and second run.

Debian/Ubuntu seem to patch their FindBoost.cmake to add pthread:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563479 [^]
(0035000)
Arne Nordmann (reporter)
2014-01-27 10:58

I tested in a Ubuntu saucy VM with cmake 2.8.11.2 (which comes with saucy). First and second run produce the same result, which is

 -- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libpthread.so

which is fine.
(0035001)
Brad King (manager)
2014-01-27 11:07

Re 0014720:0035000: Great, thanks for reporting back.
(0036091)
Robert Maynard (manager)
2014-06-02 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-01-27 10:27 Arne Nordmann New Issue
2014-01-27 10:27 Arne Nordmann File Added: CMakeLists.txt
2014-01-27 10:44 Brad King Note Added: 0034998
2014-01-27 10:46 Nils Gladitz Relationship added related to 0010692
2014-01-27 10:46 Nils Gladitz Note Added: 0034999
2014-01-27 10:58 Arne Nordmann Note Added: 0035000
2014-01-27 11:07 Brad King Note Added: 0035001
2014-01-27 11:07 Brad King Status new => resolved
2014-01-27 11:07 Brad King Resolution open => fixed
2014-01-27 11:07 Brad King Fixed in Version => CMake 2.8.11
2014-06-02 08:38 Robert Maynard Note Added: 0036091
2014-06-02 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team