Unable to compile deepstream LPR application

• Hardware Platform: HPE Proliant-DL-385-GEN-10-Plus
• Graphics Card : Tesla T4
• OS : Ubuntu 18.04 (64-bit)
• NVIDIA GPU Driver Version : 450.102.04
• Cuda Version : 10.2
• cuDNN Version: 8.0.2.39
• TensorRT Version : 7.1.3.4
• DeepStream Version : 5.0

• Issue Type: Unable to do generate libnvdsinfer_custom_impl_lpr.so file
• How to reproduce the issue ?
Reproduce:
Step-1: Clone the deepstream_lpr_app from git repository inside /opt/nvidia/deepstream/deepstream-5.0/sources
Step-2: cd deepstream_lpr_app/nvinfer_custom_lpr_parser → make

After giving make command the following error occurs:
g++ -o libnvdsinfer_custom_impl_lpr.so nvinfer_custom_lpr_parser.cpp -Wall -Werror -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream-5.0/sources/includes -Wl,–start-group -lnvinfer -lnvparsers -Wl,–end-group
/usr/bin/ld: cannot find -lnvinfer
/usr/bin/ld: cannot find -lnvparsers
collect2: error: ld returned 1 exit status
Makefile:37: recipe for target ‘libnvdsinfer_custom_impl_lpr.so’ failed
make: *** [libnvdsinfer_custom_impl_lpr.so] Error 1

• Requirement details I am working on this machine for doing the LPR model training…

Can someone help to solve this issue

Seems you didn’t install the TensorRT correctly, you can check if libnvinfer.so inside your systerm lib path.

:~/Downloads/TensorRT-7.1.3.4/lib$ ls
libmyelin_compiler_static.a libnvinfer_plugin.so libnvonnxparser_static.a
libmyelin_executor_static.a libnvinfer_plugin.so.7 libnvparsers.so
libmyelin_pattern_library_static.a libnvinfer_plugin.so.7.1.3 libnvparsers.so.7
libmyelin_pattern_runtime_static.a libnvinfer_plugin_static.a libnvparsers.so.7.1.3
libmyelin.so libnvinfer.so libnvparsers_static.a
libmyelin.so.1 libnvinfer.so.7 libonnx_proto.a
libmyelin.so.1.1.0 libnvinfer.so.7.1.3 libprotobuf.a
libnvcaffe_parser.a libnvinfer_static.a libprotobuf-lite.a
libnvcaffe_parser.so libnvonnxparser.so stubs
libnvcaffe_parser.so.7 libnvonnxparser.so.7
libnvcaffe_parser.so.7.1.3 libnvonnxparser.so.7.1.3

Im having

That’s the problem, you didn’t install these libs in your system lib path, so compiler cannot find it.
It’s just a basic compiler problem.
2 options to fix it:
Add -L to specify the search path for compiler
install these lib in your system lib path

Attach Using and Porting the GNU Compiler Collection (GCC): Invoking GCC for your reference

I have installed TensorRT by following this link only

https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-tar

I got solution for this issue.

  1. I have installed cuda-10.2 as run file method-> so I uninstalled cuda and re-installed cuda-10.2 as deb method
  2. Removed the packages of existing cudnn libraries which was not removed properly
  3. Uninstalled TensorRT because I have installed it using tar file method → then I re-installed it using deb method

After I did the above changes I’m able to compile the application

Thanks for the assistance