-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS build failure: printer/google/protobuf/io/printer.h:94:55: error: unused parameter 'semantic' [-Werror,-Wunused-parameter] #12313
Comments
@deannagarcia @mkruskal-google this is one of the issues that block grpc's upgrade to 22.x |
Indeed, the parameter protobuf/src/google/protobuf/io/printer.h Line 94 in 58ecf38
|
We don't support compiling with arbitrary warning flags. It is simply not sustainable as some warnings are mutually contradictory. |
Got that, but given that gRPC's upgrade to protobuf 22.x has been dragging on for quite a while now and there are still several other issues to resolve with the upgrade, IMHO fixing this one warning would make our lives much easier. So if we fix this warning (seems trivial to fix) and backport it to 22.x branch, it would help us prevent bloating the upgrade PR even more and allow us to focus on real problems with the upgrade instead. WDYT? |
We will accept a patch and cherry pix for this, but it can break again without any notice. |
What do we mean by "fix" here? I think the fix the protobuf team wants is for this warning to be explicitly excluded in this file: https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/port_def.inc. Would that work for grpc? |
I think whatever makes the "unused parameter" errors go away works This is one of our builds that uses strict warnings (and has the broadest scope among all of them I htink). You can run the build on glinux at https://github.com/jtattermusch/grpc/tree/repro_protobuf_12313
It should reproduce the error as mentioned above. |
Simplified repro is |
This fixes #12313 PiperOrigin-RevId: 520052990
Closes #12313 PiperOrigin-RevId: 520052990
Closes protocolbuffers#12313 PiperOrigin-RevId: 520066451
* Suppress -Wunused-parameter warning for GCC and clang. Closes #12313 PiperOrigin-RevId: 520066451 * Remove unintended cherrypicked line
I'm building on MacOS as part of the grpc bazel build. I'm getting this error:
https://source.cloud.google.com/results/invocations/7bed9dcc-9f09-410f-a4cd-443267f9af94/log
Canonical bazel command:
bazel --max_idle_secs=10800 --noshutdown_on_low_sys_mem --connect_timeout_secs=30 --output_user_root=/var/tmp/_bazel_kbuilder --output_base=/private/var/tmp/_bazel_kbuilder/56f0bf568ea4b00a9aa3000e432900f1 --failure_detail_out=/private/var/tmp/_bazel_kbuilder/56f0bf568ea4b00a9aa3000e432900f1/failure_detail.rawproto --expand_configs_in_place --idle_server_tasks --write_command_log --nowatchfs --nofatal_event_bus_exceptions --nowindows_enable_symlinks --client_debug=false --host_jvm_args=-Djava.net.preferIPv6Addresses=true --host_jvm_args=-Dbazel.DigestFunction=SHA256 --ignore_all_rc_files test --enable_platform_specific_config --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --jvmopt=-Djava.net.preferIPv6Addresses --copt=-DGRPC_BAZEL_BUILD --host_copt=-DGRPC_BAZEL_BUILD --action_env=GRPC_BAZEL_RUNTIME=1 --define=use_fast_cpp_protos=true --invocation_id=7bed9dcc-9f09-410f-a4cd-443267f9af94 --workspace_status_command=tools/remote_build/workspace_status_kokoro.sh --remote_instance_name=projects/grpc-testing/instances/default_instance --auth_enabled=true --remote_cache=grpcs://remotebuildexecution.googleapis.com --bes_backend=grpcs://buildeventservice.googleapis.com --bes_timeout=600s --bes_results_url=https://source.cloud.google.com/results/invocations/ --project_id=grpc-testing --test_tag_filters=-no_mac --build_tag_filters=-no_mac --define=use_strict_warning=true --dynamic_mode=off --verbose_failures=true --test_output=errors --test_env=GRPC_VERBOSITY=debug --google_credentials=/tmpfs/src/gfile/GrpcTesting-d0eeee2db331.json --remote_upload_local_results=true --remote_default_exec_properties=grpc_cache_silo_key1=83d8e488-1ca9-40fd-929e-d37d13529c99 --remote_default_exec_properties=grpc_cache_silo_key2=20221213-1155monterey-MacService --config=opt --compilation_mode=opt --copt=-Wframe-larger-than=16384 -- //test/...
I'm building on MacOS monterey (standard kokoro worker)
The text was updated successfully, but these errors were encountered: