TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Compile error when build Tensorrt_OSS

Open duong0411 opened this issue 1 year ago • 5 comments

[ 3%] Linking CXX shared library ../out/libnvinfer_plugin.so /usr/bin/ld: cannot find -lcudadevrt /usr/bin/ld: cannot find -lcudart_static collect2: error: ld returned 1 exit status plugin/CMakeFiles/nvinfer_plugin.dir/build.make:2517: recipe for target 'out/libnvinfer_plugin.so.8.2.3' failed make[2]: *** [out/libnvinfer_plugin.so.8.2.3] Error 1 CMakeFiles/Makefile2:1411: recipe for target 'plugin/CMakeFiles/nvinfer_plugin.dir/all' failed make[1]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: *** [all] Error 2

duong0411 avatar Sep 27 '24 08:09 duong0411

ls /usr/local/cuda/lib64 | grep -E "libcudadevrt|libcudart_static" If these libraries are not found, you'll need to install or update your CUDA toolkit.

moraxu avatar Sep 27 '24 23:09 moraxu

Image

duong0411 avatar Sep 28 '24 01:09 duong0411

I build tensorrt oss on jetson nano.

duong0411 avatar Sep 28 '24 01:09 duong0411

Add /usr/local/cuda/lib64 in target_link_directories.

lix19937 avatar Sep 28 '24 03:09 lix19937

how can i add with i run commandline: cmake .. -DTRT_LIB_DIR=/usr/lib/aarch64-linux-gnu -DTRT_OUT_DIR=pwd/out -DCMAKE_TOOLCHAIN_FILE=/home/horus/TensorRT/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=10.2 -DCUDNN_LIB=/usr/lib/aarch64-linux-gnu/libcudnn.so -DCUBLAS_LIB=/usr/local/cuda-10.2/targets/aarch64-linux/lib/stubs/libcublas.so -DCUBLASLT_LIB=/usr/local/cuda-10.2/targets/aarch64-linux/lib/stubs/libcublasLt.so and make -j$(nproc)

duong0411 avatar Sep 28 '24 03:09 duong0411