About build errors for sampleOnnxMNIST

Description

yhlee@yhlee-H110-D3:/usr/src/tensorrt/samples/sampleOnnxMNIST$ sudo make -j8
[sudo] password for yhlee:
…/Makefile.config:10: CUDA_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDA_INSTALL_DIR=<cuda_directory> to change.
…/Makefile.config:15: CUDNN_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDNN_INSTALL_DIR=<cudnn_directory> to change.
…/Makefile.config:28: TRT_LIB_DIR is not specified, searching …/…/lib, …/…/lib, …/lib by default, use TRT_LIB_DIR=<trt_lib_directory> to change.
Linking: …/…/bin/sample_onnx_mnist_debug
/usr/bin/ld: warning: libnvrtc.so.11.0, needed by /usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcGetPTX@libnvrtc.so.11.0' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcDestroyProgram@libnvrtc.so.11.0’
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libmyelin.so: undefined reference to nvrtcGetLoweredName@libnvrtc.so.11.0' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcCompileProgram@libnvrtc.so.11.0’
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcGetPTXSize@libnvrtc.so.11.0' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcCreateProgram@libnvrtc.so.11.0’
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libmyelin.so: undefined reference to nvrtcAddNameExpression@libnvrtc.so.11.0' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcVersion@libnvrtc.so.11.0’
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcGetProgramLog@libnvrtc.so.11.0' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libnvinfer.so: undefined reference to nvrtcGetProgramLogSize@libnvrtc.so.11.0’
/usr/lib/gcc/x86_64-linux-gnu/7/…/…/…/x86_64-linux-gnu/libnvinfer.so: undefined reference to `nvrtcGetErrorString@libnvrtc.so.11.0’
collect2: error: ld returned 1 exit status
…/Makefile.config:300: recipe for target ‘…/…/bin/sample_onnx_mnist_debug’ failed
make: *** […/…/bin/sample_onnx_mnist_debug] Error 1

A clear and concise description of the bug or issue.

Environment

TensorRT Version: nv-tensorrt-repo-ubuntu1804-cuda11.0-trt7.1.3.4-ga-20200617_1-1_amd64
GPU Type: gtx3080
Nvidia Driver Version: Driver Version: 455.23.04
CUDA Version: 11.1
CUDNN Version: 10.2
Operating System + Version: ubuntu18.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

yhlee@yhlee-H110-D3:/usr/src/tensorrt/samples/sampleOnnxMNIST$ sudo make -j8

Please include:

  • Exact steps/commands to build your repro
  • Exact steps/commands to run your repro
  • Full traceback of errors encountered

Hi, Request you to share the ONNX model and the script so that we can assist you better.

Alongside you can try validating your model with the below snippet

check_model.py

import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
onnx.checker.check_model(model).

Alternatively, you can try running your model with trtexec command.

Thanks!

1 Like

Hello,

This is the mnist.onnx file included in the sample that is automatically installed when tensorRT is installed.

Thank you.

Hi @Hodu,

Sorry for late reply.
I tried reproducing this issue. But for me its working fine.
Please make sure you’ve installed tensorrt correctly. For your reference, installation guide.
https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing

or you can also use tensorrt NGC container to avoid system dependency.
https://ngc.nvidia.com/catalog/containers/nvidia:tensorrt

Thank you.

1 Like