View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014739CMakeModulespublic2014-02-06 15:312014-10-06 10:32
ReporterChristoph Junghans 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformFedoraOSLinuxOS Version
Product VersionCMake 2.8.12.1 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014739: findboost.cmake can't find boost::mpi library
DescriptionIn short, Fedora installs libboost_mpi.so into /usr/lib{,64}/{openmpi,mpich}/lib, which is why the module cannot find it.

Setting BOOST_ROOT will make the other components disappear.
Additional Informationhttps://bugzilla.redhat.com/show_bug.cgi?id=756141 [^]
TagsNo tags attached.
Attached Filespatch file icon 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch [^] (2,729 bytes) 2014-02-07 16:51 [Show Content]
? file icon 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch-v2 [^] (2,721 bytes) 2014-02-10 10:39
? file icon 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch-v3 [^] (3,105 bytes) 2014-02-10 16:19

 Relationships
related to 0014832closedBen Boeckel findboost.cmake can't find boost::graph_parallel library 

  Notes
(0035050)
Brad King (manager)
2014-02-07 09:14

There are two competing goals. One is for all the found Boost libraries to belong together. This is achieved by using the NO_DEFAULT_PATH option to find_library to search only in Boost_LIBRARY_DIR once it is known:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindBoost.cmake;hb=v2.8.12.2#l809 [^]
 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindBoost.cmake;hb=v2.8.12.2#l288 [^]

It works under the assumption that all the libraries are installed together as they are by upstream Boost packaging and distribution.

The other goal, raised here, is to search somewhere that is not necessarily next to all the other Boost libraries, but instead next to the MPI libraries. Since the FindMPI module is quite intricate we cannot possibly duplicate all that in FindBoost just for the MPI component. However, we could consider teaching FindBoost to look next to MPI_CXX_LIBRARIES and MPI_C_LIBRARIES if they are set by a preceding find_package(MPI) call.
(0035055)
Christoph Junghans (reporter)
2014-02-07 16:23

Yeah, had sounds good, if MPI_CXX_LIBRARIES is defined one could use its dirname as an additional HINTS directory for libboost_mpi and libboost_mpi_python.
(0035057)
Brad King (manager)
2014-02-07 16:52

Re 0014739:0035055: Please try attached "0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch". It should work for the mpi component (but not mpi_python yet), though I do not have a machine with this installation layout so I cannot test it in a real environment.
(0035058)
Christoph Junghans (reporter)
2014-02-07 17:19

Nope
$ cmake -DBoost_DEBUG=ON .
-- PYTHON_INCLUDE_PATH = /usr/include/python2.7
-- PYTHON_VERSION = 2.7
-- PYTHON_LIBDIR = /usr/lib64
-- PYTHON_LIBRARIES = /usr/lib64/libpython2.7.so
-- [ /usr/share/cmake/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42
-- [ /usr/share/cmake/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/share/cmake/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:538 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42
-- [ /usr/share/cmake/Modules/FindBoost.cmake:639 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /usr/share/cmake/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.54.0
-- [ /usr/share/cmake/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER = -gcc48
-- [ /usr/share/cmake/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
-- [ /usr/share/cmake/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /usr/lib64;NO_DEFAULT_PATH
-- [ /usr/share/cmake/Modules/FindBoost.cmake:925 ] Appending library search paths for MPI: /usr/lib64/openmpi/lib
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for MPI_LIBRARY_RELEASE: boost_mpi-gcc48-mt-1_54;boost_mpi-gcc48-mt;boost_mpi-mt-1_54;boost_mpi-mt;boost_mpi
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for MPI_LIBRARY_DEBUG: boost_mpi-gcc48-mt-d-1_54;boost_mpi-gcc48-mt-d;boost_mpi-mt-d-1_54;boost_mpi-mt-d;boost_mpi-mt;boost_mpi
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for PYTHON_LIBRARY_RELEASE: boost_python-gcc48-mt-1_54;boost_python-gcc48-mt;boost_python-mt-1_54;boost_python-mt;boost_python
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for PYTHON_LIBRARY_DEBUG: boost_python-gcc48-mt-d-1_54;boost_python-gcc48-mt-d;boost_python-mt-d-1_54;boost_python-mt-d;boost_python-mt;boost_python
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for SERIALIZATION_LIBRARY_RELEASE: boost_serialization-gcc48-mt-1_54;boost_serialization-gcc48-mt;boost_serialization-mt-1_54;boost_serialization-mt;boost_serialization
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for SERIALIZATION_LIBRARY_DEBUG: boost_serialization-gcc48-mt-d-1_54;boost_serialization-gcc48-mt-d;boost_serialization-mt-d-1_54;boost_serialization-mt-d;boost_serialization-mt;boost_serialization
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1041 ] Boost_FOUND = 1
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1135 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.54.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:

          boost_mpi

  Some (but not all) of the required Boost libraries were found. You may
  need to install these additional Boost libraries. Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMakeLists.txt:130 (find_package)


-- Configuring incomplete, errors occurred!
$ grep -i find.*Boost CMakeLists.txt
  find_package(Boost 1.42.0 REQUIRED COMPONENTS mpi python serialization )
(0035065)
Brad King (manager)
2014-02-10 10:39

Oops, the first patch had a typo that prevented the computed paths from being used by the find commands. Please try "0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch-v2".
(0035083)
Christoph Junghans (reporter)
2014-02-10 13:08

With v2 it finds boost_mpi, but boost_serialization and boost_python cannot be detected anymore.
$ cmake -DBoost_DEBUG=ON .
-- PYTHON_INCLUDE_PATH = /usr/include/python2.7
-- PYTHON_VERSION = 2.7
-- PYTHON_LIBDIR = /usr/lib64
-- PYTHON_LIBRARIES = /usr/lib64/libpython2.7.so
-- [ /usr/share/cmake/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42
-- [ /usr/share/cmake/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/share/cmake/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:538 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
-- [ /usr/share/cmake/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42
-- [ /usr/share/cmake/Modules/FindBoost.cmake:639 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /usr/share/cmake/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.54.0
-- [ /usr/share/cmake/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER = -gcc48
-- [ /usr/share/cmake/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
-- [ /usr/share/cmake/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /usr/lib64/openmpi/lib;NO_DEFAULT_PATH
-- [ /usr/share/cmake/Modules/FindBoost.cmake:925 ] Appending library search paths for MPI: /usr/lib64/openmpi/lib
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for MPI_LIBRARY_RELEASE: boost_mpi-gcc48-mt-1_54;boost_mpi-gcc48-mt;boost_mpi-mt-1_54;boost_mpi-mt;boost_mpi
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for MPI_LIBRARY_DEBUG: boost_mpi-gcc48-mt-d-1_54;boost_mpi-gcc48-mt-d;boost_mpi-mt-d-1_54;boost_mpi-mt-d;boost_mpi-mt;boost_mpi
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for PYTHON_LIBRARY_RELEASE: boost_python-gcc48-mt-1_54;boost_python-gcc48-mt;boost_python-mt-1_54;boost_python-mt;boost_python
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for PYTHON_LIBRARY_DEBUG: boost_python-gcc48-mt-d-1_54;boost_python-gcc48-mt-d;boost_python-mt-d-1_54;boost_python-mt-d;boost_python-mt;boost_python
-- [ /usr/share/cmake/Modules/FindBoost.cmake:952 ] Searching for SERIALIZATION_LIBRARY_RELEASE: boost_serialization-gcc48-mt-1_54;boost_serialization-gcc48-mt;boost_serialization-mt-1_54;boost_serialization-mt;boost_serialization
-- [ /usr/share/cmake/Modules/FindBoost.cmake:989 ] Searching for SERIALIZATION_LIBRARY_DEBUG: boost_serialization-gcc48-mt-d-1_54;boost_serialization-gcc48-mt-d;boost_serialization-mt-d-1_54;boost_serialization-mt-d;boost_serialization-mt;boost_serialization
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1041 ] Boost_FOUND = 1
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1135 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.54.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:

          boost_python
          boost_serialization

  Some (but not all) of the required Boost libraries were found. You may
  need to install these additional Boost libraries. Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMakeLists.txt:130 (find_package)


-- Configuring incomplete, errors occurred!
(0035084)
Brad King (manager)
2014-02-10 13:31

Re 0014739:0035083: What components are you listing in your find_package(Boost) call, and in what order?
(0035086)
Christoph Junghans (reporter)
2014-02-10 13:47

$ grep -i find.*Boost CMakeLists.txt
  find_package(Boost 1.42.0 REQUIRED COMPONENTS mpi python serialization )
(0035089)
Brad King (manager)
2014-02-10 16:21

Re 0014739:0035086: Patch v2 was finding boost_mpi first and then treating its location as "the" location of all boost libraries. Please try v3. This one treats the mpi directory as a fallback for the specific components without considering the result to be meaningful for other components. Patch v3 also adds support for mpi_python.
(0035090)
Christoph Junghans (reporter)
2014-02-10 19:27

Works great on my Fedora 20 system!
(0035091)
Christoph Junghans (reporter)
2014-02-10 19:29

Btw, there is another Fedora/Gentoo specific issue in FindBoost.cmake:
<http://www.cmake.org/Bug/view.php?id=12955> [^]
(0035092)
Brad King (manager)
2014-02-11 09:18

Thanks for testing. Applied:

 FindBoost: Search next to MPI libraries for boost_mpi
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a22eeca3 [^]
(0036952)
Robert Maynard (manager)
2014-10-06 10:32

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

 Issue History
Date Modified Username Field Change
2014-02-06 15:31 Christoph Junghans New Issue
2014-02-07 09:14 Brad King Note Added: 0035050
2014-02-07 16:23 Christoph Junghans Note Added: 0035055
2014-02-07 16:51 Brad King File Added: 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch
2014-02-07 16:52 Brad King Note Added: 0035057
2014-02-07 17:19 Christoph Junghans Note Added: 0035058
2014-02-10 10:39 Brad King File Added: 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch-v2
2014-02-10 10:39 Brad King Note Added: 0035065
2014-02-10 13:08 Christoph Junghans Note Added: 0035083
2014-02-10 13:31 Brad King Note Added: 0035084
2014-02-10 13:47 Christoph Junghans Note Added: 0035086
2014-02-10 16:19 Brad King File Added: 0001-FindBoost-Search-next-to-MPI-libraries-for-boost_mpi.patch-v3
2014-02-10 16:21 Brad King Note Added: 0035089
2014-02-10 16:21 Brad King Assigned To => Brad King
2014-02-10 16:21 Brad King Status new => assigned
2014-02-10 16:21 Brad King Target Version => CMake 3.1
2014-02-10 19:27 Christoph Junghans Note Added: 0035090
2014-02-10 19:29 Christoph Junghans Note Added: 0035091
2014-02-11 09:18 Brad King Note Added: 0035092
2014-02-11 09:18 Brad King Status assigned => resolved
2014-02-11 09:18 Brad King Resolution open => fixed
2014-02-11 09:18 Brad King Fixed in Version => CMake 3.1
2014-02-12 11:32 Brad King Fixed in Version CMake 3.1 => CMake 3.0
2014-02-12 11:32 Brad King Target Version CMake 3.1 => CMake 3.0
2014-03-24 19:08 Ben Boeckel Relationship added related to 0014832
2014-10-06 10:32 Robert Maynard Note Added: 0036952
2014-10-06 10:32 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team