Missing boost package configuration files when building on ubuntu 20.04
Closed this issue · 7 comments
I get CMake errors complaining about missing package configuration files for boost_program_options and boost_unit_test_frameworks when building proxy-fmu on ubuntu 20.04. The files are found if I install the dev version of the missing packages on my system.
Shouldn't this be handled by conan?
`CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Could not find a package configuration file provided by
"boost_unit_test_framework" (requested version 1.71.0) with any of the
following names:
boost_unit_test_frameworkConfig.cmake
boost_unit_test_framework-config.cmake
Add the installation prefix of "boost_unit_test_framework" to
CMAKE_PREFIX_PATH or set "boost_unit_test_framework_DIR" to a directory
containing one of the above files. If "boost_unit_test_framework" provides
a separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package)
CMakeLists.txt:63 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/thomas/Repositories/OSP/proxy-fmu/cmake-build-debug/CMakeFiles/CMakeOutput.log".`
CMake version?
I assume you are trying to run the tests and have set PROXYFMU_BUILD_TESTS=ON
(otherwise it should not look for boost.test)
CMake version 3.16.0
Building with both tests and examples
Care to test with a more recent cmake version? Alternatively figure out how to make it work on older versions and then we could add an if/else for linking.
Mhh, I think the github ubuntu runner uses 3.12, so that might not be it..
I just added a 20.04 runner at it seems fine. So I don't know what is happening on your end.
Well, I always seem to have trouble building 😄
Looks like the find_package function peeks at my system level installations instead of conan's data folder. Only for boost though.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71.0") found components: filesystem program_options
-- Found THRIFT: /home/thomas/.conan/data/thrift/0.14.1///package/46ad58d5a3966cdee664e28517f28f3030395909/lib/libthrift.a
-- Found FMILIB: /home/thomas/.conan/data/fmilibrary/2.0.3///package/49e7f59961e8ed9b7d1d33caa2e6d613b00b72a5/lib/libfmilib.a
Ok, so I tried to remove boost from my system. Then cmake looks in conan's data folder instead. Seems like it prioritizes system wide installations first.