opencv_contrib: sfm dependencies are not found: Glog/Gflags

I am trying to build the sfm module but without success. I have followed the instructions at the README file but no matter what I am doing I am getting the following message all the time (check also below in CMake file):

Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags … … Unavailable: sfm

System: Archlinux 64bit Packages Installed:

# pacman -Qs ceres-solver
local/ceres-solver 1.11.0-1 [installed]
    Solver for nonlinear least squares problems
 # pacman -Qs gflags
local/gflags 2.1.2-2 [installed]
    C++ Library for commandline flag processing
local/python2-gflags 2.0-2 [installed]
    Commandline flags module for Python
 # pacman -Qs google-glog
local/google-glog 0.3.4-2 [installed]
    Logging library for C++

CMake file:

$ makepkg -sc
==> Making package: opencv-git 3.1.0.r20.g8d79285-1 (Sat Jan  2 01:40:27 CET 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating opencv git repo...
Fetching origin
  -> Updating opencv_contrib git repo...
Fetching origin
  -> Found fsh.patch
==> Validating source files with md5sums...
    opencv ... Skipped
    opencv_contrib ... Skipped
    fsh.patch ... Passed
==> Extracting sources...
  -> Creating working copy of opencv git repo...
Reset branch 'makepkg'
  -> Creating working copy of opencv_contrib git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> Starting prepare()...
patching file CMakeLists.txt
Hunk #1 succeeded at 311 (offset 11 lines).
Hunk #2 succeeded at 353 (offset 11 lines).
Hunk #3 succeeded at 382 (offset 11 lines).
Hunk #4 succeeded at 393 (offset 11 lines).
patching file cmake/templates/opencv_run_all_tests_unix.sh.in
Hunk #1 succeeded at 53 with fuzz 2.
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Detected version of GNU GCC: 53 (503)
-- Found ZLIB: /lib64/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found ZLIB: /lib64/libz.so (found version "1.2.8") 
-- Found OpenEXR: /lib64/libIlmImf.so
-- Checking for module 'libunicap'
--   Package 'libunicap' not found
-- Checking for module 'libucil'
--   Package 'libucil' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
WARNING, OpenNI library directory (set by OPENNI_LIB_DIR variable) is not found or does not have OpenNI libraries.
WARNING, OpenNI include directory (set by OPENNI_INCLUDE_DIR variable) is not found or does not have OpenNI include files.
WARNING, PrimeSensor Module binaries directory (set by OPENNI_PRIME_SENSOR_MODULE_BIN_DIR variable) is not found or does not have PrimeSensor Module binaries.
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Checking for module 'tbb'
--   Package 'tbb' not found
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /home/theodore/package_builds/opencv-git/src/opencv/3rdparty/ippicv/unpack/ippicv_lnx
-- CUDA detected: 7.5
-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.11", minimum required is "2.7") 
-- Found PythonLibs: /lib64/libpython2.7.so (found suitable exact version "2.7.11") 
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.1", minimum required is "3.4") 
-- Found PythonLibs: /lib64/libpython3.5m.so (found suitable exact version "3.5.1") 
-- Found apache ant 1.9.6: /bin/ant
-- Found VTK ver. 6.3.0 (usefile: /usr/lib/cmake/vtk-6.3/UseVTK.cmake)
-- Caffe:   NO
-- Protobuf:   YES
-- Glog:   YES
-- HDF5:   YES
-- Found required Ceres dependency: Eigen version 3.2.7 in /usr/include/eigen3
-- Found required Ceres dependency: Glog in /usr/include
-- Ceres version 1.11.0 detected here: /usr was built with C++11. Ceres target will add C++11 flags to compile options for targets using it.
-- Found Ceres version: 1.11.0 installed in: /usr
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
-- Tesseract:   YES
-- HDF5:   YES
-- The protocol buffer compiler and libprotobuf were found
-- Tesseract:   YES
-- 
-- General configuration for OpenCV 3.1.0-dev =====================================
--   Version control:               3.1.0-20-g8d79285-dirty
-- 
--   Platform:
--     Host:                        Linux 4.3.3-2-ARCH x86_64
--     CMake:                       3.4.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 5.3.0)
--     C++ flags (Release):         -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,-O1,--sort-common,--as-needed,-z,relro
--     Linker flags (Debug):        -Wl,-O1,--sort-common,--as-needed,-z,relro
--     Precompiled headers:         YES
--     Extra dependencies:          Qt5::Test Qt5::Concurrent Qt5::OpenGL /lib64/libwebp.so /lib64/libpng.so /lib64/libtiff.so /lib64/libjasper.so /lib64/libjpeg.so /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so gstvideo-1.0 gstapp-1.0 gstbase-1.0 gstriff-1.0 gstpbutils-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 dc1394 xine avcodec avformat avutil swscale avresample gphoto2 gphoto2_port exif /lib64/libbz2.so Qt5::Core Qt5::Gui Qt5::Widgets /lib64/libhdf5_hl.so /lib64/libhdf5.so /lib64/libpthread.so /lib64/libz.so /lib64/libdl.so /lib64/libm.so vtkRenderingOpenGL vtkImagingHybrid vtkIOImage vtkCommonDataModel vtkCommonMath vtkCommonCore vtksys vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkDICOMParser vtkIOCore /usr/lib64/libz.so vtkmetaio /usr/lib64/libjpeg.so /usr/lib64/libpng.so /usr/lib64/libtiff.so vtkImagingCore vtkRenderingCore vtkCommonColor vtkFiltersExtraction vtkFiltersCore vtkFiltersGeneral vtkCommonComputationalGeometry vtkFiltersStatistics vtkImagingFourier vtkalglib vtkFiltersGeometry vtkFiltersSources vtkInteractionStyle vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOGeometry vtkFiltersTexture vtkRenderingFreeType /usr/lib64/libfreetype.so vtkftgl vtkIOExport vtkRenderingAnnotation vtkImagingColor vtkRenderingContext2D vtkRenderingGL2PS vtkRenderingContextOpenGL /usr/lib64/libgl2ps.so vtkRenderingLabel /lib64/libtesseract.so /lib64/liblept.so dl m pthread rt /lib64/libGLU.so /lib64/libGL.so tbb cudart nppc nppi npps cufft -L/opt/cuda/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 cudev core cudaarithm flann hdf imgproc ml reg surface_matching video viz cudabgsegm cudafilters cudaimgproc cudawarping dnn fuzzy imgcodecs photo shape videoio cudacodec highgui objdetect plot ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo cvv datasets java rgbd stereo structured_light superres tracking videostab xfeatures2d ximgproc aruco optflow stitching matlab python2 python3
--     Disabled:                    world contrib_world
--     Disabled by dependency:      -
--     Unavailable:                 sfm
-- 
--   GUI: 
--     QT 5.x:                      YES (ver 5.5.1)
--     QT OpenGL support:           YES (Qt5::OpenGL 5.5.1)
--     OpenGL support:              YES (/lib64/libGLU.so /lib64/libGL.so)
--     VTK support:                 YES (ver 6.3.0)
-- 
--   Media I/O: 
--     ZLib:                        /lib64/libz.so (ver 1.2.8)
--     JPEG:                        /lib64/libjpeg.so (ver )
--     WEBP:                        /lib64/libwebp.so (ver encoder: 0x0209)
--     PNG:                         /lib64/libpng.so (ver 1.6.20)
--     TIFF:                        /lib64/libtiff.so (ver 42 - 4.0.6)
--     JPEG 2000:                   /lib64/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /lib64/libImath.so /lib64/libIlmImf.so /lib64/libIex.so /lib64/libHalf.so /lib64/libIlmThread.so (ver 2.2.0)
--     GDAL:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.3)
--     FFMPEG:                      YES
--       codec:                     YES (ver 56.60.100)
--       format:                    YES (ver 56.40.101)
--       util:                      YES (ver 54.31.100)
--       swscale:                   YES (ver 3.1.101)
--       resample:                  YES (ver 2.1.0)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 1.6.2)
--       video:                     YES (ver 1.6.2)
--       app:                       YES (ver 1.6.2)
--       riff:                      YES (ver 1.6.2)
--       pbutils:                   YES (ver 1.6.2)
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/YES
--     XIMEA:                       NO
--     Xine:                        YES (ver 1.2.6)
--     gPhoto2:                     YES
-- 
--   Parallel framework:            TBB (ver 4.4 interface 9002)
-- 
--   Other third-party libraries:
--     Use IPP:                     9.0.1 [9.0.1]
--          at:                     /home/theodore/package_builds/opencv-git/src/opencv/3rdparty/ippicv/unpack/ippicv_lnx
--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Eigen:                   YES (ver 3.2.7)
--     Use Cuda:                    YES (ver 7.5)
--     Use OpenCL:                  YES
--     Use custom HAL:              NO
-- 
--   NVIDIA CUDA
--     Use CUFFT:                   YES
--     Use CUBLAS:                  NO
--     USE NVCUVID:                 NO
--     NVIDIA GPU arch:             20 21 30 35
--     NVIDIA PTX archs:            30
--     Use fast math:               NO
--
--   OpenCL:
--     Version:                     dynamic
--     Include path:                /home/theodore/package_builds/opencv-git/src/opencv/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
--
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.11)
--     Libraries:                   /lib64/libpython2.7.so (ver 2.7.11)
--     numpy:                       /usr/lib/python2.7/site-packages/numpy/core/include (ver 1.10.2)
--     packages path:               lib/python2.7/site-packages
--
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.5.1)
--     Libraries:                   /lib64/libpython3.5m.so (ver 3.5.1)
--     numpy:                       /usr/lib/python3.5/site-packages/numpy/core/include (ver 1.10.2)
--     packages path:               lib/python3.5/site-packages
--
--   Python (for build):            /usr/bin/python2.7
--
--   Java:
--     ant:                         /bin/ant (ver 1.9.6)
--     JNI:                         /usr/lib/jvm/default/include /usr/lib/jvm/default/include/linux /usr/lib/jvm/default/include
--     Java wrappers:               YES
--     Java tests:                  YES
--
--   Matlab:
--     mex:                         /home/theodore/matlab/r2015b/bin/mex
--     Compiler/generator:          Working
--
--   Documentation:
--     Doxygen:                     /usr/bin/doxygen (ver 1.8.10)
--     PlantUML:                    NO
--
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              YES
--
--   Install path:                  /usr
--
--   cvconfig.h is in:              /home/theodore/package_builds/opencv-git/src/opencv
-- -----------------------------------------------------------------
--
CMake Warning at CMakeLists.txt:1250 (message):
  The source directory is the same as binary directory.  "make clean" may
  damage the source tree


-- Configuring done

I tried also to set manually the paths through CMake but still no success:

-D GFLAGS_INCLUDE_DIRS=/usr/include/gflags -D GFLAGS_LIBRARIES=/usr/lib/libgflags.so’

I was not sure if it is related with #485 so I opened a new issue.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

  1. There are some problems with the PKGBUILD script =(
  2. Try to undef cmake -U SFM_DEPS_OK . parameter.
  3. Try to force cmake -DSFM_DEPS_OK=ON . parameter to bypass this check.