Ceres-solver depends on an older version of glog which was not cmake friendly.
If multiple packages downstream of ceres-solver calls find_package(Ceres REQUIRED), the compiler will complain:
add_library cannot create imported target "glog::glog" because another target with the same name already exists.
This problem has been caught in #7.
This problem has been mentioned in a couple of issues:
The latest version of glog might resolve this problem, but it requires a more recent version of cmake (>3.22) that is not available in the focal apt servers. To install cmake from https://cmake.org/download/, I would have to first purge the pre-existing cmake apt package in the system. This gets messy because ros-noetic and libboost both rely on that cmake apt package, and will be removed when purging cmake. Which means I will have to re-install everything again..
Considering all these, I am proposing a simple patch to the FindGlog.Cmake to ensure that the glog::glog target does not get created more than once. The .patch file will be commited to this repo, and will be applied to the ceres-solver repo in install-deps.sh
Create new docker image, that is Focal + Noetic (With cmake 3.22)
For now, we will stick with option 3, continue progress on VINS-mono. Slowly work on this in the background, or re-prioritise when it rears its ugly head again.
Problem
Ceres-solver depends on an older version of glog which was not cmake friendly. If multiple packages downstream of ceres-solver calls find_package(Ceres REQUIRED), the compiler will complain:
This problem has been caught in #7.
This problem has been mentioned in a couple of issues:
How to fix
The latest version of glog might resolve this problem, but it requires a more recent version of cmake (>3.22) that is not available in the focal apt servers. To install cmake from https://cmake.org/download/, I would have to first purge the pre-existing cmake apt package in the system. This gets messy because ros-noetic and libboost both rely on that cmake apt package, and will be removed when purging cmake. Which means I will have to re-install everything again..
Considering all these, I am proposing a simple patch to the FindGlog.Cmake to ensure that the glog::glog target does not get created more than once. The .patch file will be commited to this repo, and will be applied to the ceres-solver repo in install-deps.sh