Error adding symbols. Tensorrt installation

Description

Error in cmake while linking tensorRT library during compillation inside docker container.

When building the image (Dockerfile below), in the last step of code compilation
with cmake, cmake outputs this error:
Command: cmake --build . --config Debug
Terminal output:

[ 42%] Built target dlf_overlays_module
[ 43%] Building CXX object src/dlf/modules/tensorRT/CMakeFiles/tensorRT_module.dir/tensorrt_engine.cpp.o
[ 45%] Building CXX object src/dlf/modules/tensorRT/CMakeFiles/tensorRT_module.dir/core/logger.cpp.o
[ 46%] Linking CXX shared library …/…/…/…/lib/libtensorRT_module.so
/usr/bin/ld: /var/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-11.8/libnvparsers8_8.6.1.6-1+cuda11.8_amd64.deb: error adding symbols: archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/dlf/modules/tensorRT/CMakeFiles/tensorRT_module.dir/build.make:205: lib/libtensorRT_module.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1070: src/dlf/modules/tensorRT/CMakeFiles/tensorRT_module.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

I have checked the installation and it appears to be correct. I am installing with .deb locally and remove nvidia remote to install from local repo and to avoid apt installing new versions not compatible with code and system.

Environment

TensorRT Version: 8.6.1
GPU Type:
Nvidia Driver Version: 535.183.01
CUDA Version: 11.8
CUDNN Version: 8
Operating System + Version: Ubuntu 22.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag): nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04

Steps To Reproduce

Dockerfile (in txt): Dockerfile.txt (1.2 KB)

Hi @xabiercb , can you pls try a fresh make, or setup?
Looks like this is corrupted,
As there is no known issue , and couldnt repro at my end.

Used official docker and official .deb
(https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/local_repos/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-11.8_1.0-1_amd64.deb) file.

Error worked-around by using nvcr.io/nvidia/tensorrt:23.06-py3 docker image instead of installing tensorrt