-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
BUG : C++ versions less than C++14 are not supported #12393
Comments
Here, the absl library seems not to support anything lesser than c++14. Maybe, you need to open the issue there. |
cmake page |
I was running into this issue and solved it by adding the following to my project's
|
@mrcece Thanks for the response. Should I include -DCMAKE_CXX_STANDARD=14 in
Am I using it in a right way? Correct me if I am wrong. |
@awbraunstein I tired both, but no luck :(
|
Thank you. Let me try that. |
Thanks @Mizux for the patch clue. That issue has been fixed. But still facing below error which I have mentioned in the ticket.
|
As stated above, protobuf announced that C++ versions less than C++ 14 will no longer be supported so this is working as intended. It seems your new issues is with gRPC, I recommend you file a bug there. If you are still having an issue with the protobuf library, please open a new ticket with reproduction instructions just for that bug. |
This fixes builds of ONNX on OS X while installing ml-agents. OS X builds use Xcode by default, and the Xcode compiler defaults to using C++98 mode for C++ ( https://stackoverflow.com/a/21349148 ). This causes errors building protocol buffer libraries, which need to be compiled with support for C++14 or newer ( protocolbuffers/protobuf#12393 (comment) ). [This ONNX commit](onnx/onnx@a979e75) changes its compilation to use C++14 mode: releases that include this commit (1.15.0 or newer) build with Xcode by default. ONNX 1.15.0 uses a newer protocol buffer library, so allow newer versions here too.
What version of protobuf and what language are you using?
Version:
Language: Golang
What operating system (Linux, Windows, ...) and version?
MacOS Monterey - 12.6.3
What runtime / compiler are you using (e.g., python version or gcc version)
python - Python 3.8.8
What did you do?
When I do
bazel build //...
, build should be succeeded.What did you expect to see
Build Successful.
What did you see instead?
To resolve this issue, I have added the below snippet in
WORKSPACE
.But I got below error:
/external/com_google_protobuf/src/google/protobuf/compiler/BUILD.bazel:101:11: no such package '@com_google_absl//absl/log': BUILD file not found in directory 'absl/log' of external repository @com_google_absl. Add a BUILD file to a directory to mark it as a package. and referenced by '@com_google_protobuf//src/google/protobuf/compiler:protoc_lib_nowkt'
I tried the below workaround as well.
bazel build --action_env=BAZEL_CXXOPTS="-std=c++20" //...
But no luck.
Anything else we should know about your project / environment
I have to use grpc-gateway library which uses 3.22.2. So it throws below error if I downgrade the version to 3.21.7.
The text was updated successfully, but these errors were encountered: