opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.42k stars 5.76k forks source link

cannot build opencv with opencv_contrib #1485

Closed LaurentBerger closed 6 years ago

LaurentBerger commented 6 years ago

My cmake command is :

myRepo=$(pwd)
CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"
RepoSource=opencv
cd Build/$RepoSource
CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=ON -DWITH_LAPACK:BOOL=ON -DCV_TRACE:BOOL=OFF'
TESSERACT_OPTIONS='-DTesseract_INCLUDE_DIR=../../Install/tesseract/include -DTesseract_LIBRARY=../../Install/tesseract/lib/tesseract400.lib -DLept_LIBRARY=../../Install/leptonica/lib/leptonica-1.74.4.lib'
EIGEN_OPTIONS=''
CERES_OPTIONS='-DCeres_DIR:PATH="${myRepo}"/install/ceres-solver/cmake -Dglog_DIR:PATH="$myRepo"/install/glog/lib/cmake/glog -Dgflags_DIR:PATH="$myRepo"/build/gflags'
cmake -G"$CMAKE_CONFIG_GENERATOR"  \
-DTesseract_INCLUDE_DIR:PATH="${myRepo}"/Install/tesseract/include -DTesseract_LIBRARY="${myRepo}"/Install/tesseract/lib/tesseract400.lib -DLept_LIBRARY="${myRepo}"/Install/leptonica/lib/leptonica-1.74.4.lib \
-DEIGEN_DIR:PATH="$myRepo"/eigen -DEIGEN_INCLUDE_DIR="$myRepo"/eigen -DEIGEN_INCLUDE_PATH="$myRepo"/eigen \
-DCeres_DIR="$myRepo"/install/ceres-solver/cmake -Dglog_DIR:PATH="$myRepo"/install/glog/lib/cmake/glog -Dgflags_DIR:PATH="$myRepo"/build/gflags \
$CMAKE_OPTIONS -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-DVTK_DIR:PATH="$myRepo"/install/vtk/lib/cmake/vtk-8.1 -DINSTALL_CREATE_DISTRIB=ON -DCMAKE_INSTALL_PREFIX=../../install/"$RepoSource"  ../../"$RepoSource"
#-DVTK_DIR:PATH="$myRepo"/install/vtk/lib/cmake/vtk-8.1 -DCMAKE_INSTALL_PREFIX=../../install/"$RepoSource"  ../../"$RepoSource"

My cmake output is :


-- The CXX compiler identification is MSVC 19.0.24215.1
-- The C compiler identification is MSVC 19.0.24215.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_CXX11 (check file: cmake/checks/cxx11.cpp)
-- Performing Test HAVE_CXX11 - Success
-- Found PythonInterp: F:/Python/Python35/python.exe (found suitable version "3.5", minimum required is "2.7")
-- Found PythonInterp: F:/Python/Python35/python.exe (found suitable version "3.5", minimum required is "3.4")
-- Found PythonLibs: optimized;F:/Python/Python35/libs/python35.lib;debug;F:/Python/Python35/libs/python35_d.lib (found suitable exact version "3.5.0")
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Failed
-- Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CPU_SSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CPU_SSSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success
-- Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CPU_POPCNT_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success
-- Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CPU_FP16_SUPPORT - Success
-- Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_avx.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX - Success
-- Performing Test HAVE_CXX_ARCH:AVX2 (check file: cmake/checks/cpu_avx2.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX2 - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for fseeko
-- Looking for fseeko - not found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for io.h
-- Looking for io.h - found
-- Looking for jbg_newlen
-- Looking for jbg_newlen - not found
-- Looking for search.h
-- Looking for search.h - found
-- Looking for string.h
-- Looking for string.h - found
-- FFMPEG: Download: opencv_ffmpeg.dll
-- FFMPEG: Download: opencv_ffmpeg_64.dll
-- FFMPEG: Download: ffmpeg_version.cmake
-- IPPICV: Download: ippicv_2017u3_win_intel64_general_20170822.zip
-- found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
-- at: G:/Lib/build/opencv/3rdparty/ippicv/ippicv_win
-- found Intel IPP IW sources: 2017.0.3
-- at: G:/Lib/build/opencv/3rdparty/ippicv/ippiw_win
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Found JNI: C:/Program Files/Java/jdk1.8.0_112/lib/jawt.lib
-- Could NOT find Pylint (missing: PYLINT_EXECUTABLE)
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- Found VTK 8.1.0 (G:/Lib/install/vtk/lib/cmake/vtk-8.1/UseVTK.cmake)
-- Caffe:   NO
-- Protobuf:   NO
-- Glog:   NO
-- tiny-dnn: Download: v1.0.0a3.tar.gz
-- Looking for tiny_dnn.h
-- Looking for tiny_dnn.h - found
-- Found tiny-dnn in: G:/Lib/build/opencv/3rdparty/tinydnn/tiny-dnn-1.0.0a3
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='')
-- freetype2:   NO
-- harfbuzz:    NO
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: G:/lib/build/gflags
-- Detected gflags version: 2.2.1
-- Found required Ceres dependency: Eigen version 3.3.90 in G:/Lib/eigen
-- Found installed version of glog: G:/lib/Install/glog/lib/cmake/glog
-- Detected glog version: 0.3.5
-- Found required Ceres dependency: glog
-- Found Ceres version: 1.13.0 installed in: G:/Lib/install/ceres-solver with components: [SchurSpecializations, OpenMP]
-- Checking SFM deps... TRUE
CMake Error at cmake/OpenCVModule.cmake:397 (message):
  WARNINGUnresolved dependencies or loop in dependency graph (4)

  Processed OPENCV_MODULE_opencv_img_hash_DEPS:
  opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_calib3d;opencv_ccalib;opencv_core;opencv_datasets;opencv_dnn;opencv_dpm;opencv_face;opencv_features2d;opencv_flann;opencv_fuzzy;opencv_highgui;opencv_img_hash;opencv_imgcodecs;opencv_imgproc;opencv_line_descriptor;opencv_ml;opencv_objdetect;opencv_optflow;opencv_phase_unwrapping;opencv_photo;opencv_plot;opencv_python_bindings_generator;opencv_reg;opencv_rgbd;opencv_saliency;opencv_sfm;opencv_shape;opencv_stereo;opencv_stitching;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_text;opencv_tracking;opencv_video;opencv_videoio;opencv_videostab;opencv_viz;opencv_world;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto

  Good modules:
  opencv_core;opencv_flann;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_phase_unwrapping;opencv_photo;opencv_plot;opencv_reg;opencv_surface_matching;opencv_video;opencv_viz;opencv_xphoto;opencv_dnn;opencv_fuzzy;opencv_imgcodecs;opencv_shape;opencv_videoio;opencv_xobjdetect;opencv_highgui;opencv_superres;opencv_bioinspired;opencv_dpm;opencv_features2d;opencv_line_descriptor;opencv_saliency;opencv_text;opencv_calib3d;opencv_ccalib;opencv_datasets;opencv_rgbd;opencv_stereo;opencv_structured_light;opencv_tracking;opencv_videostab;opencv_xfeatures2d;opencv_ximgproc;opencv_aruco;opencv_bgsegm;opencv_face;opencv_optflow;opencv_stitching

  Bad modules:
  opencv_img_hash;opencv_python_bindings_generator;opencv_sfm;opencv_world
Call Stack (most recent call first):
  cmake/OpenCVModule.cmake:551 (__ocv_sort_modules_by_deps)
  cmake/OpenCVModule.cmake:307 (__ocv_resolve_dependencies)
  modules/CMakeLists.txt:7 (ocv_glob_modules)

-- Configuring incomplete, errors occurred!
See also "G:/Lib/build/opencv/CMakeFiles/CMakeOutput.log".
See also "G:/Lib/build/opencv/CMakeFiles/CMakeError.log".

I think problem is in commit 540493011 #9260

alalek commented 6 years ago

I think problem is in commit 540493011 #9260

'git bisect' shows this commit: https://github.com/opencv/opencv/pull/9260/commits/768f4cb7bc18872c3a8179e79a2e9c8406ed7c1f