- on jetson orin
- deepstream6.2
I changed the Makefile file in the code of the gst-dsexample plugin case to cmakelist.txt and it compiles without any problems, I put the generated so library in the deepstream directory under . /lib/plugin.
When I run the opencv-test case I get the error.
deepstream-opencv-test:13075): GStreamer-WARNING **: 17:08:15.243: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
Decodebin child added: faad0
Decodebin child added: nvv4l2decoder0
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
In cb_newpad
In cb_newpad
Segmentation fault (core dumped)
But using the Makefile file to compile the gst-dsexample there is no problem, can you help me? Here is my cmakelist.txt code
cmake_minimum_required(VERSION 3.18)
project(gst-dsexample)
#set(CMAKE_CXX_STANDARD 14)
set(GStreamer_DIR "/usr/include/gstreamer-1.0/gst")
add_compile_definitions(WITH_OPENCV=1)
find_package(PkgConfig REQUIRED COMPONENTS base video)
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
cv_bridge
rospy
std_msgs
message_generation
image_transport
camera_info_manager
)
find_package(OpenCV REQUIRED)
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.8)
set(ENV{PKG_CONFIG_PATH})
include_directories("${GST_INCLUDE_DIRS}")
include_directories(/usr/include/gstreamer-1.0/gst)
include_directories(/usr/local/cuda-11.4/include)
include_directories(/usr/include/gstreamer-1.0/gst/base)
include_directories(/usr/include/gstreamer-1.0/gst/video)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
include_directories("${OpenCV_INCLUDE_DIRS}")
link_libraries(${GST_LIBRARIES})
include_directories(/opt/nvidia/deepstream/deepstream-6.2/sources/includes)
link_directories(/opt/nvidia/deepstream/deepstream-6.2/lib/gst-plugins/)
link_directories(/opt/nvidia/deepstream/deepstream-6.2/lib/)
link_directories(/usr/local/cuda-11.4/lib64/)
link_directories(./dsexample_lib/)
link_directories(/usr/lib/aarch64-linux-gnu)
add_library(nvdsgst_dsexample SHARED gstdsexample.cpp gstdsexample.h)
target_link_libraries(nvdsgst_dsexample ${GST1_LIBRARIES})
set_target_properties(nvdsgst_dsexample PROPERTIES
CUDA_SEPARABLE_COMPILATION ON)
target_include_directories(nvdsgst_dsexample PRIVATE ${GST1_INCLUDE_DIRS})
target_link_libraries(nvdsgst_dsexample libdsexample.a)
target_link_libraries(nvdsgst_dsexample libcudart.so)
target_link_libraries(nvdsgst_dsexample libnppc.so libnppig.so libnppicc.so libnppidei.so)
target_link_libraries(nvdsgst_dsexample libnvdsgst_helper.so libnvdsgst_meta.so libnvbufsurface.so libnvbufsurftransform.so libgstvideo-1.0.so)
target_link_libraries(nvdsgst_dsexample
${catkin_LIBRARIES}
${OpenCV_LIBS}
)