You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I tried to build TensorRT 10.6 oss, i met the following errors:
========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found nvinfer_LIB_PATH-NOTFOUND
macro(find_library_create_target target_name lib libtype hints)
message(STATUS "========================= Importing and creating target ${target_name} ==========================")
message(STATUS "Looking for library ${lib}")
if (CMAKE_BUILD_TYPE STREQUAL"Debug")
find_library(${lib}_LIB_PATH ${lib}${TRT_DEBUG_POSTFIX}HINTS${hints}NO_DEFAULT_PATH)
endif()
find_library(${lib}_LIB_PATH ${lib}HINTS${hints}NO_DEFAULT_PATH)
find_library(${lib}_LIB_PATH ${lib})
message(STATUS "Library that was found ${${lib}_LIB_PATH}")
add_library(${target_name}${libtype}IMPORTED)
set_property(TARGET${target_name}PROPERTYIMPORTED_LOCATION${${lib}_LIB_PATH})
message(STATUS "==========================================================================================")
endmacro()
they means if fails to find the library of nvinfer in path of hints
after carefully debug, i find hints is the variable of TRT_LIB_DIR, and TRT_LIB_DIR is from the env variable TRT_LIBPATH which is mentioned in read_me:
cd $TRT_OSSPATH
mkdir -p build && cd build
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out
make -j$(nproc)
the actual problem is TRT_LIBPATH is the env variable in linux(Ubuntu 24.04 for me), when export TRT_LIBPATH in cmake , TRT_LIB_DIR
will look like :path1:path2:path3. Different paths are separated by ":". But for list type in cmake they should like path1;path2;path3. This bug causes the function of find_library cant find lib we needed.
Description
when I tried to build TensorRT 10.6 oss, i met the following errors:
========================= Importing and creating target nvinfer ==========================
-- Looking for library nvinfer
-- Library that was found nvinfer_LIB_PATH-NOTFOUND
these errors are related with file of https://github.com/NVIDIA/TensorRT/blob/release/10.6/cmake/modules/find_library_create_target.cmake
they means if fails to find the library of nvinfer in path of
hints
after carefully debug, i find
hints
is the variable ofTRT_LIB_DIR
, andTRT_LIB_DIR
is from the env variableTRT_LIBPATH
which is mentioned in read_me:the actual problem is TRT_LIBPATH is the env variable in linux(Ubuntu 24.04 for me), when export TRT_LIBPATH in cmake , TRT_LIB_DIR
will look like
:path1:path2:path3
. Different paths are separated by ":". But for list type in cmake they should likepath1;path2;path3
. This bug causes the function offind_library
cant find lib we needed.i fixed the bug by adding
to del first ":" and replace all ":" with ";".
I'm not very familiar with cmake. Is this really a bug, or is there an issue with my installation process? Thank you very much for your help.
if you want to reproduce, remember to del cmake cache in build file
Environment
TensorRT Version: 10.6
NVIDIA GPU:
NVIDIA Driver Version:
CUDA Version: 12.4
CUDNN Version:
Operating System:
Python Version (if applicable):
Tensorflow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if so, version):
Relevant Files
Model link:
Steps To Reproduce
Commands or scripts:
Have you tried the latest release?:
Can this model run on other frameworks? For example run ONNX model with ONNXRuntime (
polygraphy run <model.onnx> --onnxrt
):The text was updated successfully, but these errors were encountered: