This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TDA2: Linking Error. the usecase with a OpenCV alg_plugin

Part Number: TDA2

Tool/software: Linux

Hi, all

Refer to vip_single_cam_opencvcanny_sgx_display,  I write a usecase with a OpenCV alg_plugin.

I got some error in Linking. it looks like something invoked opencl, but I do not enable opencl in cfg.mk.

how can I locate the problem?

best regards,

John

-----------------------------------------------------------------

cfg.mk

#
# Enable below macro to enable OPENVX into Vision SDK
#
OPENVX_INCLUDE=yes

CIO_REDIRECT=yes

HS_DEVICE=no

DEFAULT_UBOOT_CONFIG  := dra7xx_evm_vision_config
DEFAULT_KERNEL_CONFIG := omap2plus_defconfig
# For TDA2x
DEFAULT_DTB := dra7-evm-infoadas.dtb

# add by John
# Enable macro for OpenCV
ENABLE_OPENCV=yes
CMEM_INCLUDE=yes
BUILD_OPENCV_SRC=no

BUILD_LLVM=no

-----------------------------------------------------------------

Err info:

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'
/opt/proj/e0800/apa_r04/bsw/platform/ti/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'

  • Hi John,
    Could you please share some more details like which release version of SDK you are using ?
    Also to build Linux opencv app, refer tda2xx_evm_linux_opencx config (all required configs are already enabled)

    Regards
    Suryamani Jena
  • Hi Suryamani,
    Thanks, The version of SDK is PROCESSOR_SDK_VISION_03_00_00_00.
    The config refer to tda2xx_evm_linux_all. and I tried tda2xx_evm_linux_opencx.

    Regards,
    John
  • Hi Suryamani,
    another question, there are some info about IPU2( in cfg.mk)
    "IPU1 (core 0 & 1 are) not supported when IPU_PRIMARY_CORE=ipu2"
    Is that meaning ,if IPU_PRIMARY_CORE= ipu2,
    PROC_IPU1_0_INCLUDE=yes is conflict with PROC_IPU2_INCLUDE=yes?
    But in the srv usecase(Linux), IPU1_0 is used to capture and display.
    Why?

    Regards,
    John
  • Hi John
    we have used only on IPU subsystem when Linux is running on A15. it can be either IPU1 (with IPU1-0 & IPu1-1) or IPU2 (with IPU2-0 & IPu2-1) in SMP mode.
    when you select IPU_PRIMARY_CORE= ipu2, all capture, display etc. are run on IPU2. This mapping from IPU1 to IPU2 is done inside VSDK

    regards, Shiju