Statically linking with TensorRT 7.1.3

Description

After jumping through quite a few hoops, I’m still unable to link statically with TensorRT on ARM. The latest issue seems to be related to NvMedia related methods:

Loading library from libsampleTRTLib.so
401789: find library=libsampleTRTLib.so [0]; searching
401789: search path=/data/sio/SIO-install-1.0/bin/…/lib (RPATH from file ./bin/sampleTRT)
401789: trying file=/data/sio/SIO-install-1.0/bin/…/lib/libsampleTRTLib.so
401789:
401789: /data/sio/SIO-install-1.0/bin/…/lib/libsampleTRTLib.so: error: symbol lookup error: undefined symbol: NvMediaTensorEglStreamConsumerDestroy (fatal)

I’m struggling to find the reference to NvMediaTensorEglStreamConsumerDestroy. Where is it supposed to come from?

Environment

TensorRT Version:
GPU Type:
Nvidia Driver Version:
CUDA Version:
CUDNN Version:
Operating System + Version:
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

Please include:

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

Hi @alexm5m91,

Could you please provide more details of issue. Please provide Tenosrrt/env details, errors logs and issue repro steps/model scripts.

Thank you.

I’ve provided the only error log that is relevant.

  • The program is crosscompiled from x86_64 to arm
  • TensorRT 7.1.3/CUDA 10 from Jetpack 4.4.1 is used
  • All of the NvMedia* symbols appear unresolved in the resulting binary (see the nm-output.txt)
  • The library fails to load. LD_DEBUG=libs generates the output seen in the OP

You can attempt reproducing using the attached CMakeLists.txt as a template, but really the question is – why does libnvinfer_static.a reference those unresolved symbols, and which library should we link with to be able to resolve them?

nm-output.txt (11.5 KB)
CMakeLists.txt (1.3 KB)

Hi @alexm5m91,

Sorry for delayed response.
Hope this will help you.
https://docs.nvidia.com/deeplearning/tensorrt/sample-support-guide/index.html#cross-compiling

Thank you.