Ask Your Question

Revision history [back]

Help building openCV + contrib libraries using CMake visual studio 2019

Hello, I am trying to build openCV with the contrib libraries but I am having trouble. I have both python 2 and 3 installed via anaconda (I am not sure if I should delete one?). I have the libraries for python 2 and 3 in the path (system environment variables).

When I try and building visual studio I am getting thousands of errors. I am running windows 10 and visual studio 2019.

Can anybody help me with some next steps to try, sorry I've been bashing my head on this for a while.

Many thanks, Richard

This error is in red the rest of the CMake log is below.

CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:967 (include)



CMAKE log:

Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363. The CXX compiler identification is MSVC 19.25.28614.0 The C compiler identification is MSVC 19.25.28614.0 Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/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/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Detected processor: AMD64 Found PythonInterp: C:/DEV/Anaconda2/python.exe (found suitable version "2.7.16", minimum required is "2.7") Found PythonLibs: C:/DEV/Anaconda2/libs/python27.lib (found suitable exact version "2.7.16") Found PythonInterp: C:/DEV/anaconda3/python.exe (found suitable version "3.7.6", minimum required is "3.2") Found PythonLibs: C:/DEV/anaconda3/libs/python37.lib (found suitable exact version "3.7.6") Performing Test HAVE_CXX_FP:PRECISE Performing Test HAVE_CXX_FP:PRECISE - Success Performing Test HAVE_C_FP:PRECISE Performing Test HAVE_C_FP:PRECISE - Success 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_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.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_CXX_ARCH:AVX512 (check file: cmake/checks/cpu_avx512.cpp) Performing Test HAVE_CXX_ARCH:AVX512 - 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 Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX - 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 Searching 16 bit integer - 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 libjpeg-turbo: VERSION = 2.0.4, BUILD = opencv-4.3.0-dev-libjpeg-turbo Check size of size_t Check size of size_t - done Check size of unsigned long Check size of unsigned long - done Looking for include file intrin.h Looking for include file intrin.h - found Looking for assert.h Looking for assert.h - found Looking for fcntl.h Looking for fcntl.h - found Looking for inttypes.h Looking for inttypes.h - found Looking for io.h Looking for io.h - found Looking for limits.h Looking for limits.h - found Looking for malloc.h Looking for malloc.h - found Looking for memory.h Looking for memory.h - found Looking for search.h Looking for search.h - found Looking for string.h Looking for string.h - found Performing Test C_HAS_inline Performing Test C_HAS_inline - Success Check size of signed short Check size of signed short - done Check size of unsigned short Check size of unsigned short - done Check size of signed int Check size of signed int - done Check size of unsigned int Check size of unsigned int - done Check size of signed long Check size of signed long - done Check size of signed long long Check size of signed long long - done Check size of unsigned long long Check size of unsigned long long - done Check size of unsigned char * Check size of unsigned char * - done Check size of ptrdiff_t Check size of ptrdiff_t - done Looking for memmove Looking for memmove - not found Looking for setmode Looking for setmode - found Looking for strcasecmp Looking for strcasecmp - not found Looking for strchr Looking for strchr - found Looking for strrchr Looking for strrchr - found Looking for strstr Looking for strstr - found Looking for strtol Looking for strtol - found Looking for strtol Looking for strtol - found Looking for strtoull Looking for strtoull - found Looking for lfind Looking for lfind - found Performing Test HAVE_SNPRINTF Performing Test HAVE_SNPRINTF - Success Check if the system is big endian Searching 16 bit integer Searching 16 bit integer - Using unsigned short Check if the system is big endian - little endian Performing Test HAVE_C_STD_C99 Performing Test HAVE_C_STD_C99 - Failed Found OpenJPEG: openjp2 (found version "2.3.1") IPPICV: Download: ippicv_2020_win_intel64_20191018_general.zip found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold] at: C:/opencv_contrib/build/3rdparty/ippicv/ippicv_win/icv found Intel IPP Integration Wrappers sources: 2020.0.0 at: C:/opencv_contrib/build/3rdparty/ippicv/ippicv_win/iw Could not find OpenBLAS include. Turning OpenBLAS_FOUND off Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off Looking for sgemm_ Looking for sgemm_ - not found Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE Looking for sgemm_ Looking for sgemm_ - found Found BLAS: C:/DEV/anaconda3/Library/lib/openblas.lib Looking for cheev_ Looking for cheev_ - found A library with LAPACK API found. LAPACK(LAPACK/Generic): LAPACK_LIBRARIES: C:/DEV/anaconda3/Library/lib/openblas.lib LAPACK(LAPACK/Generic): Support is enabled. Found JNI: C:/Program Files/Java/jdk1.8.0_192/lib/jawt.lib Found VTK 9.0.20200606 (C:/Program Files (x86)/VTK/lib/cmake/vtk-9.0/vtk-use-file-error.cmake) ADE: Download: v0.1.1f.zip OpenCV Python: during development append to PYTHONPATH: C:/opencv_contrib/build/python_loader FFMPEG: Download: opencv_videoio_ffmpeg.dll FFMPEG: Download: opencv_videoio_ffmpeg_64.dll FFMPEG: Download: ffmpeg_version.cmake Looking for mfapi.h Looking for mfapi.h - found Looking for d3d11_4.h Looking for d3d11_4.h - found Allocator metrics storage type: 'long long' Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/opencv_contrib/opencv-master/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake opencv_dnn: filter out cuda4dnn source code CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:967 (include)

General configuration for OpenCV 4.3.0-dev ===================================== Version control: unknown

Platform: Timestamp: 2020-06-08T13:01:50Z Host: Windows 10.0.18363 AMD64 CMake: 3.17.2 CMake generator: Visual Studio 16 2019 CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe MSVC: 1925

CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX SSE4_1 (17 files): + SSSE3 SSE4_1 SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (31 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX512_SKX (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

C/C++: Built as dynamic libs?: YES C++ standard: 11 C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe (ver 19.25.28614.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MD /O2 /Ob2 /DNDEBUG C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MD /O2 /Ob2 /DNDEBUG C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO Linker flags (Debug): /machine:x64 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: 3rdparty dependencies:

OpenCV modules: To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python2 python3 stitching ts video videoio Disabled: world Disabled by dependency: - Unavailable: java js Applications: tests perf_tests apps Documentation: NO Non-free algorithms: NO

Windows RT support: NO

GUI: Win32 UI: YES VTK support: YES (ver 9.0.20200606)

Media I/O: ZLib: build (ver 1.2.11) JPEG: build-libjpeg-turbo (ver 2.0.4-62) WEBP: build (ver encoder: 0x020f) PNG: build (ver 1.6.37) TIFF: build (ver 42 - 4.0.10) JPEG 2000: OpenJPEG (ver 2.3.1) OpenEXR: build (ver 2.3.0) HDR: YES SUNRASTER: YES PXM: YES PFM: YES

Video I/O: DC1394: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (58.54.100) avformat: YES (58.29.100) avutil: YES (56.31.100) swscale: YES (5.5.100) avresample: YES (4.0.0) GStreamer: NO DirectShow: YES Media Foundation: YES DXVA: YES

Parallel framework: Concurrency

Trace: YES (with Intel ITT)

Other third-party libraries: Intel IPP: 2020.0.0 Gold [2020.0.0] at: C:/opencv_contrib/build/3rdparty/ippicv/ippicv_win/icv Intel IPP IW: sources (2020.0.0) at: C:/opencv_contrib/build/3rdparty/ippicv/ippicv_win/iw Lapack: YES (C:/DEV/anaconda3/Library/lib/openblas.lib) Eigen: YES (ver 3.3.7) Custom HAL: NO Protobuf: build (3.5.1)

OpenCL: YES (NVD3D11) Include path: C:/opencv_contrib/opencv-master/3rdparty/include/opencl/1.2 Link libraries: Dynamic load

Python 2: Interpreter: C:/DEV/Anaconda2/python.exe (ver 2.7.16) Libraries: C:/DEV/Anaconda2/libs/python27.lib (ver 2.7.16) numpy: C:/DEV/Anaconda2/lib/site-packages/numpy/core/include (ver 1.16.5) install path: C:/DEV/Anaconda2/Lib/site-packages/cv2/python-2.7

Python 3: Interpreter: C:/DEV/anaconda3/python.exe (ver 3.7.6) Libraries: C:/DEV/anaconda3/libs/python37.lib (ver 3.7.6) numpy: C:/DEV/anaconda3/lib/site-packages/numpy/core/include (ver 1.17.5) install path: C:/DEV/anaconda3/Lib/site-packages/cv2/python-3.7

Python (for build): C:/DEV/Anaconda2/python.exe

Java: ant: NO JNI: C:/Program Files/Java/jdk1.8.0_192/include C:/Program Files/Java/jdk1.8.0_192/include/win32 C:/Program Files/Java/jdk1.8.0_192/include Java wrappers: NO Java tests: NO

Install to: C:/opencv_contrib/build/install Configuring done