MantisBT - CMake
View Issue Details
0011187CMakeModulespublic2010-08-30 14:502010-11-09 22:57
Sanat Gulvadi 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0011187: Cmake unable to find several Boost libraries in non-installed boost build tree
I am not really a developer so I hope you can help. I am trying to build the UHD-API for a student project. I am having trouble building the project file before I attempt to compile it. I have seen from another issue (0009510) that there is an existing problem that will be fixed in the next release of Cmake. However, I would really appreciate it if someone were to offer me a work around. I have installed boost 1.44 and have added the version to the FindBoost.cmake as per the instructions in the file. I am unable to use earlier versions of boost or the Cmake 2.6.x because it will not work with the MSVS2010 compiler that I need to use. I have added the BOOST_INCLUDEDIR BOOST_ROOT CMAKE_INCLUDE_PATH CMAKE_LIBRARY_PATH etc to point to the appropriate locations, but in spite of this, I am getting the following error when I hit 'Configure' :

CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:910 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.44.0

  Boost include path: C:/Program Files/boost/boost_1_44

  The following Boost libraries could not be found:

          boost_date_time
          boost_filesystem
          boost_program_options
          boost_regex
          boost_system
          boost_thread
          boost_unit_test_framework

  No Boost libraries were found. You may need to 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:85 (FIND_PACKAGE)


Thanks and Best Regards,
Sanat.
No tags attached.
diff FindBoost.cmake.diff (1,185) 2010-09-01 10:35
https://public.kitware.com/Bug/file/3353/FindBoost.cmake.diff
? FindBoost.cmake.6 (54,303) 2010-09-08 23:40
https://public.kitware.com/Bug/file/3373/FindBoost.cmake.6
Issue History
2010-08-30 14:50Sanat GulvadiNew Issue
2010-08-31 00:45Kovarththanan RajaratnamCategoryCMake => Modules
2010-09-01 00:36Philip LowmanStatusnew => assigned
2010-09-01 00:36Philip LowmanAssigned To => Philip Lowman
2010-09-01 00:49Philip LowmanNote Added: 0022051
2010-09-01 06:58Sanat GulvadiNote Added: 0022054
2010-09-01 10:35Zack GalbreathNote Added: 0022057
2010-09-01 10:35Zack GalbreathFile Added: FindBoost.cmake.diff
2010-09-08 01:50Philip LowmanNote Added: 0022126
2010-09-08 23:39Philip LowmanNote Added: 0022152
2010-09-08 23:40Philip LowmanNote Added: 0022153
2010-09-08 23:40Philip LowmanFile Added: FindBoost.cmake.6
2010-09-10 08:40Philip LowmanTarget Version => CMake 2.8.3
2010-09-12 22:11Philip LowmanSummaryCmake unable to find several Boost libraries => Cmake unable to find several Boost libraries in non-installed boost build tree
2010-09-12 22:28Philip LowmanNote Added: 0022198
2010-09-12 22:28Philip LowmanStatusassigned => resolved
2010-09-12 22:28Philip LowmanFixed in Version => CMake 2.8.3
2010-09-12 22:28Philip LowmanResolutionopen => fixed
2010-11-09 22:57Philip LowmanStatusresolved => closed

Notes
(0022051)
Philip Lowman   
2010-09-01 00:49   
Sanat,

Hi.
Issue 0009510 deals with a bug under Cygwin and shouldn't affect your configuration (Visual Studio 10).

Please double check the documentation at the top of FindBoost.cmake. The most likely cause of your problem is that you haven't set the Boost_ADDITIONAL_VERSIONS variable to search for newer versions of Boost. The next version of FindBoost.cmake that comes with CMake 2.8.3 will automatically search for Boost 1.4.4 but to detect Boost 1.4.4 you will either have to set Boost_ADDITIONAL_VERSIONS or use a newer FindBoost.cmake.

You may also have the Boost_USE_STATIC_LIBS and Boost_USE_MULTITHREADED variables not set properly (depending on what you want).

It is generally recommended that while messing around with FindBoost options you delete your cache after each change and configure again.

If these suggestions don't help resolve your problem, please
"set(Boost_DEBUG TRUE)" above "find_package(Boost...)" in your CMakeLists.txt, delete your cache, configure your build and include the debugging output here.
(0022054)
Sanat Gulvadi   
2010-09-01 06:58   
Hi Phil,

Thanks for your response.

I was actually able to fix this issue by replacing the FindBoost.cmake file with the one at this link :

http://www.cmake.org/pipermail/cmake/2007-May/014131.html [^]
(0022057)
Zack Galbreath   
2010-09-01 10:35   
I'm faced with this issue as well. FindBoost can not locate my boost libraries, when though I'm setting Boost_USE_STATIC_LIBS, Boost_USE_MULTITHREADED, and Boost_ADDITIONAL_VERSIONS.

On my system, bjam built the boost libraries here:

<boost_include_dir>/bin.v2/libs

This path does not seem to be included in _boost_LIBRARIES_SEARCH_DIRS.

Another problem is that if I manually specify the path to the boost library I'm seeking, it gets deleted when I reconfigure. I've uploaded a patch that solves this problem, but I'm not sure if it has negative side effects.

-Zack
(0022126)
Philip Lowman   
2010-09-08 01:50   
Zack,

Sorry for the delay in responding.

I think the problem may be that you are trying to use FindBoost against a bjam build of Boost which you have not installed. Configure bjam with your install prefix and then after you have built Boost install it to that path.

./bootstrap.sh --prefix=$HOME/myboost
./bjam -j8
./bjam install

(Then set BOOST_ROOT and Boost_ADDITIONAL_VERSIONS appropriately)
(0022152)
Philip Lowman   
2010-09-08 23:39   
Feel free to test the latest attached version to see if it resolves your problems. I've included searching <boost_include_dir>/lib/stage in it so I think it may work against non-installed boost build trees now.

Also you should now set Boost_NO_SYSTEM_PATHS to ON if you are specifying a BOOST_ROOT.
(0022153)
Philip Lowman   
2010-09-08 23:40   
If the attached doesn't resolve your problems, please enable Boost_DEBUG and reconfigure from scratch and include the output here along with what libraries are in your bjam folder.
(0022198)
Philip Lowman   
2010-09-12 22:28   
Fix will be in CMake 2.8.3 RC1