Update OpenCV version
Description: I am unable to build Kimera while building on a Docker image.
I work around it by building the container without building kimera, doing the following fix on the cmakelist file within the container, and then building kimera within the container.
I tried building kimera following the kimera-vio-ros instructions on a new catkin workspace and confirmed this issue is also present when I do that. I wonder if this is a general issue with the openCV version?
My current fix for it:
I changed this line: https://github.com/MIT-SPARK/Kimera-VIO/blob/1a524efcd2e82ca117e243490d2d6a5f2cf60b35/CMakeLists.txt#L36
to
find_package(OpenCV 3.4.2 REQUIRED)
and that fixed it
Console output:
Errors << kimera_vio:make /root/MIT/catkin_ws/logs/kimera_vio/build.make.003.log
libkimera_vio.so: undefined reference to `cv::Mat::updateContinuityFlag()'
collect2: error: ld returned 1 exit status
make[2]: *** [stereoVIOEuroc] Error 1
make[1]: *** [CMakeFiles/stereoVIOEuroc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/testKimeraVIO.dir/tests/testOpticalFlowPredictor.cpp.o: In function `_ZNK2cv3MatcvNS_4MatxIT_XT0_EXT1_EEEIfLi3ELi3EEEv':
testOpticalFlowPredictor.cpp:(.text._ZNK2cv3MatcvNS_4MatxIT_XT0_EXT1_EEEIfLi3ELi3EEEv[_ZNK2cv3MatcvNS_4MatxIT_XT0_EXT1_EEEIfLi3ELi3EEEv]+0x185): undefined reference to `cv::Mat::updateContinuityFlag()'
CMakeFiles/testKimeraVIO.dir/tests/testOpticalFlowPredictor.cpp.o: In function `VIO::OpticalFlowPredictorFixture::visualizeScene(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<cv::Point_<float>, std::allocator<cv::Point_<float> > > const&)':
testOpticalFlowPredictor.cpp:(.text._ZN3VIO27OpticalFlowPredictorFixture14visualizeSceneERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN2cv6Point_IfEESaISC_EE[_ZN3VIO27OpticalFlowPredictorFixture14visualizeSceneERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN2cv6Point_IfEESaISC_EE]+0x25d): undefined reference to `cv::Mat::updateContinuityFlag()'
collect2: error: ld returned 1 exit status
make[2]: *** [testKimeraVIO] Error 1
make[1]: *** [CMakeFiles/testKimeraVIO.dir/all] Error 2
make: *** [all] Error 2
That might be because of multiple opencv versions in your system?
Do you know which version created the
libkimera_vio.so: undefined reference to `cv::Mat::updateContinuityFlag()'
error?