← All tasks
pythongrpc/grpc #41611Not a task: not reproduced

grpc_observability build failing with `invalid argument '-std=c++17' not allowed with 'C'`

envgap__grpc__grpc-41611

01 / FAILURE SIGNATURE

As reported upstream

error: invalid argument '-std=c++17' not allowed with 'C'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
2b63f74a76bfb16f885775ca941773be409e1f81
Manifest
src/python/grpcio_observability/setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

grpc/grpc #41611 · read the original issue
<!--
PLEASE DO NOT POST A QUESTION HERE.
This form is for bug reports and feature requests ONLY!

For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc

For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io

Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
-->

### What version of gRPC and what language are you using?

grpcio-observability 1.78.0 (Python)

### What operating system (Linux, Windows,...) and version?

macOS 15.7.1 (24G231)

### What runtime / compiler are you using (e.g. python version or version of gcc)

Apple clang version 17.0.0 (Target: arm64-apple-darwin24.6.0), Python 3.12.11

### What did you do?

Attempt to install `grpcio-observability` via setup.py using `extras_require`

```
setup(
    packages=find_packages(),
    extras_require={
        "grpc": [
            "grpcio",
            "grpcio-observability",
            "opentelemetry-instrumentation-grpc",
        ],
    ...
```

### What did you expect to see?

Installation successful

### What did you see instead?

Installation failed, partial output:

```
clang++: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      clang: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      error: invalid argument '-std=c++17' not allowed with 'C'
      c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -D_WIN32_WINNT=1536 -DHAVE_PTHREAD=1 -D__STDC_FORMAT_MACROS "-DPyMODINIT_FUNC=extern \"C\" __attribute__((visibility (\"default\"))) PyObject*" -I. -Igrpc_root -Igrpc_root/include -Ithird_party/abseil-cpp -Igrpc_root/src/core/ext/upb-gen -Igrpc_root/src/core/ext/upbdefs-gen -Ithird_party/protobuf -Ithird_party/protobuf/third_party/utf8_range -I/Users/davidllu/.local/share/mise/installs/python/3.12.11/include/python3.12 -c third_party/abseil-cpp/absl/synchronization/blocking_counter.cc -o build/temp.macosx-11.0-arm64-cpython-312/third_party/abseil-cpp/absl/synchronization/blocking_counter.o -std=c++17 -fno-wrapv -frtti -fvisibility=hidden -flto
      c++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -D_WIN32_WINNT=1536 -DHAVE_PTHREAD=1 -D__STDC_FORMAT_MACROS "-DPyMODINIT_FUNC=extern \"C\" __attribute__((visibility (\"default\"))) PyObject*" -I. -Igrpc_root -Igrpc_root/include -Ithird_party/abseil-cpp -Igrpc_root/src/core/ext/upb-gen -Igrpc_root/src/core/ext/upbdefs-gen -Ithird_party/protobuf -Ithird_party/protobuf/third_party/utf8_range -I/Users/davidllu/.local/share/mise/installs/python/3.12.11/include/python3.12 -c third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc -o build/temp.macosx-11.0-arm64-cpython-312/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.o -std=c++17 -fno-wrapv -frtti -fvisibility=hidden -flto
      clang++: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      clang++: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      grpc_observability/python_observability_context.cc:92:13: warning: 'HexStringToBytes' is deprecated: Use the HexStringToBytes() that returns a bool [-Wdeprecated-declarations]
         92 |       absl::HexStringToBytes(absl::string_view(ctx.GetSpanContext().TraceId()));
            |             ^
      third_party/abseil-cpp/absl/strings/escaping.h:173:1: note: 'HexStringToBytes' has been explicitly marked deprecated here
        173 | ABSL_DEPRECATED("Use the HexStringToBytes() that returns a bool")
            | ^
      third_party/abseil-cpp/absl/base/attributes.h:689:49: note: expanded from macro 'ABSL_DEPRECATED'
        689 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
            |                                                 ^
      grpc_observability/python_observability_context.cc:94:13: warning: 'HexStringToBytes' is deprecated: Use the HexStringToBytes() that returns a bool [-Wdeprecated-declarations]
         94 |       absl::HexStringToBytes(absl::string_view(ctx.GetSpanContext().SpanId()));
            |             ^
      third_party/abseil-cpp/absl/strings/escaping.h:173:1: note: 'HexStringToBytes' has been explicitly marked deprecated here
        173 | ABSL_DEPRECATED("Use the HexStringToBytes() that returns a bool")
            | ^
      third_party/abseil-cpp/absl/base/attributes.h:689:49: note: expanded from macro 'ABSL_DEPRECATED'
        689 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
            |                                                 ^
      ...
      clang++: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      clang++: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
      error: command '/usr/bin/cc' failed with exit code 1
      [end of output]
  
```

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

See [TROUBLESHOOTING.md](https://github.com/grpc/grpc/blob/master/TROUBLESHOOTING.md) for how to diagnose problems better.

### Anything else we should know about your project / environment?
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]