cmake cannot find boost libraries

Ingvord tla-ingvord@ya.ru
Sat Jun 28 13:03:00 GMT 2014


Finally got it!

The problem indeed was with this Boost_USE_MULTITHREADED param. In one of the CMakeLists files it was set to OFF, i.e. set(Boost_USE_MULTITHREADED OFF)

Passing ON value through command line gave no result. But after changing the mentioned CMakeLists file cmake has found the libraries.

28.06.2014, 12:23, "Ingvord" <tla-ingvord@ya.ru>:
> I am wrong that renaming boost library files solves the issue. it solves it partially - cmake finds the libraries, but then make fails:
>
> $> make
> ...
> make[2]: *** No rule to make target '/usr/lib/libboost_program_options.a', needed by 'src/cygpnicore-2.dll'. б Stop.
> CMakeFiles/Makefile2:1162: recipe for target 'src/CMakeFiles/pnicore.dir/all' failed
> make[1]: *** [src/CMakeFiles/pnicore.dir/all] Error 2
> Makefile:126: recipe for target 'all' failed
> make: *** [all] Error 2
>
> '/usr/lib/libboost_program_options.a' file exists:
> $ ls -al /usr/lib/libboost_program_options.a
> lrwxrwxrwx 1 Ingvord None 38 Jun 28 08:04 /usr/lib/libboost_program_options.a ->
> б /lib/libboost_program_options-mt.dll.a
>
> 28.06.2014, 11:39, "Ingvord" <tla-ingvord@ya.ru>:
>> б Dear All,
>>
>> б First of all I would like to thank all cygwin developers for the fact that such a great thing as cygwin exists.
>>
>> б Currently I am running cygwin 2.850 x64 on windows 7 x64.
>>
>> б Compilers, boost libraries and cmake everything has been installed via setup.
>>
>> б 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 from cmake:
>>
>> б $> BOOST_LIBRARYDIR=/lib cmake .. -DBoost_DEBUG=On
>> б ...
>> б -- [ /usr/share/cmake-2.8.11.2/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;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_MULTITHREADED = TRUE
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:538 ] Declared as CMake or 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_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;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_COMPILER = -gcc48
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -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_TAG = -d
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /lib;/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;PATHS;C:/boost/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_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;1.41.0;1.41
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = OFF
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = OFF
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME = OFF
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:538 ] Declared as CMake or 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_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;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_COMPILER = -gcc48
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED =
>> б -- [ /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_TAG = -d
>> б -- [ /usr/share/cmake-2.8.11.2/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /lib;/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 PROGRAM_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 PROGRAM_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 SYSTEM_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 SYSTEM_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 directory 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.
>>
>> б --
>> б Ingvord
>>
>> б --
>> б Problem reports: б б б б б б http://cygwin.com/problems.html
>> б FAQ: б б б б б б б б б б б б б б б б б б http://cygwin.com/faq/
>> б Documentation: б б б б б б б б http://cygwin.com/docs.html
>> б Unsubscribe info: б б б б б http://cygwin.com/ml/#unsubscribe-simple
>
> --
> Ingvord
>
> --
> Problem reports: б б б б б б http://cygwin.com/problems.html
> FAQ: б б б б б б б б б б б б б б б б б б http://cygwin.com/faq/
> Documentation: б б б б б б б б http://cygwin.com/docs.html
> Unsubscribe info: б б б б б http://cygwin.com/ml/#unsubscribe-simple

-- 
Ingvord

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list