Skip to content

macos+homebrew gcc missing __has_feature() #29680

Open
@egorpugin

Description

grpc 1.46.1
macos aarch64
gcc11 from homebrew
https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/port_platform.h#L241=

Build error - gcc has no __has_feature thing.
Replacing with #if 1 helps and whole grpc builds fine.

Error

[org.sw.demo.google.grpc.core.plugin_registry-1.46.1]/src/core/plugin_registry/grpc_plugin_registry_extra.cc
In file included from /Users/egor/.sw/storage/pkg/45/1d/cd62/src/sdir/include/grpc/support/port_platform.h:22,
                 from /Users/egor/.sw/storage/pkg/55/a8/fe29/src/sdir/src/core/plugin_registry/grpc_plugin_registry_extra.cc:17:
/Users/egor/.sw/storage/pkg/45/1d/cd62/src/sdir/include/grpc/impl/codegen/port_platform.h:241:46: error: missing binary operator before token "("
  241 | #if !(defined(__has_feature) && __has_feature(cxx_thread_local))
      |                                              ^

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions