File size: 8,059 Bytes
5aefcf4
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
Ticket Name: Linux/TDA2: how to add a algplugin use opencv?

Query Text:
Part Number: TDA2 Tool/software: Linux when i write a algplugin use opencv on a15 (linux ), complie is ok ,but linking is error . i don't know why ??  the example i refered is opencvcanny # apps: tda2px-evm: Creating archive apps.a # apps: tda2px-evm: Compiling chains_vipSingleCamOpenCVOpenCLDilationSgxDisplay.c # apps: tda2px-evm: Compiling chains_vipSingleCamOpenCVOpenCLDilationSgxDisplay_priv.c # apps: tda2px-evm: Creating archive apps.a # apps: tda2px-evm: Compiling opencvOpenCLDilationAlgo.c # apps: tda2px-evm: Compiling opencvOpenCLDilationLink_algPlugin.c # apps: tda2px-evm: Compiling openclDilation.cpp # apps: tda2px-evm: Creating archive apps.a # apps: tda2px-evm: Linking /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `int cv::ocl::getStringInfo<int (*)(_cl_device_id*, unsigned int, unsigned int, void*, unsigned int*), _cl_device_id*>(int (*)(_cl_device_id*, unsigned int, unsigned int, void*, unsigned int*), _cl_device_id*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .constprop.320]': ocl.cpp:(.text._ZN2cv3ocl13getStringInfoIPFiP13_cl_device_idjjPvPjES3_EEiT_T0_jRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.constprop.320[_ZN2cv3ocl7Context4Impl10setDefaultEv]+0x26): undefined reference to `clGetPlatformInfo' ocl.cpp:(.text._ZN2cv3ocl13getStringInfoIPFiP13_cl_device_idjjPvPjES3_EEiT_T0_jRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.constprop.320[_ZN2cv3ocl7Context4Impl10setDefaultEv]+0x5e): undefined reference to `clGetPlatformInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::OpenCLBufferPoolBaseImpl<cv::ocl::OpenCLBufferPoolImpl, cv::ocl::CLBufferEntry, _cl_mem*>::freeAllReservedBuffers()': ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE22freeAllReservedBuffersEv[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE22freeAllReservedBuffersEv]+0x4a): undefined reference to `clReleaseMemObject' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::OpenCLBufferPoolBaseImpl<cv::ocl::OpenCLBufferPoolImpl, cv::ocl::CLBufferEntry, _cl_mem*>::setMaxReservedSize(unsigned int)': ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE18setMaxReservedSizeEj[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE18setMaxReservedSizeEj]+0x80): undefined reference to `clReleaseMemObject' ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE18setMaxReservedSizeEj[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE18setMaxReservedSizeEj]+0x18e): undefined reference to `clReleaseMemObject' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::OpenCLBufferPoolBaseImpl<cv::ocl::OpenCLBufferPoolImpl, cv::ocl::CLBufferEntry, _cl_mem*>::~OpenCLBufferPoolBaseImpl()': ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memED2Ev[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memED5Ev]+0x5a): undefined reference to `clReleaseMemObject' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::Device::Impl::getStrProp(unsigned int) const [clone .isra.50]': ocl.cpp:(.text._ZNK2cv3ocl6Device4Impl10getStrPropEj.isra.50+0x2c): undefined reference to `clGetDeviceInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::PlatformInfo::Impl::getStrProp(unsigned int) const [clone .isra.55]': ocl.cpp:(.text._ZNK2cv3ocl12PlatformInfo4Impl10getStrPropEj.isra.55+0x2c): undefined reference to `clGetPlatformInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::OpenCLBufferPoolBaseImpl<cv::ocl::OpenCLBufferPoolImpl, cv::ocl::CLBufferEntry, _cl_mem*>::release(_cl_mem*)': ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE7releaseES5_[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE7releaseES5_]+0x68): undefined reference to `clReleaseMemObject' ocl.cpp:(.text._ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE7releaseES5_[_ZN2cv3ocl24OpenCLBufferPoolBaseImplINS0_20OpenCLBufferPoolImplENS0_13CLBufferEntryEP7_cl_memE7releaseES5_]+0x106): undefined reference to `clReleaseMemObject' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::get_platform_name(_cl_platform_id*, cv::String&) [clone .constprop.314]': ocl.cpp:(.text._ZN2cv3oclL17get_platform_nameEP15_cl_platform_idRNS_6StringE.constprop.314+0x2a): undefined reference to `clGetPlatformInfo' ocl.cpp:(.text._ZN2cv3oclL17get_platform_nameEP15_cl_platform_idRNS_6StringE.constprop.314+0x58): undefined reference to `clGetPlatformInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::haveOpenCL()': ocl.cpp:(.text._ZN2cv3ocl10haveOpenCLEv+0x20): undefined reference to `clGetPlatformIDs' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::Platform::Impl::init()': ocl.cpp:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0x26): undefined reference to `clGetPlatformIDs' ocl.cpp:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0x50): undefined reference to `clGetPlatformInfo' ocl.cpp:(.text._ZN2cv3ocl8Platform4Impl4initEv[_ZN2cv3ocl8Platform4Impl4initEv]+0xa8): undefined reference to `clGetPlatformInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::Device::set(void*)': ocl.cpp:(.text._ZN2cv3ocl6Device3setEPv+0x11e): undefined reference to `clGetDeviceInfo' ocl.cpp:(.text._ZN2cv3ocl6Device3setEPv+0x14c): undefined reference to `clGetDeviceInfo' ocl.cpp:(.text._ZN2cv3ocl6Device3setEPv+0x17c): undefined reference to `clGetDeviceInfo' ocl.cpp:(.text._ZN2cv3ocl6Device3setEPv+0x1aa): undefined reference to `clGetDeviceInfo' ocl.cpp:(.text._ZN2cv3ocl6Device3setEPv+0x1e2): undefined reference to `clGetDeviceInfo' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o):ocl.cpp:(.text._ZNK2cv3ocl6Device11addressBitsEv+0x22): more undefined references to `clGetDeviceInfo' follow /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core.a(ocl.cpp.o): In function `cv::ocl::Queue::operator=(cv::ocl::Queue const&)': ocl.cpp:(.text._ZN2cv3ocl5QueueaSERKS1_+0x64): undefined reference to `clFinish' ocl.cpp:(.text._ZN2cv3ocl5QueueaSERKS1_+0x6a): undefined reference to `clReleaseCommandQueue' /home/disk4/install_dir/ti_components/open_compute/opencv/opencv-3.1.0/libs_linux/libopencv_core

Responses:
Hi What is the vision SDK version you use? Which OS on A15, Linux or Bios? regards, Shiju

visionsdk version is 3.3 , run linux on A15

I could see a lot of undefined reference to some symbols, i guess these are from your new Algorithms, Please include the Alg lib in \vision_sdk\apps\MAKEFILE.MK See how other OPENVX_A15_LIBS are included as reference Another option is to compile your files along with Alg plug-in files regards, Shiju