Error when recompiling gst-nvinfer plugin

Hi Team,
I need to customize the gst-nvinfer plugin, so firstly I tried to recompile the gst-nvinfer source codes and all recompiled and installed well, but when I run the deepstream-test5-app it reported Segmentation fault (core dumped) as below:
Snipaste_2020-04-21_12-06-25
The above is the output of gdb debug on the segfault.

The weird thing is I didn’t change any source code in gst-nvinfer folder. And if I revert back to use the default libnvdsgst_infer.so, the app will run smoothly. So would you please help advise why this happened and how to handle this?

Any help would be appreciated. Thanks.

It fixed. Low-level library nvdsinfer needs recompiled too. Thanks.