Error : C++ versions less than C++14 are not supported.

776 views
Skip to first unread message

Chellapandi Murugan

unread,
Mar 20, 2023, 8:35:30 AM3/20/23
to Protocol Buffers
Hello Everyone!

I am facing the when I upgrade my protobuf to 3.22.2. I am getting below error:
external/com_google_absl/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."

When I downgrade to 3.21.7. I am facing below issue:
Note: The failure of target //tools/python/wheel:run_setup (with exit code 1) may have been caused by the fact that it is running under Python 3 instead of Python 2. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY2, which affects the entire build.

If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information

But it should run in python 3 env ans python2 is EOL in 2020. I have registered the python toolchain.
python_register_toolchains(
    name = "python3_9",
    python_version = "3.9",
)


OS : Mac Monterey (12.6.3)
Bazel Version: 5.4.0
protobuf : 3.22.2
rules_python : 0.19.0
google-test: 1.13.0
go--tool-chain :1.19.3

Any help would be much appreciated! Thanks in advance.


Reply all
Reply to author
Forward
0 new messages