Libnvrtc.so.11.1 => not found

It’s saying from https://developer.nvidia.com/nvidia-tensorrt-7x-download that

However, when I tried ldd libnvinfer.so, I got libnvrtc.so.11.1 => not found.

Hmmm… For the time being, my temporary solution is:
sudo ln -s libnvrtc.so.11.2 libnvrtc.so.11.1

Even with the above modification, I still got the following ERROR message while building TensorRT samples:

make[1]: Entering directory ‘/usr/local/cuda-11.2/TensorRT_Samples/sampleAlgorithmSelector’
Linking: …/…/bin/sample_algorithm_selector_debug
g++ -o …/…/bin/sample_algorithm_selector_debug …/…/bin/dchobj/sampleAlgorithmSelector.o …/…/bin/dchobj/…/common/sampleInference.o …/…/bin/dchobj/…/common/sampleOptions.o …/…/bin/dchobj/…/common/logger.o …/…/bin/dchobj/…/common/getOptions.o …/…/bin/dchobj/…/common/sampleReporting.o …/…/bin/dchobj/…/common/sampleEngines.o -L"/usr/local/cuda/lib64" -Wl,-rpath-link=“/usr/local/cuda/lib64” -L"/usr/local/cuda/lib64" -Wl,-rpath-link=“/usr/local/cuda/lib64” -L"…/lib" -L"…/…/lib" -L"/usr/local/cuda" -Wl,-rpath-link=“/usr/local/cuda” -L"" -Wl,-rpath-link=“” -L…/…/bin -Wl,–start-group -lnvinfer -lnvparsers -lnvinfer_plugin -lnvonnxparser -lmyelin -lnvrtc -lcudart -lcublas -lcudnn -lrt -ldl -lpthread -Wl,–end-group
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcDestroyProgram@libnvrtc.so.11.1' /usr/bin/ld: /usr/local/cuda/lib64/libmyelin.so: undefined reference to nvrtcAddNameExpression@libnvrtc.so.11.1’
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcCreateProgram@libnvrtc.so.11.1' /usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcCompileProgram@libnvrtc.so.11.1’
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcGetPTX@libnvrtc.so.11.1' /usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcVersion@libnvrtc.so.11.1’
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcGetProgramLog@libnvrtc.so.11.1' /usr/bin/ld: /usr/local/cuda/lib64/libmyelin.so: undefined reference to nvrtcGetLoweredName@libnvrtc.so.11.1’
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcGetErrorString@libnvrtc.so.11.1' /usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to nvrtcGetProgramLogSize@libnvrtc.so.11.1’
/usr/bin/ld: /usr/local/cuda/lib64/libnvinfer.so: undefined reference to `nvrtcGetPTXSize@libnvrtc.so.11.1’
collect2: error: ld returned 1 exit status
make[1]: *** […/Makefile.config:309: …/…/bin/sample_algorithm_selector_debug] Error 1
make[1]: Leaving directory ‘/usr/local/cuda-11.2/TensorRT_Samples/sampleAlgorithmSelector’

Any suggestions please?

1 Like

I’ve got it compiled against with nvrtc-11.1. I wonder if

  1. Will tensorrt be open source ? so that customers can build it with the NEWEST cuda+cudnn.
  2. from nvrtc.h, it’s easy to tell header files for nvrtc-11.1 and nvrtc-11.2 are ALMOST the same, it should NOT be that hard to build out a version of tensorrt using nvrtc-11.2 or now 11.3 .

It might still be a bit better to use one single version instead of two on a the same desktop, IMO.

Anyway, problem solved.

ln -s doesnt solve this problem.