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

C++ versions less than C++14 are not supported. #936

Open
WhaSukGO opened this issue Sep 8, 2023 · 2 comments
Open

C++ versions less than C++14 are not supported. #936

WhaSukGO opened this issue Sep 8, 2023 · 2 comments

Comments

@WhaSukGO
Copy link

WhaSukGO commented Sep 8, 2023

Steps

$ git clone
$ cd onnx-tensorrt
$ git submodule update --init --recursive
$ mkdir build
$ cmake .. -DTENSORRT_ROOT=/usr/src/tensorrt/ -DCMAKE_CXX_STANDARD=14
$ make -j$(nproc)

Error

In file included from /usr/local/include/absl/base/config.h:86,
                 from /usr/local/include/absl/base/attributes.h:37,
                 from /usr/local/include/absl/strings/string_view.h:39,
                 from /usr/local/include/google/protobuf/stubs/common.h:44,
                 from /usr/local/include/google/protobuf/io/coded_stream.h:130,
                 from /root/Development/onnx-tensorrt/build/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.h:24,
                 from /root/Development/onnx-tensorrt/build/third_party/onnx/onnx/onnx_onnx2trt_onnx-ml.pb.cc:4:
/usr/local/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
   79 | #error "C++ versions less than C++14 are not supported."
      |  ^~~~~

Environment

root@1626b213f289:~/Development/onnx-tensorrt# gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@1626b213f289:~/Development/onnx-tensorrt# g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@1626b213f289:~/Development/onnx-tensorrt# protoc --version
libprotoc 24.0

root@1626b213f289:~/Development/onnx-tensorrt# 
@WhaSukGO
Copy link
Author

WhaSukGO commented Sep 8, 2023

Here's a temporary solution,

$ apt install protobuf-compiler

@WhaSukGO
Copy link
Author

WhaSukGO commented Sep 8, 2023

So the problem is, a container built from TensorRT 23.04 already has CMake, but no protobuf. However, CMake has FindProtobuf.cmake

CMake Warning at /usr/local/share/cmake-3.24/Modules/FindProtobuf.cmake:524 (message):
  Protobuf compiler version doesn't match library version 4.24.0
Call Stack (most recent call first):
  CMakeLists.txt:64 (FIND_PACKAGE)

So I wanted to build new CMake, but it fails to detect newly installed CMake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant