Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not contain a CMakeLists.txt file. #354

Closed
kshamaramesh opened this issue Dec 20, 2019 · 4 comments
Closed

does not contain a CMakeLists.txt file. #354

kshamaramesh opened this issue Dec 20, 2019 · 4 comments
Labels
question Further information is requested triaged Issue has been triaged by maintainers

Comments

@kshamaramesh
Copy link

Hello,
I am trying to convert from onnx to tensorRT but I am getting this issue while converting.

Please help me to resolve this

Make Error at CMakeLists.txt:100 (add_subdirectory):
The source directory

/home/bplus/Desktop/UNIT_MASTER_THESIS/UNIT/unit1/UNIT_Working/onnx-tensorrt/third_party/onnx

does not contain a CMakeLists.txt file.

-- Found TensorRT headers at /usr/include/x86_64-linux-gnu
-- Find TensorRT libs at /usr/src/TensorRT-5.1.5.0/lib/libnvinfer.so;/usr/src/TensorRT-5.1.5.0/lib/libnvinfer_plugin.so;TENSORRT_LIBRARY_MYELIN-NOTFOUND
-- Could NOT find TENSORRT (missing: TENSORRT_LIBRARY)
ERRORCannot find TensorRT library.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TENSORRT_LIBRARY_MYELIN
linked by target "nvonnxparser_static" in directory /home/bplus/Desktop/UNIT_MASTER_THESIS/UNIT/unit1/UNIT_Working/onnx-tensorrt
linked by target "nvonnxparser" in directory /home/bplus/Desktop/UNIT_MASTER_THESIS/UNIT/unit1/UNIT_Working/onnx-tensorrt

-- Configuring incomplete, errors occurred!
See also "/home/bplus/Desktop/UNIT_MASTER_THESIS/UNIT/unit1/UNIT_Working/onnx-tensorrt/build/CMakeFiles/CMakeOutput.log".
See also "/home/bplus/Desktop/UNIT_MASTER_THESIS/UNIT/unit1/UNIT_Working/onnx-tensorrt/build/CMakeFiles/CMakeError.log".

@Semihal
Copy link

Semihal commented Dec 23, 2019

Related to #355.

@peasant98
Copy link

This is a different error. Try git submodule update --init --recursive or git clone --recurse-submodules https://github.com/onnx/onnx-tensorrt.git (if it's not cloned already). I had a similar error, and it was because the repository in https://github.com/onnx/onnx-tensorrt/tree/master/third_party was not updated (onnx). I hope this helps! @kshamaramesh

@KevenLee
Copy link

KevenLee commented Jul 8, 2020

what you should do:

  1. git clone --recursive -b xxx https://github.com/onnx/onnx-tensorrt.git xxx means your selected branch, for example tensorRt7.0, you should do it git clone --recursive -b 7.0 https://github.com/onnx/onnx-tensorrt.git

  2. cd onnx-tensorrt

  3. mkdir build

  4. modify your CMakeLists.txt

set(TENSORRT_ROOT your tensorRt path)
include_directories(/usr/local/cuda-10.0/include/)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

set(CMAKE_BUILD_TYPE Release)
set(GPU_ARCHS 61) 
find_package(Threads)
  1. just run cmake ..
  2. make

@kevinch-nv
Copy link
Collaborator

Closing this issue as it's been solved (clone with the recursive option to initialize submodules).

@kevinch-nv kevinch-nv added question Further information is requested triaged Issue has been triaged by maintainers labels Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

5 participants