So, here I am having searched scores of blog and guides and still can’t figure this problem out. I am trying(!) to build OpenCV 4.5.3 from sources with contrib modules on Windows. The Java wrapper including BUILD_FAT_JAVA works fine, world and SHARED_LIB are untoggled and CMake goes through all that just fine.
I tried building this in two ways: by Visual Studio 2019 (building Debug and Release of ALL_BUILD and INSTALLATION) and by CMake on the console. Both work fine too. I find plenty of opencv_java453.dlls too but what I am missing is any opencv-453.jar.
Below you will find the output of my CMake and if any of you has new information or notices a mistake please tell me. I am at my wits end.
Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
Detected processor: AMD64
libjpeg-turbo: VERSION = 2.1.0, BUILD = opencv-4.5.3-libjpeg-turbo
Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
OpenJPEG: VERSION = 2.4.0, BUILD = opencv-4.5.3-openjp2-2.4.0
OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
at: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/3rdparty/ippicv/ippicv_win/icv
found Intel IPP Integration Wrappers sources: 2020.0.0
at: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/3rdparty/ippicv/ippicv_win/iw
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)
Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
Reason given by package: LAPACK could not be found because dependency BLAS could not be found.
Found apache ant: D:/Programme/Studium/ant/apache-ant-1.10.12/bin/ant.bat ()
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/python_loader
Checking for module 'gstreamer-base-1.0'
Can't find gstreamer-base-1.0.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Checking for module 'gstreamer-app-1.0'
Can't find gstreamer-app-1.0.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Checking for module 'gstreamer-riff-1.0'
Can't find gstreamer-riff-1.0.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Checking for module 'gstreamer-pbutils-1.0'
Can't find gstreamer-pbutils-1.0.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Checking for module 'gstreamer-video-1.0'
Can't find gstreamer-video-1.0.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Checking for module 'libdc1394-2'
Can't find libdc1394-2.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Module opencv_alphamat disabled because the following dependencies are not found: Eigen
CMake Warning at D:/Unzipped Stuff/opencv-4.5.3/cmake/OpenCVUtils.cmake:884 (message):
ocv_check_modules(HARFBUZZ): can't find library 'harfbuzz'. Specify
'pkgcfg_lib_HARFBUZZ_harfbuzz' manually
Call Stack (most recent call first):
D:/Unzipped Stuff/opencv-4.5.1/contribute/opencv_contrib/modules/freetype/CMakeLists.txt:7 (ocv_check_modules)
freetype2: YES (ver 23.0.17)
harfbuzz: YES (ver 2.3.1)
Julia not found. Not compiling Julia Bindings.
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
Checking for module 'tesseract'
Can't find tesseract.pc in any of D:/Programme/Studium/Perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Tesseract: NO
Module opencv_python3 disabled because opencv_python_bindings_generator dependency can't be resolved!
Allocator metrics storage type: 'long long'
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': D:/Unzipped Stuff/opencv-4.5.3/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
CMake Warning at D:/Unzipped Stuff/opencv-4.5.3/cmake/OpenCVUtils.cmake:884 (message):
ocv_check_modules(HARFBUZZ): can't find library 'harfbuzz'. Specify
'pkgcfg_lib_HARFBUZZ_harfbuzz' manually
Call Stack (most recent call first):
D:/Unzipped Stuff/opencv-4.5.1/contribute/opencv_contrib/modules/freetype/CMakeLists.txt:7 (ocv_check_modules)
highgui: using builtin backend: QT5
rgbd: Eigen support is disabled. Eigen is Required for Posegraph optimization
General configuration for OpenCV 4.5.3 =====================================
Version control: unknown
Extra modules:
Location (extra): D:/Unzipped Stuff/opencv-4.5.1/contribute/opencv_contrib/modules
Version control (extra): 4.5.4-23-g3db7682c
Platform:
Timestamp: 2021-10-28T11:13:29Z
Host: Windows 10.0.19042 AMD64
CMake: 3.19.4
CMake generator: Visual Studio 16 2019
CMake build tool: D:/Programme/Studium/VisualStudio/MSBuild/Current/Bin/MSBuild.exe
MSVC: 1928
Configuration: Debug Release
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 (15 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (29 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (4 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
C/C++:
Built as dynamic libs?: NO
C++ standard: 11
C++ Compiler: D:/Programme/Studium/VisualStudio/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe (ver 19.28.29335.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 /MT /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 /MTd /Zi /Ob0 /Od /RTC1
C Compiler: D:/Programme/Studium/VisualStudio/VC/Tools/MSVC/14.28.29333/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 /MT /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 /MTd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib
Linker flags (Debug): /machine:x64 /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib
ccache: NO
Precompiled headers: YES
Extra dependencies: wsock32 comctl32 gdi32 ole32 setupapi ws2_32 Qt5::Test Qt5::Concurrent Qt5::Core Qt5::Gui Qt5::Widgets D:/Programme/Studium/Anaconda/Library/lib/freetype.lib harfbuzz D:/Programme/Studium/Anaconda/Library/lib/hdf5.lib
3rdparty dependencies: libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib quirc ippiw ippicv
OpenCV modules:
To be built: aruco barcode bgsegm bioinspired calib3d ccalib core cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform java line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
Disabled: python_bindings_generator python_tests wechat_qrcode world
Disabled by dependency: python3
Unavailable: alphamat cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev julia matlab ovis python2 sfm viz
Applications: apps
Documentation: NO
Non-free algorithms: NO
Windows RT support: NO
GUI:
QT: YES (ver 5.9.7)
QT OpenGL support: NO
Win32 UI: YES
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 2.1.0-62)
WEBP: build (ver encoder: 0x020f)
PNG: build (ver 1.6.37)
TIFF: build (ver 42 - 4.2.0)
JPEG 2000: build (ver 2.4.0)
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.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.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: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/3rdparty/ippicv/ippicv_win/icv
Intel IPP IW: sources (2020.0.0)
at: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/3rdparty/ippicv/ippicv_win/iw
Lapack: NO
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)
OpenCL: YES (NVD3D11)
Include path: D:/Unzipped Stuff/opencv-4.5.3/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python 3:
Interpreter: D:/Programme/Studium/Anaconda/python.exe (ver 3.9.1)
Libraries: NO
numpy: D:/Programme/Studium/Anaconda/Lib/site-packages/numpy/core/include (ver )
install path: -
Python (for build): D:/Programme/Studium/Anaconda/python.exe
Java: export all functions
ant: D:/Programme/Studium/ant/apache-ant-1.10.12/bin/ant.bat (ver )
JNI: C:/Program Files/AdoptOpenJDK/jdk-11.0.10.9-hotspot/include C:/Program Files/AdoptOpenJDK/jdk-11.0.10.9-hotspot/include/win32 C:/Program Files/AdoptOpenJDK/jdk-11.0.10.9-hotspot/include
Java wrappers: YES
Java tests: NO
Install to: D:/Programme/Studium/User Interfaces/OpenCV-4.5.3-build/install