Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
all of the above
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
7.1 i think
• NVIDIA GPU Driver Version (valid for GPU only)
Hey, so I’m making a plugin package for deepstream with an element to work with nvosd to do social distancing. Everything compiles - no errors or warning, but the darned plugin won’t find the shared libraries needed at runtime since they’re not in LD_LIBRARY_PATH.
[mdegans@konjin] -- [~/Projects/gst-cuda-plugin/build] $ gst-inspect-1.0 /usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcudaplugin.so (gst-inspect-1.0:820): GStreamer-WARNING **: 22:35:00.748: Failed to load plugin '/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcudaplugin.so': libnvdsgst_meta.so: cannot open shared object file: No such file or directory Could not load plugin file: Opening module failed: libnvdsgst_meta.so: cannot open shared object file: No such file or directory [mdegans@konjin] -- [~/Projects/gst-cuda-plugin/build] $ LD_LIBRARY_PATH=/opt/nvidia/deepstream/deepstream/lib/ gst-inspect-1.0 /usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcudaplugin.so Plugin Details: Name cudaplugin Description CUDA Plugin collection for GStreamer and DeepStream. Filename /usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcudaplugin.so Version 0.1 License LGPL Source module gstcudaplugin Binary package gstcudaplugin-1.0 Origin URL https://github.com/mdegans/gst-cuda-plugin cudafilter: CUDA Filter element cudahash: CUDA Image hashing element dsdistance: DeepStream social distancing element 3 features: +-- 3 elements
My C/C++ is pretty basic but my understanding is that this is becuase i’m making a shared library and it can’t find the linked one at runtime.
I tried adding this manually by adding it to a linker flags option:
but my build system is adding a second -rpath that breaks this. I get
/bin/sh: 1: nvcc: not found when I try as a result.
Are there any suggested solutions. I tried a static library option and i get
not found by nvcc as well. Could this be related to the non-standard paths DeepStream uses?
Googling around a bit the attitude I find on threads where this happens is that if, say, libfoo.so can’t be found, libfoo isn’t packaged properly to begin with. It’s unhelpful, so I’m hoping I can find a solution here.
also, static linking is out since it, too, will fail with
not found. Any help would be much appreciated.
Edit: oddly, this worked in DS 4.0 since I have tests that ran before but now fail like:
--- command --- 23:59:36 GST_DEBUG='5' GST_PLUGIN_PATH='/home/mdegans/Projects/gst-cuda-plugin/build/gst-cuda-plugin/test/../' GST_REGISTRY_UPDATE='yes' /home/mdegans/Projects/gst-cuda-plugin/build/meson-out/test_gstcudahash --- stderr --- /home/mdegans/Projects/gst-cuda-plugin/build/meson-out/test_gstcudahash: error while loading shared libraries: libnvdsgst_meta.so: cannot open shared object file: No such file or directory ------- ...
Also have a test Dockerfile that won’t build but did before (it runs the tests at the build stage). Same cause.