Skip to content

[C++][FlightRPC] Flight fails building with protobuf v34.0+ due to functions updated with nodiscard #49435

Description

@raulcd

Describe the bug, including details regarding any error messages, version, and platform.

I've seen this issue in the ARM64 macOS 14 GLib & Ruby job here:
https://github.com/apache/arrow/actions/runs/22618042997/job/65535748275?pr=49429

 [522/661] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/serialization_internal.cc.o
FAILED: [code=1] src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/serialization_internal.cc.o /opt/homebrew/bin/ccache /usr/bin/c++ -DARROW_FLIGHT_EXPORTING -DARROW_HAVE_NEON -DARROW_WITH_TIMING_TESTS -DGRPC_ENABLE_ASYNC -DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental -DGRPC_USE_CERTIFICATE_VERIFIER -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS -DPROTOBUF_USE_DLLS -I/Users/runner/work/arrow/arrow/build/cpp/src -I/Users/runner/work/arrow/arrow/cpp/src -I/Users/runner/work/arrow/arrow/cpp/src/generated -isystem /opt/homebrew/include -isystem /opt/homebrew/opt/openssl@3/include -fno-aligned-new -Qunused-arguments -fcolor-diagnostics -Wall -Wextra -Wdocumentation -DARROW_WARN_DOCUMENTATION -Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter -Wno-constant-logical-operand -Wno-return-stack-address -Wdate-time -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a -g -Werror -O0 -ggdb -g1 -std=c++20 -arch arm64 -fPIC -MD -MT src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/serialization_internal.cc.o -MF src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/serialization_internal.cc.o.d -o src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/serialization_internal.cc.o -c /Users/runner/work/arrow/arrow/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc
/Users/runner/work/arrow/arrow/cpp/src/arrow/flight/transport/grpc/serialization_internal.cc:356:9: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
356 | pb_stream.ReadString(&buffer, length);
| ^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
1 error generated.
[523/661] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/grpc_server.cc.o
[524/661] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/grpc_client.cc.o
[525/661] Building CXX object src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/transport/grpc/protocol_grpc_internal.cc.o
ninja: build stopped: subcommand failed.

From what I can see protobuf has started to add a bunch of nodiscard to some of their methods which are part of v34.0:
protocolbuffers/protobuf@10af44b

Component(s)

C++, FlightRPC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions