opencv build error in windows: no rule to make target [closed]

asked 2018-07-11 13:10:35 -0500

mduzgun gravatar image

updated 2018-07-11 21:53:55 -0500

berak gravatar image

Hi everyone. I can't create opencv jar with extra modules. I run cmake-gui,then I run "make" command in build file, I take error which no rule to make target. Can you help me, why I can create jar ? I take this logs:

Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
AVX_512F is not supported by C++ compiler
AVX512_SKX is not supported by C++ compiler
Dispatch optimization AVX512_SKX is not available, skipped
libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-4.0.0-pre-libjpeg-turbo
Looking for Mfapi.h
Looking for Mfapi.h - found
found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
at: C:/Users/mehmetdu/Desktop/opencv_extra/build/3rdparty/ippicv/ippicv_win
found Intel IPP IW sources: 2017.0.3
at: C:/Users/mehmetdu/Desktop/opencv_extra/build/3rdparty/ippicv/ippiw_win
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Found apache ant: C:/Users/mehmetdu/Desktop/opencvLib/apache-ant-1.10.4/bin/ant.bat (1.8.0)
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) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe:   NO
Protobuf:   NO
Glog:   NO
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.
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/Users/mehmetdu/Desktop/opencv_extra/source/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out ocl4dnn source code
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Tesseract:   NO
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 

General configuration for OpenCV 4.0.0-pre =====================================
  Version control:               unknown

  Extra modules:
    Location (extra):            C:/Users/mehmetdu/Desktop/opencv_extra/source/opencv_contrib/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2018-07-11T17:41:23Z
    Host:                        Windows 10.0.17134 AMD64
    CMake:                       3.11.4
    CMake generator:             Visual Studio 15 2017 Win64
    CMake build tool:            C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
    MSVC:                        1914

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2
      requested:                 SSE4_1 SSE4_2 AVX FP16 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2018-07-12 13:06:43.075790

Comments

since you're using VS2017, cmake will generate a opencv.sln file in the build folder, not a makefile.

open that with VS and build the INSTALL project. (instead of running "make")

berak gravatar imageberak ( 2018-07-12 01:32:50 -0500 )edit

Thanks for answer. I do build INSTALL project in VS, but .dll files created in build\install\x64\vc15\bin and .lib files created in build\install\x64\vc15\lib. build\install\java and build\install\bin are empty. There is no .jar files in build directory. Why I create .jar files for using Intellij Idea?

mduzgun gravatar imagemduzgun ( 2018-07-12 06:14:16 -0500 )edit

really ? nothing in C:/Users/mehmetdu/Desktop/opencv_extra/build/install/java ?

try to run the INSTALL project again, and carefully check the console log there

also, maybe you should use BUILD_SHARED_LIBS=OFF in cmake, so it won't depend on opencv dll's later

berak gravatar imageberak ( 2018-07-12 06:21:15 -0500 )edit

thank you, I take error that is "Unable to find a javac compiler" in VS build INSTALL,so jar isn't created. Last step, I can create opencv341.jar but I can't create opencv_java341.dll. Why I create .dll file?

mduzgun gravatar imagemduzgun ( 2018-07-12 09:01:40 -0500 )edit

"so jar isn't created"

"I can create opencv341.jar"

what now ? is it or isn't it created ?

berak gravatar imageberak ( 2018-07-12 09:46:19 -0500 )edit

I can create opencv400.jar and opencv_java400.dll in build\install\java directory, but in intellij idea project, I take error that "lib\opencv_java400.dll: Can't find dependent libraries". Is not there some libs in dll? What is reason?

mduzgun gravatar imagemduzgun ( 2018-07-12 12:07:58 -0500 )edit

if you have built it with BUILD_SHARED_LIBS=ON, it means, that opencv_java400.dll is dependant on all those other opencv dlls, and that you need to put the folder containing those on the PATH , so your prog can find them at runtime.

berak gravatar imageberak ( 2018-07-12 12:16:51 -0500 )edit

It works, thank you very much :) I spent 3 days for this. I think, with extra module release must put opencv webpage, a lot of people try to work build extra modules, a lot of times is spent.

mduzgun gravatar imagemduzgun ( 2018-07-12 12:50:01 -0500 )edit

actually, it's even mentioned here: https://docs.opencv.org/master/d9/d52...

but yes, it's not easy at all. ;(

berak gravatar imageberak ( 2018-07-12 13:03:48 -0500 )edit