Compilation Error for TensorRT Samples

Hi, I’m trying to run the SampleSSD project:

However, I get an error when trying to make the TensorRT project, which can be seen below.

[ 88%] Building CXX object samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/samplePlugin.cpp.o
In file included from /home/magna/NVIDIA/sampleSSD/TensorRT/samples/opensource/samplePlugin/samplePlugin.cpp:29:0:
/usr/local/cuda-10.1/include/cuda_runtime_api.h:2484:88: error: use of enum ‘cudaStreamCaptureMode’ without previous declaration
extern host cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode);
^
/usr/local/cuda-10.1/include/cuda_runtime_api.h:2535:80: error: use of enum ‘cudaStreamCaptureMode’ without previous declaration
extern host cudaError_t CUDARTAPI cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *mode);
^
samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/build.make:62: recipe for target ‘samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/samplePlugin.cpp.o’ failed
make[2]: *** [samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/samplePlugin.cpp.o] Error 1
CMakeFiles/Makefile2:2322: recipe for target ‘samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/all’ failed
make[1]: *** [samples/opensource/samplePlugin/CMakeFiles/sample_plugin.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Could you please help me with this error?

Thank you

Hi,
Can you provide the following information so we can better help?
Provide details on the platforms you are using:
o Linux distro and version
o GPU type
o Nvidia driver version
o CUDA version
o CUDNN version
o Python version [if using python]
o Tensorflow version
o TensorRT version
o If Jetson, OS, hw versions
o —
Also, could please cross check if TensorRT is installed as per the install guide (Installation Guide :: NVIDIA Deep Learning TensorRT Documentation )

I’ve already resolved it.
One of the main solutions was the upgrade of CMAKE to the latest version.

Hi, I got the same error :

with cuda 10.1 :
In file included from /usr/local/cuda-10.1/include/channel_descriptor.h:61:0,
from /usr/local/cuda-10.1/include/cuda_runtime.h:95,
from /home/wtambellini/repos/AFWT/src/backend/cuda/platform.hpp:14,
from /home/wtambellini/repos/AFWT/src/backend/cuda/cublas.cpp:12:
/usr/local/cuda-10.1/include/cuda_runtime_api.h:2483:88: error: use of enum ‘cudaStreamCaptureMode’ without previous declaration
extern host cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode);

Seems to build correctly with cuda 10.0.
Kind
WT