TensorRT cross compile for Jetson.. nvcc fatal


[54%] Linking CUDA device code CMakeFiles/nvinfer_plugin.dir/cmake_device_link.o
nvcc fatal : ‘–device-link (-dlink)’ is not compatible with ‘–no-device-link (-nodlink)’
pluginin/CMakeFiles/nvinfer_plugin.dir/build.make:973: recipe for target ‘plugin/CMakeFiles/nvinfer_plugin.dir/cmake_device_link.o’ failed
make[2]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/cmake_device_link.o] Error 1
CMakeFiles/Makefile2:308: recipe for target ‘plugin/CMakeFiles/nvinfer_plugin.dir/all’ failed
make[1]: *** [plugin/CMakeFiles/nvinfer_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished job…


TensorRT Version: 7.2.1
GPU Type: GeForce GTX 1660
Nvidia Driver Version: 460.32.03
CUDA Version: 10.2
CUDNN Version: 8.0
Operating System + Version: ubuntu 18.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Relevant Files

Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)

Steps To Reproduce

I want to build TensorRT source code. https://github.com/NVIDIA/TensorRT
I followed the guidelines here.

Launch the TensorRT-OSS build container.

./docker/launch.sh --tag tensorrt-cross-jetpack --gpus all --release ~/Downloads/TensorRT- --source ~/TensorRT

Example: Ubuntu 18.04 Cross-Compile for Jetson (arm64) with cuda-10.2 (JetPack)

cd TensorRT
mkdir -p build && cd build
cmake … -DTRT_LIB_DIR=/pdk_files/tensorrt/lib -DTRT_OUT_DIR=‘pwd’/out -DCMKAE_TOOLCHAIN_FILE=/workspace/TensorRT/cmake/toolchains/cmake_aarch64.toolchain -DCUDA_VERSION=10.2 -DGPU_ARCHS=61 -DCUDNN_LIB=/pdk_files/cudnn/usr/lib/aarch64-linux-gnu/libcudnn.so -DCUBLAS_LIB=/usr/lib/aarch64-linux-gnu/libcublas.so -DCUBLASLT_LIB=/usr/lib/aarch64-linux-gnu/libcublas.so

make -j$(nproc)

If you tell me more information I need, I’ll let you know right away.

I referred to the advice in this link.

Hi, This looks like a Jetson issue. We recommend you to raise it to the respective platform from the below link