Re: [CMake] cmake needs 2 runs to find boost
I guess, nobody has a hint on what to look at or what to try? Best, Peter On Tuesday, November 03, 2015 02:10:54 PM Peter Steinbach wrote: > Hi to all, > > I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem. > I'd like to use boost with gcc on windows 7 64bit. I installed boost and gcc > with msys2 as I cannot use MSVC for the actual project I am looking into > for this. > > the funny thing, if I use the attached CMakeLists.txt on the machine and > call: ``` > $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > -- The CXX compiler identification is GNU 4.9.2 > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Detecting CXX compile features > -- Detecting CXX compile features - done > setting win specific stuff > CMake Error at C:/Program Files > (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): > Unable to find the requested Boost libraries. > > Boost version: 1.57.0 > > Boost include path: C:/msys64/mingw64/include > > Could not find the following static Boost libraries: > > boost_filesystem > boost_system > > 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:17 (FIND_PACKAGE) > > > CMake Error at CMakeLists.txt:24 (MESSAGE): > Boost not found (C:/msys64/mingw64) > > > -- Configuring incomplete, errors occurred! > See also > "C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMakeFil > es/CMakeOutput.log". $ cmake -G "MSYS Makefiles" > -DBOOST_ROOT=C:/msys64/mingw64 - > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > setting win specific stuff > Boost 1.57 found __ > -- Configuring done > -- Generating done > -- Build files have been written to: > C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build > ``` > > I'd like to link statically to multithreaded libboost_*-mt.a from my app. > But it proofes really hard to find Boost in the first place. > Any ideas? > > Peter -- Peter Steinbach, Dr. rer. nat. HPC Developer Scionics Computer Innovation GmbH Löscherstr. 16 01309 Dresden fon: +49 351 210 2882 fax: +49 351 210 1689 http://www.scionics.de Sitz der Gesellschaft: Dresden (Main office) Amtsgericht - Registergericht: Dresden HRB 20337 (Commercial Registry) Ust-IdNr.: DE813263791 (VAT ID Number) Geschäftsführer: John Duperon, Jeff Oegema (Managing Directors) -- 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
Re: [CMake] cmake needs 2 runs to find boost
Hi Benedikt, interesting thought, however I wonder why cmake is then capable of deducing the right boost version and include path. Just inside the first error message, I see: (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): > >Unable to find the requested Boost libraries. > > > >Boost version: 1.57.0 > > > >Boost include path: C:/msys64/mingw64/include > > > >Could not find the following static Boost libraries: > >boost_filesystem > >boost_system strange, isn't it? Peter On Thursday, November 05, 2015 11:41:10 AM Benedikt Hegner wrote: > Hi Peter, > > as I don't use windows at all, this is just a very wild guess... > > Could it be that in the second run you actually don't use >/CMake/share/cmake-3.2/Modules/FindBoost.cmake > but boost-config.cmake, which it now finds in the cached environment of > the first run? > > This assumes of course that you built boost w/ CMake and not bjam... > > Cheers, >Benedikt > > On 03.11.2015 14:10, Peter Steinbach wrote: > > Hi to all, > > > > I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem. > > I'd like to use boost with gcc on windows 7 64bit. I installed boost and > > gcc with msys2 as I cannot use MSVC for the actual project I am looking > > into for this. > > > > the funny thing, if I use the attached CMakeLists.txt on the machine and > > call: ``` > > $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - > > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > > -- The CXX compiler identification is GNU 4.9.2 > > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe > > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works > > -- Detecting CXX compiler ABI info > > -- Detecting CXX compiler ABI info - done > > -- Detecting CXX compile features > > -- Detecting CXX compile features - done > > setting win specific stuff > > CMake Error at C:/Program Files > > > > (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): > >Unable to find the requested Boost libraries. > > > >Boost version: 1.57.0 > > > >Boost include path: C:/msys64/mingw64/include > > > >Could not find the following static Boost libraries: > >boost_filesystem > >boost_system > > > >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:17 (FIND_PACKAGE) > > > > CMake Error at CMakeLists.txt:24 (MESSAGE): > >Boost not found (C:/msys64/mingw64) > > > > -- Configuring incomplete, errors occurred! > > See also > > "C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMakeF > > iles/CMakeOutput.log". $ cmake -G "MSYS Makefiles" > > -DBOOST_ROOT=C:/msys64/mingw64 - > > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > > setting win specific stuff > > Boost 1.57 found __ > > -- Configuring done > > -- Generating done > > -- Build files have been written to: > > C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build > > ``` > > > > I'd like to link statically to multithreaded libboost_*-mt.a from my app. > > But it proofes really hard to find Boost in the first place. > > Any ideas? > > > > Peter -- Peter Steinbach, Dr. rer. nat. HPC Developer Scionics Computer Innovation GmbH Löscherstr. 16 01309 Dresden fon: +49 351 210 2882 fax: +49 351 210 1689 http://www.scionics.de Sitz der Gesellschaft: Dresden (Main office) Amtsgericht - Registergericht: Dresden HRB 20337 (Commercial Registry) Ust-IdNr.: DE813263791 (VAT ID Number) Geschäftsführer: John Duperon, Jeff Oegema (Managing Directors) -- 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
Re: [CMake] cmake needs 2 runs to find boost
Hi Peter, as I don't use windows at all, this is just a very wild guess... Could it be that in the second run you actually don't use /CMake/share/cmake-3.2/Modules/FindBoost.cmake but boost-config.cmake, which it now finds in the cached environment of the first run? This assumes of course that you built boost w/ CMake and not bjam... Cheers, Benedikt On 03.11.2015 14:10, Peter Steinbach wrote: Hi to all, I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem. I'd like to use boost with gcc on windows 7 64bit. I installed boost and gcc with msys2 as I cannot use MSVC for the actual project I am looking into for this. the funny thing, if I use the attached CMakeLists.txt on the machine and call: ``` $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. -- The CXX compiler identification is GNU 4.9.2 -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done setting win specific stuff CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): Unable to find the requested Boost libraries. Boost version: 1.57.0 Boost include path: C:/msys64/mingw64/include Could not find the following static Boost libraries: boost_filesystem boost_system 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:17 (FIND_PACKAGE) CMake Error at CMakeLists.txt:24 (MESSAGE): Boost not found (C:/msys64/mingw64) -- Configuring incomplete, errors occurred! See also "C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMakeFiles/CMakeOutput.log". $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. setting win specific stuff Boost 1.57 found __ -- Configuring done -- Generating done -- Build files have been written to: C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build ``` I'd like to link statically to multithreaded libboost_*-mt.a from my app. But it proofes really hard to find Boost in the first place. Any ideas? Peter -- 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
Re: [CMake] cmake needs 2 runs to find boost
Hi to all, ok, I tried the attached minimal CMakeLists.txt again and found out that it fails in the way I described only with the "MSYS Makefiles" generator. If I use the same CMakeLists.txt without a custom generator (so MSVS is the default IIRC), the libraries are found alright! Any ideas? Best, Peter On Thursday, November 05, 2015 01:41:33 PM Peter Steinbach wrote: > Hi Benedikt, > > interesting thought, however I wonder why cmake is then capable of deducing > the right boost version and include path. Just inside the first error > message, I see: > > (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): > > >Unable to find the requested Boost libraries. > > > > > >Boost version: 1.57.0 > > > > > >Boost include path: C:/msys64/mingw64/include > > > > > >Could not find the following static Boost libraries: > > >boost_filesystem > > >boost_system > > strange, isn't it? > Peter > > On Thursday, November 05, 2015 11:41:10 AM Benedikt Hegner wrote: > > Hi Peter, > > > > as I don't use windows at all, this is just a very wild guess... > > > > Could it be that in the second run you actually don't use > > > >/CMake/share/cmake-3.2/Modules/FindBoost.cmake > > > > but boost-config.cmake, which it now finds in the cached environment of > > the first run? > > > > This assumes of course that you built boost w/ CMake and not bjam... > > > > Cheers, > > > >Benedikt > > > > On 03.11.2015 14:10, Peter Steinbach wrote: > > > Hi to all, > > > > > > I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem. > > > I'd like to use boost with gcc on windows 7 64bit. I installed boost and > > > gcc with msys2 as I cannot use MSVC for the actual project I am looking > > > into for this. > > > > > > the funny thing, if I use the attached CMakeLists.txt on the machine and > > > call: ``` > > > $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - > > > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > > > -- The CXX compiler identification is GNU 4.9.2 > > > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe > > > -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works > > > -- Detecting CXX compiler ABI info > > > -- Detecting CXX compiler ABI info - done > > > -- Detecting CXX compile features > > > -- Detecting CXX compile features - done > > > setting win specific stuff > > > CMake Error at C:/Program Files > > > > > > (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): > > >Unable to find the requested Boost libraries. > > > > > >Boost version: 1.57.0 > > > > > >Boost include path: C:/msys64/mingw64/include > > > > > >Could not find the following static Boost libraries: > > >boost_filesystem > > >boost_system > > > > > >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:17 (FIND_PACKAGE) > > > > > > CMake Error at CMakeLists.txt:24 (MESSAGE): > > >Boost not found (C:/msys64/mingw64) > > > > > > -- Configuring incomplete, errors occurred! > > > See also > > > "C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMak > > > eF > > > iles/CMakeOutput.log". $ cmake -G "MSYS Makefiles" > > > -DBOOST_ROOT=C:/msys64/mingw64 - > > > DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. > > > setting win specific stuff > > > Boost 1.57 found __ > > > -- Configuring done > > > -- Generating done > > > -- Build files have been written to: > > > C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build > > > ``` > > > > > > I'd like to link statically to multithreaded libboost_*-mt.a from my > > > app. > > > But it proofes really hard to find Boost in the first place. > > > Any ideas? > > > > > > Peter -- Peter Steinbach, Dr. rer. nat. HPC Developer Scionics Computer Innovation GmbH Löscherstr. 16 01309 Dresden fon: +49 351 210 2882 fax: +49 351 210 1689 http://www.scionics.de Sitz der Gesellschaft: Dresden (Main office) Amtsgericht - Registergericht: Dresden HRB 20337 (Commercial Registry) Ust-IdNr.: DE813263791 (VAT ID Number) Geschäftsführer: John Duperon, Jeff Oegema (Managing Directors)# cmake compatibility issues CMAKE_MINIMUM_REQUIRED(VERSION 2.8) # project name PROJECT(test CXX) set(Boost_USE_STATIC_LIBSON) IF(WIN32) MESSAGE("setting win specific stuff") set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) set(BOOST_ALL_DYN_LINK OFF) #set(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0") ENDIF() FIND_PACKAGE (Boost 1.42 QUIET COMPONENTS filesystem system REQUIRED) IF(Boost_FOUND) MESSAGE("Boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} found _${Boost_LIBRARIES}_") ELSE() MESSAGE(FATAL_ERROR "Boost not found (${BOOST_ROOT})") IF(NOT EXISTS
[CMake] cmake needs 2 runs to find boost
Hi to all, I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem. I'd like to use boost with gcc on windows 7 64bit. I installed boost and gcc with msys2 as I cannot use MSVC for the actual project I am looking into for this. the funny thing, if I use the attached CMakeLists.txt on the machine and call: ``` $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. -- The CXX compiler identification is GNU 4.9.2 -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done setting win specific stuff CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message): Unable to find the requested Boost libraries. Boost version: 1.57.0 Boost include path: C:/msys64/mingw64/include Could not find the following static Boost libraries: boost_filesystem boost_system 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:17 (FIND_PACKAGE) CMake Error at CMakeLists.txt:24 (MESSAGE): Boost not found (C:/msys64/mingw64) -- Configuring incomplete, errors occurred! See also "C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMakeFiles/CMakeOutput.log". $ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 - DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib .. setting win specific stuff Boost 1.57 found __ -- Configuring done -- Generating done -- Build files have been written to: C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build ``` I'd like to link statically to multithreaded libboost_*-mt.a from my app. But it proofes really hard to find Boost in the first place. Any ideas? Peter # cmake compatibility issues CMAKE_MINIMUM_REQUIRED(VERSION 2.8) # project name PROJECT(test CXX) IF(WIN32) MESSAGE("setting win specific stuff") set(Boost_USE_STATIC_LIBSON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) set(BOOST_ALL_DYN_LINK OFF) set(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0") #SET(BOOST_ROOT "C:\\msys64\\mingw64") #SET(BOOST_LIBRARYDIR "C:\\msys64\\mingw64\\lib") ENDIF() FIND_PACKAGE (Boost 1.42 QUIET COMPONENTS filesystem system REQUIRED) IF(Boost_FOUND) MESSAGE("Boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} found _${Boost_Libraries}_") ELSE() MESSAGE(FATAL_ERROR "Boost not found (${BOOST_ROOT})") IF(NOT EXISTS ${Boost_ROOT}) MESSAGE("... because ${BOOST_ROOT} does not exist") ENDIF() ENDIF() -- 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