Ask Your Question

Revision history [back]

Error building openCV - dumpOpenCLDevice() method error

I have been trying to build opencv for over a week now using the instructions at

http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html and http://miloq.blogspot.com/2012/12/install-opencv-ubuntu-linux.html however every time I get to the 'make' step, I get an error:

In file included from /home/sello/opencv-2.4.9/modules/nonfree/perf/perf_main.cpp:28:0:
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp: In function ‘void dumpOpenCLDevice()’:
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:88:9: error: ‘PlatformsInfo’ is not a member of ‘cv::ocl’
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:88:32: error: expected ‘;’ before ‘platforms’
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:89:9: error: ‘getOpenCLPlatforms’ is not a member of ‘cv::ocl’
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:89:37: error: ‘platforms’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:95:19: error: ‘DevicesInfo’ in namespace ‘cv::ocl’ does not name a type
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:96:39: error: ‘devices’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:98:23: error: ‘DeviceInfo’ in namespace ‘cv::ocl’ does not name a type
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:99:33: error: ‘current_device’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:99:62: error: ‘CVCL_DEVICE_TYPE_CPU’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:100:71: error: ‘CVCL_DEVICE_TYPE_GPU’ was not declared in this scope
In file included from /home/sello/opencv-2.4.9/modules/nonfree/perf/perf_main.cpp:28:0:
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:108:15: error: ‘DeviceInfo’ in namespace ‘cv::ocl’ does not name a type
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:110:9: error: ‘deviceInfo’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:111:9: error: ‘deviceInfo’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:113:25: error: ‘deviceInfo’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:113:50: error: ‘CVCL_DEVICE_TYPE_CPU’ was not declared in this scope
/home/sello/opencv-2.4.9/modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp:114:61: error: ‘CVCL_DEVICE_TYPE_GPU’ was not declared in this scope
make[2]: *** [modules/nonfree/CMakeFiles/opencv_perf_nonfree.dir/perf/perf_main.cpp.o] Error 1
make[1]: *** [modules/nonfree/CMakeFiles/opencv_perf_nonfree.dir/all] Error 2
make: *** [all] Error 2

The process works well for a while and then stops at 79% with the above error. I thought the problem might be caused by the fact that I did not have the OpenCL library installed. I installed it as shown at www.amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/07/AMD_APP_SDK_Installation_Notes.pdf and still no luck. I am running ubuntu 12.04 and OpenCV 2.4.9. The installed version of AMD APP SDK is 2.8.1.0. Please help. I am at my wits end here.