I’m building OpenCV from source on Ubuntu 22.04.4 in order to use the SFM module, following the instructions here exactly, except replacing “4.x” with “4.10.0”
After getting to the configuration step and running cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.10.0/modules ../opencv-4.10.0
I get these errors:
CMake Error at cmake/OpenCVUtils.cmake:1582 (add_library):
Target "opencv_sfm" links to target "absl::log" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:989 (ocv_add_library)
cmake/OpenCVModule.cmake:905 (_ocv_create_module)
/home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/CMakeLists.txt:150 (ocv_create_module)
CMake Error at cmake/OpenCVUtils.cmake:1582 (add_library):
Target "opencv_sfm" links to target "absl::check" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:989 (ocv_add_library)
cmake/OpenCVModule.cmake:905 (_ocv_create_module)
/home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/CMakeLists.txt:150 (ocv_create_module)
CMake Error at cmake/OpenCVUtils.cmake:1582 (add_library):
Target "opencv_sfm" links to target "absl::fixed_array" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:989 (ocv_add_library)
cmake/OpenCVModule.cmake:905 (_ocv_create_module)
/home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/CMakeLists.txt:150 (ocv_create_module)
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt:9 (ADD_LIBRARY):
Target "opencv.sfm.correspondence" links to target "absl::log" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt:9 (ADD_LIBRARY):
Target "opencv.sfm.correspondence" links to target "absl::check" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/correspondence/CMakeLists.txt:9 (ADD_LIBRARY):
Target "opencv.sfm.correspondence" links to target "absl::fixed_array" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt:19 (ADD_LIBRARY):
Target "opencv.sfm.multiview" links to target "absl::log" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt:19 (ADD_LIBRARY):
Target "opencv.sfm.multiview" links to target "absl::check" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at /home/zabsy/opencv_build/opencv_contrib-4.10.0/modules/sfm/src/libmv_light/libmv/multiview/CMakeLists.txt:19 (ADD_LIBRARY):
Target "opencv.sfm.multiview" links to target "absl::fixed_array" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
I tried to fix it by running sudo apt-get install libabsl-dev
but I get the same errors.
Does anyone know how to fix this?
Any help or suggestions would be greatly appreciated
zabsy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.