CaoWGG/TensorRT-CenterNet

TensorRT6 编译失败

Opened this issue · 2 comments

tcxia commented

/usr/bin/ld: cannot find -lcudart
collect2: error: ld returned 1 exit status
onnx-tensorrt/CMakeFiles/nvonnxparser_runtime.dir/build.make:121: recipe for target '../lib/libnvonnxparser_runtime.so' failed
make[2]: *** [../lib/libnvonnxparser_runtime.so] Error 1
CMakeFiles/Makefile2:128: recipe for target 'onnx-tensorrt/CMakeFiles/nvonnxparser_runtime.dir/all' failed
make[1]: *** [onnx-tensorrt/CMakeFiles/nvonnxparser_runtime.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

make sure your cuda /libcudart is in enviroment path!

i have a solution for this stupid cmake verison problem.
go to PROJECT_ROOT/build/onnx-tensorrt/CMakeFiles/nvonnxparser_runtime.dir
open link.txt
find "... -lcudart -lcublas ..."
change -lcudart to /usr/local/cuda-VERSION/lib64/libcudart.so or other place you install the cuda lib
then just DO NOT cmake this project, just type make in the build folder, the linking will works fine