After several attempts to compile the latest unstable release of OPENCV from git source, it finally works, but you need to do a couple of tweeks to get it to work.
Fix #1: As mentioned by Vladislav Vinogradov on http://code.opencv.org/issues/3135
setting CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE cmake variable to off gets rid of those cuda compile related errors.
Fix #2:
"OPENCV_ROOT"\modules\gpuarithm\test\test_element_operations.cpp
You need to add #include <functional> as without it you will get compile errors like this:
error: std::greater is an undeclared variable.
Note: Following is the CMAKE param check list I used to successfully compile
Ungrouped Entries |
BUILD options: Uncheck BUILD_DOCS and BUILD_EXAMPLES |
CUDA OPTIONS: Uncheck CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE and take note of other red boxes |
WITH OPTIONS: Add WITH_CUBLAS, WITH_OPENGL, WITH_TBB |
In the end you should have only one error for debug mode and none under release mode compile.
As usual run INSTALL under CMakeTargets to put libs and include files in one convenient area. (Make sure you compile both debug and release before running this)
Thanks for sharing your successful experience. I have a questionL
ReplyDeleteHow do you set CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE cmake variable to off for getting rid of those cuda compile related errors?
HI T Tariq,
ReplyDeleteI hope you resolved the issue. If you haven't already, try checking to see if you have advanced mode enabled in cmake. You should then see the option to deselect CUDA_ATTACH_VS_BUILD_RULE_TOCUDA_FILE in the CUDA grouped options.