Skip to content
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

Build results in Protobuf errors #37266

Open
Jenkins-J opened this issue Nov 20, 2024 · 1 comment
Open

Build results in Protobuf errors #37266

Jenkins-J opened this issue Nov 20, 2024 · 1 comment
Labels
question Questions that are neither investigations, bugs, nor enhancements

Comments

@Jenkins-J
Copy link
Contributor

Title: Building envoy results in protobuf compile errors

Description:
When attempting to build envoy, the build fails with the below errors related to protobuf.
bazel build --subcommands --cpu=ppc --sandbox_debug --action_env=CC=clang-14 --action_env=CXX=clang++-14 --linkopt=-fuse-ld=lld-14 --verbose_failures --define=boringssl=fips //source/exe:envoy-static

In file included from external/com_google_protobuf/src/google/protobuf/util/field_mask_util.cc:8:
In file included from bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/util/_virtual_includes/field_mask_util/google/protobuf/util/field_mask_util.
h:17:
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:166:3: e
rror: unknown type name 'PROTOBUF_ATTRIBUTE_REINITIALIZES'
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:173:29:
error: only virtual member functions can be marked 'final'
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
                            ^~~~~~
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:178:38:
error: only virtual member functions can be marked 'final'
  void SetCachedSize(int size) const final;
                                     ^~~~~
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:92:9: 
error: use of undeclared identifier 'GetOwningArena'
    if (GetOwningArena() == from.GetOwningArena()
        ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:92:34: 
error: no member named 'GetOwningArena' in 'google::protobuf::FieldMask'
    if (GetOwningArena() == from.GetOwningArena()
                            ~~~~ ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:139:9: 
error: use of undeclared identifier 'GetOwningArena'
    if (GetOwningArena() == other->GetOwningArena()) {
        ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:139:36: 
error: no member named 'GetOwningArena' in 'google::protobuf::FieldMask'
    if (GetOwningArena() == other->GetOwningArena()) {
                            ~~~~~  ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:148:17: 
error: use of undeclared identifier 'GetOwningArena'
    ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
                ^
bazel-out/ppc-opt-exec-ST-d57f47055a04/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/field_mask_proto/google/protobuf/field_mask.pb.h:148:44: 
error: no member named 'GetOwningArena' in 'google::protobuf::FieldMask'
    ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
                                    ~~~~~  ^

All of the errors appear to be in a file (field_mask.pb.h) that is generated by the protobuf build process:

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/field_mask.proto

Using bazel query, I've found the dependency path to the failing protobuf target:

//source/exe:envoy-static
//source/exe:envoy_main_entry_lib
//source/server:options_lib
@envoy_api//envoy/admin/v3:pkg_cc_proto
@com_google_protobuf//:protobuf
@com_google_protobuf//src/google/protobuf:protobuf_layering_check_legacy
@com_google_protobuf//src/google/protobuf/util:field_mask_util

Envoy version (from VERSION.txt): 1.32.0-dev

Any information would be helpful.
Thank you

@Jenkins-J Jenkins-J added the triage Issue requires triage label Nov 20, 2024
@soulxu
Copy link
Member

soulxu commented Nov 21, 2024

cc @phlax

@soulxu soulxu added question Questions that are neither investigations, bugs, nor enhancements and removed triage Issue requires triage labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements
Projects
None yet
Development

No branches or pull requests

2 participants