The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14997 ====================================================================== Reported By: Ingvord Assigned To: ====================================================================== Project: CMake Issue ID: 14997 Category: Modules Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2014-06-28 03:18 EDT Last Modified: 2014-06-28 03:18 EDT ====================================================================== Summary: FindBoost can not find boost libraries installed via cygwin setup Description: When trying to cmake project which uses boost libraries on cygwin cmake reports "Could not find Boost". Headers are being found with out problems. Here is an output:
$> cmake .. -DBoost_DEBUG=On -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSION S = 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;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1 .37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33. 0;1.33 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHRE ADED = TRUE -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LI BS = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RU NTIME = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VE RSIONS = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PAT HS = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:538 ] Declared as CMake o r Environmental Variables: -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:540 ] BOOST_ROOT = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSION S = 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;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1 .37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33. 0;1.33 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:639 ] location of version .hpp: /usr/include/boost/version.hpp -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.53.0 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:739 ] guessed _boost_COMP ILER = -gcc48 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADE D = -mt -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_ TAG = - -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TA G = -d -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEAR CH_DIRS = /usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/b oost/lib;C:/boost;/sw/local/lib -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1 -- Boost version: 1.53.0 found GNU compiler ... setup for release build ... 2.8.11.2 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSION S = 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;1.41.0;1.41 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHRE ADED = OFF -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LI BS = OFF -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RU NTIME = OFF -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VE RSIONS = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PAT HS = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:538 ] Declared as CMake o r Environmental Variables: -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:540 ] BOOST_ROOT = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSION S = 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;1.41.0;1.41 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:639 ] location of version .hpp: /usr/include/boost/version.hpp -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.53.0 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:739 ] guessed _boost_COMP ILER = -gcc48 -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADE D = -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_ TAG = - -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TA G = -d -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEAR CH_DIRS = /usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/b oost/lib;C:/boost;/sw/local/lib -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:930 ] Searching for PROGR AM_OPTIONS_LIBRARY_RELEASE: boost_program_options-gcc48-1_53;boost_program_optio ns-gcc48;boost_program_options-1_53;boost_program_options;boost_program_options cygwin warning: MS-DOS style path detected: C:/boost/lib64 Preferred POSIX equivalent is: /cygdrive/c/boost/lib64 CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:966 ] Searching for PROGR AM_OPTIONS_LIBRARY_DEBUG: boost_program_options-gcc48-d-1_53;boost_program_optio ns-gcc48-d;boost_program_options-d-1_53;boost_program_options-d;boost_program_op tions;boost_program_options -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:930 ] Searching for SYSTE M_LIBRARY_RELEASE: boost_system-gcc48-1_53;boost_system-gcc48;boost_system-1_53; boost_system;boost_system -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:966 ] Searching for SYSTE M_LIBRARY_DEBUG: boost_system-gcc48-d-1_53;boost_system-gcc48-d;boost_system-d-1 _53;boost_system-d;boost_system;boost_system -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:930 ] Searching for REGEX _LIBRARY_RELEASE: boost_regex-gcc48-1_53;boost_regex-gcc48;boost_regex-1_53;boos t_regex;boost_regex -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:966 ] Searching for REGEX _LIBRARY_DEBUG: boost_regex-gcc48-d-1_53;boost_regex-gcc48-d;boost_regex-d-1_53; boost_regex-d;boost_regex;boost_regex -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1 -- Could NOT find Boost Boost version: 1.53.0 Boost include path: /usr/include The following Boost libraries could not be found: boost_program_options boost_system boost_regex No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the direc tory containing Boost libraries or BOOST_ROOT to the location of Boost. Here is the list of boost libraries in %CYGWIN_ROOT%\lib: C:\cygwin64\lib>ls -l | grep boost -rwxr-xr-x 1 Ingvord None 1732 May 29 2013 libboost_atomic-mt.dll.a -rwxr-xr-x 1 Ingvord None 61458 May 29 2013 libboost_chrono-mt.dll.a -rwxr-xr-x 1 Ingvord None 152554 May 29 2013 libboost_date_time-mt.dll.a -rwxr-xr-x 1 Ingvord None 131606 May 29 2013 libboost_filesystem-mt.dll.a -rwxr-xr-x 1 Ingvord None 593878 May 29 2013 libboost_graph-mt.dll.a -rwxr-xr-x 1 Ingvord None 321382 May 29 2013 libboost_iostreams-mt.dll.a -rwxr-xr-x 1 Ingvord None 1404706 May 29 2013 libboost_locale-mt.dll.a -rwxr-xr-x 1 Ingvord None 129006 May 29 2013 libboost_math_c99-mt.dll.a -rwxr-xr-x 1 Ingvord None 138172 May 29 2013 libboost_math_c99f-mt.dll.a -rwxr-xr-x 1 Ingvord None 805006 May 29 2013 libboost_math_tr1-mt.dll.a -rwxr-xr-x 1 Ingvord None 809648 May 29 2013 libboost_math_tr1f-mt.dll.a -rwxr-xr-x 1 Ingvord None 90426 May 29 2013 libboost_prg_exec_monitor-mt.dll.a -rwxr-xr-x 1 Ingvord None 885422 May 29 2013 libboost_program_options-mt.a -rwxr-xr-x 1 Ingvord None 13172 May 29 2013 libboost_random-mt.dll.a -rwxr-xr-x 1 Ingvord None 1539722 May 29 2013 libboost_regex-mt.dll.a -rwxr-xr-x 1 Ingvord None 1362342 May 29 2013 libboost_serialization-mt.dll.a -rwxr-xr-x 1 Ingvord None 232596 May 29 2013 libboost_signals-mt.dll.a -rwxr-xr-x 1 Ingvord None 10870 May 29 2013 libboost_system-mt.dll.a -rwxr-xr-x 1 Ingvord None 246156 May 29 2013 libboost_thread-mt.dll.a -rwxr-xr-x 1 Ingvord None 22186 May 29 2013 libboost_timer-mt.dll.a -rwxr-xr-x 1 Ingvord None 1485554 May 29 2013 libboost_unit_test_framework-mt.dll.a -rwxr-xr-x 1 Ingvord None 3386782 May 29 2013 libboost_wave-mt.dll.a -rwxr-xr-x 1 Ingvord None 942846 May 29 2013 libboost_wserialization-mt.dll.a Notice that when cmake finds headers it properly defines multithreading: -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE later on it does not: -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = If I manually change boost library file names to libboost_<whatever>.a, i.e. remove -mt.dll then this problem is gone. So temporary created a number of symlinks, which is not quite nice, I guess. Steps to Reproduce: install cygwin's compilers, boost libraries and cmake try to cmake any project depends on boost ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-06-28 03:18 Ingvord New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers