Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem finding the right Boost version when multiple versions are installed/built on the system #53

Open
rodyo opened this issue Aug 21, 2020 · 1 comment · May be fixed by #54
Open

Comments

@rodyo
Copy link

rodyo commented Aug 21, 2020

Alright, I'll admit right away that I don't fully understand why this is happening, or exactly why my fix in the PR prevents it from happening...

Anyway, I'm working on a few different projects which use Boost. Some use the system-wide libraries (Ubuntu 20.04LTS: sudo apt install libboost-all-dev), some use custom built versions much like Tudat.

When I open a fresh clone of tudatBundle in QTCreator, it downloads/builds Boost 1.64. Then, when progressing to CMakeLists.txt in submodule tudat/Tudat/, the line

find_package(Boost 1.45.0 ...)

fails to pick up on the version just built; instead, it seems to look in the system's include dirs:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/boost_date_time-1.71.0/boost_date_time-config.cmake

  but it set boost_date_time_FOUND to FALSE so package "boost_date_time" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_date_time.so.1.71.0 (shared, Boost_USE_STATIC_LIBS=ON)

  * libboost_date_time.a (shared runtime, Boost_USE_STATIC_RUNTIME=ON)

Googling around gave me the "magic flag" you see in the PR. This consistently prevents the problem on my specific system, but I reckon reproducing this on your system/github actions is going to be difficult...

At the very least, it seems to have no adverse effects on clean systems.
Not tested on Windows/Mac.

@rodyo rodyo linked a pull request Aug 21, 2020 that will close this issue
@rodyo
Copy link
Author

rodyo commented Aug 24, 2020

Apparently it's related to Boost 1.70+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant