undefined reference to `cudaLaunchHostFunc'

Hi,

I’m following the github TensorRT installation and am having this error since several days. Can anyone help?

~/Desktop/tensorflow/TensorRT/build$ sudo make -j$(nproc)
[ 3%] Built target third_party.protobuf
[ 3%] Built target caffe_proto
[ 4%] Built target gen_onnx_proto
[ 22%] Built target nvinfer_plugin_static
[ 38%] Built target nvinfer_plugin
[ 40%] Built target onnx_proto
[ 43%] Built target nvonnxparser_static
[ 53%] Built target nvcaffeparser
[ 63%] Built target nvcaffeparser_static
[ 66%] Built target nvonnxparser
[ 66%] Built target onnx2trt
[ 66%] Built target trt_onnxify
[ 67%] Built target getSupportedAPITest
[ 68%] Built target sample_googlenet
[ 69%] Built target sample_fasterRCNN
[ 70%] Built target sample_dynamic_reshape
[ 72%] Built target sample_char_rnn
[ 73%] Built target sample_int8
[ 75%] Built target sample_mlp
[ 75%] Built target sample_int8_api
[ 75%] Built target sample_mnist_api
[ 76%] Built target sample_mnist
[ 77%] Built target sample_movielens
[ 79%] Built target sample_movielens_mps
[ 87%] Built target sample_nmt
[ 88%] Built target sample_onnx_mnist
[ 90%] Built target sample_plugin
[ 90%] Built target sample_uff_fasterRCNN
[ 91%] Built target sample_uff_mnist
[ 91%] Built target sample_reformat_free_io
[ 93%] Built target sample_ssd
[ 94%] Built target sample_uff_maskRCNN
[ 95%] Built target sample_uff_plugin_v2_ext
[ 96%] Built target sample_uff_ssd
[ 97%] Linking CXX executable …/…/…/out/trtexec
CMakeFiles/trtexec.dir///common/sampleInference.cpp.o: In function sample::runInference(sample::InferenceOptions const&, sample::InferenceEnvironment&, std::vector<sample::InferenceTime, std::allocator<sample::InferenceTime> >&)': sampleInference.cpp:(.text+0x111d): undefined reference to cudaLaunchHostFunc’
collect2: error: ld returned 1 exit status
samples/opensource/trtexec/CMakeFiles/trtexec.dir/build.make:175: recipe for target ‘out/trtexec’ failed
make[2]: *** [out/trtexec] Error 1
CMakeFiles/Makefile2:2408: recipe for target ‘samples/opensource/trtexec/CMakeFiles/trtexec.dir/all’ failed
make[1]: *** [samples/opensource/trtexec/CMakeFiles/trtexec.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi,

From error message, issue seems to be due to CUDA library linkage.
Will recommend you to use NGC to reduce any host-side dependencies.

Thanks