Skip to content

[Bug]: C++ versions less than C++14 are not supported #1431

@Chellapandi

Description

@Chellapandi

Describe the issue

I am getting the below issue:

In file included from external/com_google_absl/absl/crc/internal/cpu_detect.cc:15:
In file included from external/com_google_absl/absl/crc/internal/cpu_detect.h:18:
In file included from external/com_google_absl/absl/base/config.h:86:
external/com_google_absl/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."
#error "C++ versions less than C++14 are not supported."

Config:
Protobuf : 21.12
protoc : libprotoc 3.17.3
Bazel : 5.4.0
bazel depenedency:
http_archive(
name = "com_google_protobuf",
sha256 = "2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc",
strip_prefix = "protobuf-3.22.2",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.22.2.tar.gz"],
)
Language: Golang

Steps to reproduce the problem

When I run bazel build //..., I am getting above issue.

What version of Abseil are you using?

We are not explicitly using absl library. Protocol buffers uses this internally. Here I have raised an issue. They suggested me to raise a issue here.

What operating system and version are you using?

MacOS Monterey 12.6.3

What compiler and version are you using?

I used the below workaround in .bazelrc

build --cxxopt=-std=c++20
build --host_cxxopt=-std=c++20

What build system are you using?

Bazel and Version is 5.4.0.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions