[DS 8.0] nvdspreprocess: "Could not open custom library" / "Configuration file parsing failed" for SGIE CustomTensorPrep

Please provide complete information as applicable to your setup.

• Hardware Platform GPU A6000 ADA
• DeepStream Version 8.0
• NVIDIA GPU Driver Version 13.1
• Docker env
hi,

I am building a DeepStream 8.0 pipeline where a primary YOLOv8-seg model (PGIE) detects objects and attaches a float array segmentation mask as NvDsUserMeta.
I am using nvdspreprocess right before my SGIE (Classifier) to run a custom CUDA kernel that crops the bounding box, applies the segmentation mask, and formats the output as an NCHW float32 tensor.
Issue: Whenever the pipeline initializes, the nvdspreprocess element successfully parses the config lines but immediately fails when trying to load the .so library, throwing:

WARN nvdspreprocess gstnvdspreprocess.cpp:481:gst_nvdspreprocess_start: error: Configuration file parsing failed
WARN nvdspreprocess gstnvdspreprocess.cpp:543:gst_nvdspreprocess_start: error: Could not open custom library
my config txt file of nvpreprocss
[property] enable=1 target-unique-ids=2 network-input-order=0 process-on-frame=0 operate-on-gie-id=1 maintain-aspect-ratio=1 symmetric-padding=1 processing-width=960 processing-height=544 scaling-buf-pool-size=6 tensor-buf-pool-size=6 network-input-shape=8;3;544;960 network-color-format=0 tensor-data-type=0 tensor-name=input_1:0 scaling-pool-memory-type=1 scaling-pool-compute-hw=0 scaling-filter=0 custom-lib-path=/opt/nvidia/deepstream/deepstream-8.0/deepstream-cpp/nvdspreprocess_custom_impl_yolo/libcustom_mask_prep.so custom-tensor-preparation-function=NvDsPreProcessCustomTensorPrep [group-0] src-ids=0 process-on-all-objects=1 custom-input-transformation-function=CustomAsyncTransformation

This might be due to missing dependencies in your custom-lib-path. Try using the following command to determine why dlopen is failing.

# Check if all dependencies of the library can be found
ldd /path/to/custom_lib.so

# Manually test loading the library
LD_DEBUG=libs python3 -c "import ctypes; ctypes.CDLL('/path/to/custom_lib.so')"