CMake config errors with locally compiled Boost
The CMake modernization changes (Boost import targets) seem to be causing a new problem in configuring gtsam with locally compiled Boost. To test different versions of Boost, I locally compile to a staging directory (without installing in a system path!), and then configure gtsam with ccmake .. -DBOOST_ROOT=/home/cbeall/local_prefix/boost_1_65_1/
@jlblancoc Have you tried this? Any ideas on the proper way to fix?
The method above used to work regardless of the Boost version, but now I get errors like this:
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:137 (find_package)
My staging directory looks like this:
cbeall@workstation-1091:~$ ls ~/local_prefix/
boost_1_65_1 boost_1_68_0
cbeall@workstation-1091:~$ ls ~/local_prefix/boost_1_65_1/
include lib
cbeall@workstation-1091:~$
Comments (6)
-
-
Chris, can you check if your cmake FindBoost.cmake script knows about that version of boost?
For example:
grep _Boost_KNOWN_VERSIONS /usr/share/cmake*/Modules/FindBoost.cmake -A 5
Shows on u18.04:
"1.65.1" "1.65.0" "1.65" "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "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"
It seems that it might be the problem...
I just tested with Boost 1.69 and stumped against this... Will try with an older version to verify if the issue is the outdated cmake script and/or the local stage.
Related: https://gitlab.kitware.com/cmake/cmake/issues/17575
-
Yes, I can confirm that the current
develop
works with a local build of Boost (installed to$HOME/...
), but only if the version of CMake is new enough for that version of Boost... (sigh)One option would be for you to grab the latest FindBoost.cmake from CMake git?
Cheers
-
reporter Hmmm, that's an option, but a bit annoying, because newer versions of Boost (which
FindBoost.cmake
didn't know about) worked perfectly fine before the switch to imported boost targets.Reading the documentation in the script, I see there's also a way to pass additional versions to
FindBoost.cmake
. If that works, I'd prefer that as a workaround. -
reporter - changed status to closed
Fix cmake handling newer boost versions (Closes:
#442)→ <<cset a0fce4257fe4>>
-
reporter Merged in jlblancoc/gtsam/fix-boost-newer (pull request #410)
Fix cmake handling newer boost versions (Closes:
#442)Approved-by: Chris Beall chrisbeall@gmail.com
→ <<cset 417252d4d309>>
- Log in to comment
I'll check it out...