Why failed to open libnvds_nvdcf.so ?

I have double-checked my directory. I’m 100% sure my directory path is correct.
However, when using ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so, It working correctly as well as libnvds_mot_iou.so.

more information

pc@pcde:/opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5$ ./deepstream-test5-app -c configs/test5_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt -p 1 -m 2 --gst-debug=2
Creating LL OSD context new
0:00:00.423986651 32226 0x55b8597d0920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 13]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:01.515100876 32226 0x55b8597d0920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_1> NvDsInferContext[UID 12]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:01.548588710 32226 0x55b8597d0920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_0> NvDsInferContext[UID 11]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
gstnvtracker: Failed to open low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
 dlopen error: libcufft.so.10: cannot open shared object file: No such file or directory
gstnvtracker: Failed to initilaize low level lib.
0:00:01.554404996 32226 0x55b8597d0920 ERROR              nvtracker gstnvtracker.cpp:232:gst_nv_tracker_start: gstnvtracker: Failed to initialize trackerIface

0:00:01.554420506 32226 0x55b8597d0920 WARN                GST_PADS gstpad.c:1149:gst_pad_set_active:<tracking_tracker:sink> Failed to activate pad
** ERROR: <main:1358>: Failed to set pipeline to PAUSED
Quitting
App run failed
Segmentation fault (core dumped)

configuration

[tracker]
enable=1
tracker-width=600
tracker-height=300
#ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so
#ll-config-file required for DCF/IOU only
# mot_iou
#ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_iou.so
#ll-config-file=/opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5/configs/iou_config.txt
# libnvds_nvdcf
ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
ll-config-file=/opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5/configs/tracker_config.yml
gpu-id=0
#enable-batch-process applicable to DCF only
enable-batch-process=1

Per the error log, could you confirm if the file /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so exist and its permission.

I checked /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so is exist and its permission is

$ ls -la  /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so 
-rwxrwxrwx 1 root root 4337704 Nov  11 16:51 /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so

@JiAcc, could you try running the app with sudo?
Are you sure visionworks is installed?

Could you explain more about visionworks? Where I can find it?
I try to run the app with sudo and the result is

maxdevpc@maxdevpc:~$ sudo -i
[sudo] password for pc: 
root@pc:~# cd /opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5
root@pc:/opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5# ./deepstream-test5-app -c configs/test5_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt -p 1 -m 2 --gst-debug=2

(gst-plugin-scanner:11579): GStreamer-WARNING **: 23:03:52.692: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_jpegdec.so': libnvjpeg.so.10: cannot open shared object file: No such file or directory
max max max max max max max max max max
Creating LL OSD context new
0:00:01.055897142 11578 0x55ce44f83060 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 13]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:02.116872570 11578 0x55ce44f83060 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_1> NvDsInferContext[UID 12]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:02.149898274 11578 0x55ce44f83060 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_0> NvDsInferContext[UID 11]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
gstnvtracker: Failed to open low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
 dlopen error: libcufft.so.10: cannot open shared object file: No such file or directory
gstnvtracker: Failed to initilaize low level lib.
0:00:02.154666138 11578 0x55ce44f83060 ERROR              nvtracker gstnvtracker.cpp:232:gst_nv_tracker_start: gstnvtracker: Failed to initialize trackerIface

0:00:02.154677618 11578 0x55ce44f83060 WARN                GST_PADS gstpad.c:1149:gst_pad_set_active:<tracking_tracker:sink> Failed to activate pad
** ERROR: <main:1359>: Failed to set pipeline to PAUSED
root@pc:/opt/nvidia/deepstream/deepstream-4.0/sources/apps/sample_apps/deepstream-test5#

It’s weird,could you open any other low level tracker lib, maybe you can write a simple demo which just use dlopen to open the low level lib to see if it can access the lib. I think it’s likely a env setup issue, you can refer https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html

I try with other low-level tracker libs (klt and iou). They are works.

Ok, then I suggest to download the nvdcf lib and replace your local nvdcf lib.

How I can find dcf lib, could you give me link?

See here https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html

I try to find dcf lib in https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html but there is no dcf lib. Could you specify where to find dcf lib in that link?

You need to use sdkmanager, pls follow the jeston setup.

You mean the file in deepstream_sdk_v4.0.1_x86_64.tbz2 --> binaries.tbz2 --> libnvds_nvdcf.so right?
If this file, I copy and replace the old one with this new one. Then, I try to run the app, the error is the same.

Which platform are u using? And could you remove the gstreamer cache?

I using DeepStream 4.0.1 for T4 and V100 but I ran the app with RTX 2080 TI.

And could you remove the gstreamer cache when you replace the lib? rm ${HOME}/.cache/gstreamer-1.0/registry.aarch64.bin

after removing cache,

~/.cache/gstreamer-1.0$ ls -al
total 8
drwxrwxr-x  2 pc pc 4096 Nov  26 16:11 .
drwx------ 34 pc pc 4096 Nov  26 15:27 ..
./deepstream-test5-app -c configs/test5_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt -p 1 -m 2 --gst-debug=2

(gst-plugin-scanner:17487): GStreamer-WARNING **: 16:14:52.871: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_jpegdec.so': libnvjpeg.so.10: cannot open shared object file: No such file or directory
Creating LL OSD context new
0:00:00.715136540 17486 0x562d09ab9920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 13]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:01.762648775 17486 0x562d09ab9920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_1> NvDsInferContext[UID 12]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:01.794977681 17486 0x562d09ab9920 WARN                 nvinfer gstnvinfer.cpp:515:gst_nvinfer_logger:<secondary_gie_0> NvDsInferContext[UID 11]:log(): Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
gstnvtracker: Failed to open low-level lib at /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so
 dlopen error: /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so: cannot open shared object file: No such file or directory
gstnvtracker: Failed to initilaize low level lib.
0:00:01.799697516 17486 0x562d09ab9920 ERROR              nvtracker gstnvtracker.cpp:232:gst_nv_tracker_start: gstnvtracker: Failed to initialize trackerIface

0:00:01.799707676 17486 0x562d09ab9920 WARN                GST_PADS gstpad.c:1149:gst_pad_set_active:<tracking_tracker:sink> Failed to activate pad
** ERROR: <main:1359>: Failed to set pipeline to PAUSED
Quitting
App run failed
Segmentation fault (core dumped)

Could you share the nvdcf lib which cannot be accessed with me?
Also I suggest you resetup your env and try again, we cannot repro your issue internally.

First, I try with this libnvds_nvdcf_first.so
Then, I try with this libnvds_nvdcf_sec.so

libnvds_nvdcf_.zip (2.56 MB)

Pls try this lib.
libnvds_nvdcf.7z (1.15 MB)