# Compilation Error for TensorRT Samples

**URL:** <https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784>\
**Category:** TensorRT\
**Created:** [October 4, 2019, 7:49pm UTC](https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784 "2019-10-04T19:49:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaroslav.taran](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yaroslav.taran](https://forums.developer.nvidia.com/u/yaroslav.taran)\
**Post date:** [October 4, 2019, 7:49pm UTC](https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784/1 "2019-10-04T19:49:17Z")

</div>

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

> **[GitHub - NVIDIA/TensorRT: NVIDIA® TensorRT™ is an SDK for high-performance...](https://github.com/NVIDIA/TensorRT)**
>
> NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.

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

---

<div class="post-metadata">

**Author:** ![SunilJB](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/suniljb/32/14043_2.png) [@SunilJB](https://forums.developer.nvidia.com/u/SunilJB)\
**Post date:** [October 18, 2019, 3:29pm UTC](https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784/2 "2019-10-18T15:29:39Z")

</div>

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](https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html) )

---

<div class="post-metadata">

**Author:** ![yaroslav.taran](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yaroslav.taran](https://forums.developer.nvidia.com/u/yaroslav.taran)\
**Post date:** [October 18, 2019, 3:32pm UTC](https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784/3 "2019-10-18T15:32:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wtambellini](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wtambellini](https://forums.developer.nvidia.com/u/wtambellini)\
**Post date:** [January 6, 2020, 10:43pm UTC](https://forums.developer.nvidia.com/t/compilation-error-for-tensorrt-samples/82784/4 "2020-01-06T22:43:27Z")

</div>

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
