Skip to content

[Build] Failure to build with "no matching function for call to 'StrongPointer()'" #16868

@veblush

Description

@veblush

What version of protobuf and what language are you using?

Protobuf commit 9f40411

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

Linux Debian 11 using Docker

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

gcc 12

What did you do?

Build protoc using cmake

What did you expect to see

Successful build

What did you see instead?

Build failure with log

[ 53%] Building CXX object third_party/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/extension_set_heavy.cc.o
In file included from /var/local/git/grpc/third_party/protobuf/src/google/protobuf/extension_set.h:34,
                 from /var/local/git/grpc/third_party/protobuf/src/google/protobuf/descriptor.h:56,
                 from /var/local/git/grpc/third_party/protobuf/src/google/protobuf/compiler/parser.h:24,
                 from /var/local/git/grpc/third_party/protobuf/src/google/protobuf/compiler/parser.cc:14:
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h: In instantiation of 'void google::protobuf::internal::StrongReferenceToType() [with T = google::protobuf::UninterpretedOption]':
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/message_lite.h:923:37:   required from 'const T* google::protobuf::DownCastToGenerated(const google::protobuf::MessageLite*) [with T = google::protobuf::UninterpretedOption]'
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/message_lite.h:933:29:   required from 'T* google::protobuf::DownCastToGenerated(google::protobuf::MessageLite*) [with T = google::protobuf::UninterpretedOption]'
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/compiler/parser.cc:1568:47:   required from here
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:72:43: error: no matching function for call to 'StrongPointer()'
   72 |   return StrongPointer();
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:43:36: note: candidate: 'template void google::protobuf::internal::StrongPointer(T*)'
   43 | inline PROTOBUF_ALWAYS_INLINE void StrongPointer(T* var) {
      |                                    ^~~~~~~~~~~~~
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:43:36: note:   template argument deduction/substitution failed:
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:72:43: error: wrong number of template arguments (2, should be 1)
   72 |   return StrongPointer();
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:43:36: note: provided for 'template void google::protobuf::internal::StrongPointer(T*)'
   43 | inline PROTOBUF_ALWAYS_INLINE void StrongPointer(T* var) {
      |                                    ^~~~~~~~~~~~~
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:54:36: note: candidate: 'template void google::protobuf::internal::StrongPointer()'
   54 | inline PROTOBUF_ALWAYS_INLINE void StrongPointer() {
      |                                    ^~~~~~~~~~~~~
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:54:36: note:   template argument deduction/substitution failed:
/var/local/git/grpc/third_party/protobuf/src/google/protobuf/port.h:72:43: error: could not convert template argument 'ptr' from 'const google::protobuf::UninterpretedOption& (* const)()' to 'const google::protobuf::UninterpretedOption& (* const)()'
   72 |   return StrongPointer();
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Anything else we should know about your project / environment

  • You can check the PR catching this issue; [Deps] Protobuf at head grpc/grpc#36626
  • This test is running under this docker image; us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_protoc_aarch64:be8fc962f6a27ce976abecbda3dd02be4be5683d@sha256:a0f6b544c1b2fa75f73b26cb28281917153304e9df2789e93de0732494e6b651

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions