Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building OpenCV with contrib modules on configuration step (CMake) #63

Open
zabsy opened this issue Aug 8, 2024 · 0 comments

Comments

@zabsy
Copy link

zabsy commented Aug 8, 2024

Hey Joshua Bird,

I'm building opencv from source on Ubuntu 22.04.4 to get the SFM module running for this project, following the instructions here exactly, except replacing "4.x" with "4.10.0"

After running the configuration step:
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.10.0/modules ../opencv-4.10.0

I'm running into 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 installing sudo apt-get install libabsl-dev but I still end up with the same errors.

Did you encounter any similar issues, or do you have any ideas for how to fix this? Any suggestions would be greatly appreciated.

Also,
This project is amazing, thank you for making this open source!

@zabsy zabsy changed the title Error while building OpenCV Error while building OpenCV with CMake on configuration step Aug 8, 2024
@zabsy zabsy changed the title Error while building OpenCV with CMake on configuration step Error while building OpenCV with contrib modules with CMake on configuration step Aug 8, 2024
@zabsy zabsy changed the title Error while building OpenCV with contrib modules with CMake on configuration step Error while building OpenCV with contrib modules on configuration step (CMake) Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant