0

System configuration
OS : Ubuntu 18.04
opencv version : 4.2.0
opencv_contrib version : 4.2.0

I am trying to build OpenCV 4.2.0 from source and I am facing the following error :

[ 78%] Built target multiview
Consolidate compiler generated dependencies of target simple_pipeline
[ 79%] Built target simple_pipeline
Consolidate compiler generated dependencies of target correspondence
[ 79%] Built target correspondence
Consolidate compiler generated dependencies of target opencv_sfm
[ 79%] Built target opencv_sfm
Consolidate compiler generated dependencies of target opencv_test_sfm
[ 79%] Linking CXX executable ../../bin/opencv_test_sfm
../../lib/libopencv_sfm.so.4.2.0: undefined reference to `google::InitVLOG3__(google::SiteFlag*, int*, char const*, int)'
collect2: error: ld returned 1 exit status
modules/sfm/CMakeFiles/opencv_test_sfm.dir/build.make:271: recipe for target 'bin/opencv_test_sfm' failed
make[2]: *** [bin/opencv_test_sfm] Error 1
CMakeFiles/Makefile2:15034: recipe for target 'modules/sfm/CMakeFiles/opencv_test_sfm.dir/all' failed
make[1]: *** [modules/sfm/CMakeFiles/opencv_test_sfm.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2

I have checked and I have libgoogle-glog-dev installed on my system using `apt-get.

Help is highly appreciated, TIA !!

  • related: https://forum.opencv.org/t/error-undefined-reference-to-google-initvlog3/8679 – Christoph Rackwitz May 07 '22 at 16:42
  • @ChristophRackwitz now we're in a loop – GlassAnimals May 07 '22 at 17:13
  • 1
    This software appears to be using cmake, so run `make VERBOSE=1` so you can see the actual link line, not this useless message about "Linking CXX executable". Once you know the actual link line, if it's not obvious what's wrong, show it to us and we can help. – MadScientist May 07 '22 at 22:21

0 Answers0