Support for Boost 1.70.0

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for Boost 1.70.0

Stephan Menzel
Hello List,

Boost 1.70.0 was just released and I'm integrating it into our projects. I notice FindBoost doesn't do the trick on Windows (MSVC141) anymore, on Linux / G++ it works fine. Here's what I do:

set(Boost_USE_STATIC_LIBS           ON) 
set(Boost_USE_MULTITHREADED         ON)
set(Boost_USE_STATIC_RUNTIME       OFF)
set(Boost_USE_DEBUG_LIBS           OFF) 
set(Boost_USE_DEBUG_RUNTIME        OFF) 

set(BOOST_INCLUDEDIR "${BOOST_ROOT}/include")
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib")

find_package(Boost REQUIRED
COMPONENTS
system
filesystem 
random 
chrono
log
date_time 
regex
thread
fiber
exception
program_options 
unit_test_framework 
)

It complains:
Could not find the following static Boost libraries:

boost_system
boost_log
boost_unit_test_framework

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.


Previous Boost versions worked. The libs are present as always and the same code works fine with 1.69.  

set(Boost_ADDITIONAL_VERSIONS "1.70.0") doesn't change anything as 1.70.0 appears to be already in the known versions struct in FindBoost. 

I have tested with CMake 3.13.4 and 3.14.1. Both fail.

I have worked my way through the FindBoost module but can't figure out what causes those 3 libs to appear missing. They do appear in the Variables View, with their correct filenames. Everything seems to be fine but the error stops execution. When I remove those 3 libs from the list, linking against imported targets later breaks.

Does anybody have the same issue upgrading? Is there a workaround perhaps?

Cheers,
Stephan

--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Support for Boost 1.70.0

Michael Ellery
whenever I use bleeding-edge boost, I try to grab the latest FindBoost:   https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake

..in particular, you probably want https://github.com/Kitware/CMake/commit/266808c4130a0b40aed236381707462a9368a1eb#diff-555801259d7df67368f7deab1f9deacd which doesn’t look like it’s been merged to release yet.

-Mike

> On Apr 12, 2019, at 7:31 AM, Stephan Menzel <[hidden email]> wrote:
>
> Hello List,
>
> Boost 1.70.0 was just released and I'm integrating it into our projects. I notice FindBoost doesn't do the trick on Windows (MSVC141) anymore, on Linux / G++ it works fine. Here's what I do:
>
> set(Boost_USE_STATIC_LIBS           ON)
> set(Boost_USE_MULTITHREADED         ON)
> set(Boost_USE_STATIC_RUNTIME       OFF)
> set(Boost_USE_DEBUG_LIBS           OFF)
> set(Boost_USE_DEBUG_RUNTIME        OFF)
>
> set(BOOST_INCLUDEDIR "${BOOST_ROOT}/include")
> set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib")
>
> find_package(Boost REQUIRED
> COMPONENTS
> system
> filesystem
> random
> chrono
> log
> date_time
> regex
> thread
> fiber
> exception
> program_options
> unit_test_framework
> )
>
> It complains:
> Could not find the following static Boost libraries:
>
> boost_system
> boost_log
> boost_unit_test_framework
>
> 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.
>
> Previous Boost versions worked. The libs are present as always and the same code works fine with 1.69.  
>
> set(Boost_ADDITIONAL_VERSIONS "1.70.0") doesn't change anything as 1.70.0 appears to be already in the known versions struct in FindBoost.
>
> I have tested with CMake 3.13.4 and 3.14.1. Both fail.
>
> I have worked my way through the FindBoost module but can't figure out what causes those 3 libs to appear missing. They do appear in the Variables View, with their correct filenames. Everything seems to be fine but the error stops execution. When I remove those 3 libs from the list, linking against imported targets later breaks.
>
> Does anybody have the same issue upgrading? Is there a workaround perhaps?
>
> Cheers,
> Stephan
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake

--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Support for Boost 1.70.0

Stephan Menzel
Hello Michael,

thanks for your response.

On Fri, Apr 12, 2019 at 4:02 PM Michael Ellery <[hidden email]> wrote:
whenever I use bleeding-edge boost, I try to grab the latest FindBoost:   https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake

..in particular, you probably want https://github.com/Kitware/CMake/commit/266808c4130a0b40aed236381707462a9368a1eb#diff-555801259d7df67368f7deab1f9deacd which doesn’t look like it’s been merged to release yet.

 
I believe it has. I actually already tried those changes to no effect. It seems not identical to the 3.14.2 version but the changes to the dependency detection don't seem to be the issue. The problem is not so much that the dependencies among the imported targets are wrong, the problem is that 3 of those dependencies appear as NOT_FOUND, while they clearly are found.
Still, FWIW I took the current commit and tried it, no change. Same error. This is very mysterious.

Cheers,
Stephan




--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Support for Boost 1.70.0

Michael Ellery
oh, sorry I misunderstood. How did you build/install boost on windows?

I’m not sure what “Variable View” is…is that a CMake gui thing?  Since it’s only complaining about a few libraries, is it possible that those three didn’t actually successfully build for one reason or another — maybe check the stage directory for the expected lib files (I believe you’d be looking for the “ -mt-x64.lib” files…)? If those files really are present, then I agree it’s a strange problem.


> On Apr 12, 2019, at 8:18 AM, Stephan Menzel <[hidden email]> wrote:
>
> Hello Michael,
>
> thanks for your response.
>
> On Fri, Apr 12, 2019 at 4:02 PM Michael Ellery <[hidden email]> wrote:
> whenever I use bleeding-edge boost, I try to grab the latest FindBoost:   https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake
>
> ..in particular, you probably want https://github.com/Kitware/CMake/commit/266808c4130a0b40aed236381707462a9368a1eb#diff-555801259d7df67368f7deab1f9deacd which doesn’t look like it’s been merged to release yet.
>
>  
> I believe it has. I actually already tried those changes to no effect. It seems not identical to the 3.14.2 version but the changes to the dependency detection don't seem to be the issue. The problem is not so much that the dependencies among the imported targets are wrong, the problem is that 3 of those dependencies appear as NOT_FOUND, while they clearly are found.
> Still, FWIW I took the current commit and tried it, no change. Same error. This is very mysterious.
>
> Cheers,
> Stephan
>
>
>
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake

--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Support for Boost 1.70.0

Stephan Menzel

> On 12. Apr 2019, at 17:48, Michael Ellery <[hidden email]> wrote:
>
> oh, sorry I misunderstood. How did you build/install boost on windows

All ‘normal’ boostrap, build. With tagged filenames. Files look very much like I expect them to look. This will actually be the 50th boost version I’ll be using so I think I know the drill here.

> I’m not sure what “Variable View” is…is that a CMake gui thing?

Yes. Didn’t know its official name. It does show all the libraries were found.

>  Since it’s only complaining about a few libraries, is it possible that those three didn’t actually successfully build for one reason or another — maybe check the stage directory for the expected lib files (I believe you’d be looking for the “ -mt-x64.lib” files…)? If those files really are present, then I agree it’s a strange problem.

I also double checked this a few times. Even rebuilt Boost and tried with different files.

I guess the answer really lies in ‘why those 3?’  At first I thought it would be dependencies among the imported targets but I did depend on them directly. Also, the error is thrown before I create any target myself, so it must be something about detecting if the libs are found or not. I‘m at a loss here. This is too strange.

Cheers,
Stephan
--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Support for Boost 1.70.0

Stephan Menzel
Hello List,

On Fri, Apr 12, 2019 at 6:13 PM Stephan Menzel <[hidden email]> wrote:

I guess the answer really lies in ‘why those 3?’  At first I thought it would be dependencies among the imported targets but I did depend on them directly. Also, the error is thrown before I create any target myself, so it must be something about detecting if the libs are found or not. I‘m at a loss here. This is too strange.

A little update here. It is solved, please move along. It was my bad of course. I had focused on the actual libraries and went on and on debugging the module. Then it turned out it was the include dir. When copying it to it's final destination, somehow the copy command must have done only half of a job. Some include dirs were missing. This lead to the module finding the libs OK but some config headers, namely the ones listed in the missing list, were indeed not there. Took me so long to figure this out, since I was only looking at the actual library files and never suspected a half copied boost directory.

An error message of the FindBoost module saying that the headers were missing would have been awesome though.

Anyway, everything is fine now, thanks for your input!

Cheers,
Stephan 




--

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:
https://cmake.org/mailman/listinfo/cmake