Error while running SSD provided in Deepstream

In file included from nvdsparsebbox_ssd.cpp:15:0:
…/…/includes/nvdsinfer_custom_impl.h:87:27: fatal error: NvCaffeParser.h: No such file or directory
compilation terminated.
nvdsiplugin_ssd.cpp:12:27: fatal error: NvInferPlugin.h: No such file or directory

CUDA_VER:=10.0
CC:= g++

CFLAGS:= -Wall -Werror -std=c++11 -shared -fPIC
CFLAGS+= -I…/…/includes -I/usr/local/cuda-$(CUDA_VER)/include

LIBS:= -lnvinfer -lnvparsers -L/home/nvidia/Downloads/TensorRT-5.0.2.6/

I have added the tensorRT path in the makefile, Not sure where things are going wrong

Hi,

The error comes from the missing header.
Please add the TensorRT path into the include parameter.
And the path should be end in …/lib or …/inlcude.

For example

CUDA_VER:=10.0
CC:= g++

CFLAGS:= -Wall -Werror -std=c++11 -shared -fPIC
CFLAGS+= -I../../includes -I/usr/local/cuda-$(CUDA_VER)/include <b>-I/home/nvidia/TensorRT-5.1.3.6/include</b>

LIBS:= -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas <b>-L/home/nvidia/TensorRT-5.1.3.6/lib</b>
LFLAGS:= -Wl,--start-group $(LIBS) -Wl,--end-group

SRCFILES:= nvdsparsebbox_ssd.cpp nvdsiplugin_ssd.cpp
TARGET_LIB:= libnvdsinfer_custom_impl_ssd.so

all: $(TARGET_LIB)

$(TARGET_LIB) : $(SRCFILES)
        $(CC) -o $@ $^ $(CFLAGS) $(LFLAGS)

clean:
        rm -rf $(TARGET_LIB)

Thanks.

2 Likes

CUDA_VER:=10.0
CC:= g++

CFLAGS:= -Wall -Werror -std=c++11 -shared -fPIC
CFLAGS+= -I…/…/includes -I/usr/local/cuda-$(CUDA_VER)/include -I/home/nvidia/TensorRT-5.0.2.6/include

LIBS:= -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -L/home/nvidia/TensorRT-5.0.2.6/lib

Added still getting the same error. I had to run make command from

/DeepStream_Release/sources/objectDetector_SSD$ make -C nvdsinfer_custom_impl_ssd
make: Entering directory ‘/home/nvidia/DeepStream_Release/sources/objectDetector_SSD/nvdsinfer_custom_impl_ssd’
g++ -o libnvdsinfer_custom_impl_ssd.so nvdsparsebbox_ssd.cpp nvdsiplugin_ssd.cpp -Wall -Werror -std=c++11 -shared -fPIC -I…/…/includes -I/usr/local/cuda-10.0/include -I/home/nvidia/TensorRT-5.0.2.6/include -Wl,–start-group -lnvinfer -lnvparsers -L/usr/local/cuda-10.0/lib64 -lcudart -lcublas -L/home/nvidia/TensorRT-5.0.2.6/lib -Wl,–end-group
In file included from nvdsparsebbox_ssd.cpp:15:0:
…/…/includes/nvdsinfer_custom_impl.h:87:27: fatal error: NvCaffeParser.h: No such file or directory
compilation terminated.
nvdsiplugin_ssd.cpp:12:27: fatal error: NvInferPlugin.h: No such file or directory
compilation terminated.
Makefile:29: recipe for target ‘libnvdsinfer_custom_impl_ssd.so’ failed
make: *** [libnvdsinfer_custom_impl_ssd.so] Error 1
make: Leaving directory ‘/home/nvidia/DeepStream_Release/sources/objectDetector_SSD/nvdsinfer_custom_impl_ssd’

Am I making any mistake in running. It should be run from here right???

solved Thanks