Open wickeat opened 5 years ago
I would be helpful to see "raw" error messages (at least other users can find this issue for the similar problems).
Try to build without G-API module: cmake -DBUILD_opencv_gapi=OFF ...
A few examples of the error messages are as follow:
51>C:\opencvMaster\modules\gapi\perf\internal\gapi_compiler_perf_tests.cpp(26): error C2039: 'split3': is not a member of 'cv::gapi'
51>C:\opencvMaster\modules\gapi\include\opencv2/gapi/gkernel.hpp(296): note: see declaration of 'cv::gapi'
51>C:\opencvMaster\modules\gapi\perf\internal\gapi_compiler_perf_tests.cpp(26): error C3861: 'split3': identifier not found
51>C:\opencvMaster\modules\gapi\perf\internal\gapi_compiler_perf_tests.cpp(27): error C2039: 'addC': is not a member of 'cv::gapi'
51>C:\opencvMaster\modules\gapi\include\opencv2/gapi/gkernel.hpp(296): note: see declaration of 'cv::gapi'
51>C:\opencvMaster\modules\gapi\perf\internal\gapi_compiler_perf_tests.cpp(27): error C2672: 'std::get': no matching overloaded function found
51>C:\opencvMaster\modules\gapi\perf\internal\gapi_compiler_perf_tests.cpp(27): error C2784: 'tuple_element<_Index,_Tuple>::type &std::get(std::pair<_Ty1,_Ty2> &) noexcept': could not deduce template argument for 'std::pair<_Ty1,_Ty2> &' from 'unknown-type'
51> with
51> [
51> _Tuple=std::pair<_Ty1,_Ty2>
51> ]
Since the errors are all stemming from the G-API module, building OpenCV without it had been a success. I have also tried an alternative of building it without BUILD_PERF_TESTS and BUILD_TESTS checked (since I don't require it for my application), the Debug build was successful but the Release build has given me this error:
19>CUSTOMBUILD : nvcc error : 'cicc' died with status 0xC0000005 (ACCESS_VIOLATION)
19>CMake Error at cuda_compile_1_generated_bilateral_filter.cu.obj.Release.cmake:279 (message):
19> Error generating file
19> C:/opencvMaster/build_noTest/modules/world/CMakeFiles/cuda_compile_1.dir/__/__/__/opencv_contrib/modules/cudaimgproc/src/cuda/Release/cuda_compile_1_generated_bilateral_filter.cu.obj
19>Done building project "opencv_world.vcxproj" -- FAILED.
Subsequent errors in the build are a result of that error:
20>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
20>Done building project "opencv_version.vcxproj" -- FAILED.
23>LINK : fatal error LNK1181: cannot open input file '..\..\..\..\lib\Release\opencv_world410.lib'
23>Done building project "opencv_waldboost_detector.vcxproj" -- FAILED.
24>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
24>Done building project "opencv_annotation.vcxproj" -- FAILED.
21>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
21>Done building project "opencv_version_win32.vcxproj" -- FAILED.
26>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
26>Done building project "opencv_interactive-calibration.vcxproj" -- FAILED.
25>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
25>Done building project "opencv_img_hash.vcxproj" -- FAILED.
22>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_world410.lib'
22>Done building project "opencv_visualisation.vcxproj" -- FAILED.
29>CMake Error at apps/annotation/cmake_install.cmake:39 (file):
29> file INSTALL cannot find
29> "C:/opencvMaster/build_noTest/bin/Release/opencv_annotation.exe".
Any idea what went wrong?
I had the same issue and roughly the same build setup. I found downloading the matching release of opencv_contrib https://github.com/opencv/opencv_contrib/releases and then setting OPENCV_EXTRA_MODULES_PATH
to my path:
OPENCV_EXTRA_MODULES_PATH: D:/Downloads/opencv_contrib-4.1.0/opencv_contrib-4.1.0/modules
Resolved the error
OPENCV_EXTRA_MODULES_PATH: D:/Downloads/opencv_contrib-4.1.0/opencv_contrib-4.1.0/modules
This helped me in solving a CUDA build error with FATAL_ERROR "CUDA: OpenCV requires enabled 'cudev' module from 'opencv_contrib' repository: https://github.com/opencv/opencv_contrib"
Thanx 💃
@KwangEun @haxiomic I did exactly that and the error still persists. Any ideas how to resolve it?
@Totemi1324 After many hours of trying to compile OpenCV 4.x with MediaPipe, I managed to integrate and compile MediaPipe without any errors. I've documented all the steps I took in this tutorial.
I hope this tutorial will be useful to others.
@Totemi1324 After many hours of trying to compile OpenCV 4.x with MediaPipe, I managed to integrate and compile MediaPipe without any errors. I've documented all the steps I took in this tutorial.
As @haxiomic said this is because @Totemi1324 didn't include the path to the OpenCV contrib repo correctly.
System information (version)
Detailed description
I am trying to build OpenCV master (4.1.0-pre) with CUDA and world module. The configuration with CMake is given below.
General configuration for OpenCV 4.1.0-pre
` However, upon trying to build the project in Visual Studio 2017, I encounter the over 400 errors, all relating to the opencv_perf_gapi or opencv_test_gapi projects.
Is it not possible to build OpenCV with CUDA enabled and have a world module generated in the current version of OpenCV?