[cmake-developers] [CMake 0014986]: FindBoost with component thread does not properly link with boost_system
Mantis Bug Tracker
mantis at public.kitware.com
Mon Jun 23 10:54:57 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14986
======================================================================
Reported By: mband
Assigned To:
======================================================================
Project: CMake
Issue ID: 14986
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-06-23 10:54 EDT
Last Modified: 2014-06-23 10:54 EDT
======================================================================
Summary: FindBoost with component thread does not properly
link with boost_system
Description:
When just finding the thread component of Boost it appears that one also has to
link with boost_system. From the Boost documentation it looks like this change
was introduced with version 1.52 (see
http://www.boost.org/doc/libs/1_52_0/doc/html/thread/build.html).
Steps to Reproduce:
FIND_PACKAGE(Boost COMPONENTS thread)
target_link_libraries(my_target ${Boost_LIBRARIES})
Resulting in a linker error like the following:
/usr/bin/ld: CMakeFiles/<something>.dir/<something>.o: undefined reference to
symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0: error adding symbols: DSO
missing from command line
Linking with boost_system (i.e. -lboost_system or
target_link_libraries(my_target boost_system)) solves the issue, but it should
be done automatically when finding the thread component of Boost.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-06-23 10:54 mband New Issue
======================================================================
More information about the cmake-developers
mailing list