Error when implementing cross-compile the nvinfer plug-in on PC (Ubuntu 18.04, x86_64 architecture)

I tried to implement cross-compile nvinfer plug-in on PC (Ubuntu 18.04, x86_64 architecture), in order to run in Jetson NX dev kit. However, it’s failed. Below is my steps:

  1. Prepare environment on PC:
  • IDE : QT Creator 5
  • Source code: Get from folder “/opt/nvidia/deepstream/deepstream-5.0/sources” on Jetson NX kit (It’s created after installing deepstream-5.0 over SDKManager)
  • Creat Jetson’s systemroot on PC: copy 3 folders /opt, /usr and /lib from Jetson NX kit to PC
  1. Build
  • Build QT compiler base on Jetson’s systemroot
  • Add source code “deepstream-5.0/sources/gst-plugins/gst-nvinfer” to a new project on QT creator
  • Config all lib, header, include path, lib path… to mount to Jetson’s systemroot
  • Build nvinfer plug-in (file named : libnvdsgst_infer.so)
  • Push that plug-in to Jetson NX dev kit (folder “/usr/lib/aarch64-linux-gnu/gstreamer-1.0”), and run command:
    $ deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt
  1. Error log:

/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:3032: => Failed to configure VIC Target Surface

0:00:25.852328925 7271 0x341375e0 WARN nvinfer gstnvinfer.cpp:1288:convert_batch_and_push_to_input_thread:<primary_gie> error: NvBufSurfTransform failed with error -2 while converting buffer
ERROR from primary_gie: NvBufSurfTransform failed with error -2 while converting buffer
Debug info: gstnvinfer.cpp(1288): convert_batch_and_push_to_input_thread (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
Quitting
ERROR from qtdemux4: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin5/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin5/GstQTDemux:qtdemux4:
streaming stopped, reason error (-5)
ERROR from qtdemux0: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason error (-5)
ERROR from qtdemux5: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin4/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin4/GstQTDemux:qtdemux5:
streaming stopped, reason error (-5)
ERROR from qtdemux3: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin3/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin3/GstQTDemux:qtdemux3:
streaming stopped, reason error (-5)
ERROR from qtdemux2: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin1/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin1/GstQTDemux:qtdemux2:
streaming stopped, reason error (-5)
ERROR from qtdemux7: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin7/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin7/GstQTDemux:qtdemux7:
streaming stopped, reason error (-5)
ERROR from qtdemux1: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin2/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin2/GstQTDemux:qtdemux1:
streaming stopped, reason error (-5)
ERROR from qtdemux6: Internal data stream error.
Debug info: qtdemux.c(6073): gst_qtdemux_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin6/GstURIDecodeBin:src_elem/GstDecodeBin:decodebin6/GstQTDemux:qtdemux6:
streaming stopped, reason error (-5)

When building that source directly on Jetson NX kit, it ran successfully (using provided Makefile script).
Can any one help me to solve this problem?

1 Like