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

[Build] abseil demands C++14 or better #1243

Closed
waarmond opened this issue May 5, 2024 · 4 comments
Closed

[Build] abseil demands C++14 or better #1243

waarmond opened this issue May 5, 2024 · 4 comments
Assignees

Comments

@waarmond
Copy link

waarmond commented May 5, 2024

Describe the bug
I'm trying to build Paddle2ONNX master with python setup.py build. It seems to demand C++ 11, therefore Abseil fails:

/usr/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."
      |  ^~~~~
In file included from /usr/include/absl/base/config.h:92,
                 from /usr/include/absl/base/attributes.h:37,
                 from /usr/include/google/protobuf/port_def.inc:33,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx-data_paddle2onnx.pb.h:13,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx-data_paddle2onnx.pb.cc:4:
/usr/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."
      |  ^~~~~
In file included from /usr/include/absl/base/config.h:92,
                 from /usr/include/absl/base/attributes.h:37,
                 from /usr/include/google/protobuf/port_def.inc:33,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx-operators_paddle2onnx-ml.pb.h:13,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx-operators_paddle2onnx-ml.pb.cc:4:
/usr/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."
      |  ^~~~~
In file included from /usr/include/absl/base/config.h:92,
                 from /usr/include/absl/base/attributes.h:37,
                 from /usr/include/google/protobuf/port_def.inc:33,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx_paddle2onnx-ml.pb.h:13,
                 from ./Paddle2ONNX/.setuptools-cmake-build/third_party/onnx/onnx/onnx_paddle2onnx-ml.pb.cc:4:
/usr/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."
      |  ^~~~~
/usr/include/google/protobuf/port_def.inc:159:15: error: static assertion failed: Protobuf only supports C++14 and newer.
  159 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
      |               ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/port_def.inc:159:15: note: the comparison reduces to '(201103 >= 201402)'
/usr/include/google/protobuf/port_def.inc:159:15: error: static assertion failed: Protobuf only supports C++14 and newer.
  159 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
      |               ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/port_def.inc:159:15: note: the comparison reduces to '(201103 >= 201402)'
/usr/include/google/protobuf/port_def.inc:159:15: error: static assertion failed: Protobuf only supports C++14 and newer.
  159 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
      |               ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/port_def.inc:159:15: note: the comparison reduces to '(201103 >= 201402)'
/usr/include/google/protobuf/port_def.inc:159:15: error: static assertion failed: Protobuf only supports C++14 and newer.
  159 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
      |               ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/port_def.inc:159:15: note: the comparison reduces to '(201103 >= 201402)'

Informations (please complete the following information):

  • Python 3.10
  • pybind11 2.12.0
  • python-absl 2.1.0
  • protobuf 25.3

Additional context

@bruvduroiu
Copy link

The project uses C++11 as a standard, and this document directs you to build an older version of protobuf (3.16.0) to fix this.

However, I wasn't able to build it successfully, even after following this instruction

@Zheng-Bicheng
Copy link
Collaborator

Hey @bruvduroiu @waarmond. The project construction method for Paddle2ONNX has been changed. I apologize for not updating the English documentation in a timely manner, and I will immediately update the English compiled documentation to the latest version.

@Zheng-Bicheng
Copy link
Collaborator

@Zheng-Bicheng
Copy link
Collaborator

@bruvduroiu I have updated the English version of the compilation document. Please refer to the latest document for compilation. If you encounter any issues, I will assist you in resolving them.

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

No branches or pull requests

3 participants