All,
I am attempting to compile OpenCV with OpenCL support for my iMX6Q board. I had some compiler issues earlier which I resolved by manually dropping the optimization level for one file. However, now I am having linking trouble due to undefined references in the libOpenCL.so and I am at a loss.
A "readelf -s /usr/lib/libOpenCL.so" shows many undefined symbols. This libOpenCL.so came with my system and I did not install it. I am confused as to where I have made a mistake. I installed the packages that came with the board (some packages were ignored as they seemed to have been replaced by newer versions.)
Linking CXX executable ../../bin/opencv_perf_ocl
/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../../lib/libOpenCL.so: undefined reference to `gcoOS_CloseThread'
/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../../lib/libOpenCL.so: undefined reference to `gcoOS_AtomIncrement'
... and so on
Solved! Go to Solution.
As far as I know OpenCV only uses FULL profile CL backend, unfortunately, you can see more information here: OpenCL Module Introduction — OpenCV 2.4.4.0 documentation
It appears that the OpenCL definition file is missing the libGAL reference. To add that, edit:
opencv-2.4.5/cmake/OpenCVDetectOpenCL.cmake
And add in the list(APPEND line after the set(OPENCL_LIBRARIES line shown below.
set(OPENCL_LIBRARIES | ${OPENCL_LIBRARY}) |
list(APPEND OPENCL_LIBRARIES | "GAL") |
Hi Michael, have you succeeded to use opencv with opencl support?
You can set it to built in OpenCV but as I said, OpenCV is CUDA not Vivante Embedded CL profile. You will only be able to run it in your PC.
regards,
Andre
which bsp are you using ? the CL libs should be there as far you have selected the vivante´s gpu driver in ltib package list.
Okay, I realized that OpenCV wasn't linking libGAL.so and updated the generated files. Does anyone know if an OpenCV with OpenCL w/ ARM support exists in any repositories? (Something like the opencv with cuda for ARM for the CARMA dev board). Thanks!
may i know how you solve the libOpenCL.so: undefined symbol: gcoOS_AtomConstruct issue?
Hi Kim, it is not supported by our current profile. OpenCV´s CL support is CUDA based, while we do only the Embedded Profile.
regards,
Andre
As far as I know OpenCV only uses FULL profile CL backend, unfortunately, you can see more information here: OpenCL Module Introduction — OpenCV 2.4.4.0 documentation
Andre, this release from Vivante seems to imply that opencl full profile 1.2 is supported. Is that not the case?
Hi Todd,
I believe this will be applied for the next Vivante´s gpu generation, for i.MX6 it is not valid.
regards,
Andre
Yes, it seems that upon running the tests, I ran into quite a few problems! I will attempt to implement some OpenCL functions myself, thank you for the helpful link.
Did you ever get opencv's ocl module working with the iMX6Q?