onnx / onnx-tensorrt

ONNX-TensorRT: TensorRT backend for ONNX
Apache License 2.0
2.95k stars 545 forks source link

Build error: missing source file `errorHelpers.cpp` #979

Open dbermond opened 4 months ago

dbermond commented 4 months ago

Description

I'm getting a build error when trying to build TensorRT GA 10.2.0, which in turn uses onnx-tensorrt version release/GA-10.2 (by commit 706f02e74366b2cbaacf87be61de95df051a2788):

CMake Error at parsers/onnx/CMakeLists.txt:121 (add_library):
  Cannot find source file:

    errorHelpers.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc

CMake Error at parsers/onnx/CMakeLists.txt:121 (add_library):
  No SOURCES given to target: nvonnxparser

CMake Error at parsers/onnx/CMakeLists.txt:133 (add_library):
  No SOURCES given to target: nvonnxparser_static

CMake Generate step failed.  Build files cannot be regenerated correctly.

There is no source file named errorHelpers.cpp in the the onnx-tensorrt repository for version release/GA-10.2.

Removing this file entry from CMakeLists.txt fixes the issue.

Environment

TensorRT Version: GA 10.2.0 ONNX-TensorRT Version / Branch: release/GA-10.2 GPU Type: RTX 3060 Nvidia Driver Version: proprietary 555.58.02 CUDA Version: 12.5.1 CUDNN Version: 9.2.0.82 Operating System + Version: Arch Linux Python Version (if applicable): 3.12.4 TensorFlow + TF2ONNX Version (if applicable): not applicable PyTorch Version (if applicable): not applicable Baremetal or Container (if container which image + tag): not applicable

Relevant Files

Not applicable.

Steps To Reproduce

Build TensorRT GA 10.2.0 with the following commands:

$ cmake -B build -S TensorRT \
        -G 'Unix Makefiles' \
        -DBUILD_ONNX_PYTHON:BOOL='ON' \
        -DBUILD_SAMPLES:BOOL='OFF' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DTRT_LIB_DIR="${srcdir}/TensorRT-10.2.0.19/lib" \
        -DGPU_ARCHS='50 52 53 60 61 62 70 72 75 80 86 87 89 90' \
        -DPROTOBUF_VERSION='3.20.1' \
        -Wno-dev
$ cmake --build build
Mars2018 commented 4 months ago

hi @dbermond I encountered same issue and reviewed recent PR: https://github.com/onnx/onnx-tensorrt/pull/977/files this line seems unnecessary. I removed that, and build successfully

dbermond commented 4 months ago

I removed that, and build successfully

Yes, I also stated it above in the issue description. Thanks for the reply anyway.