open-telemetry / open-telemetry/opentelemetry-cpp

1.15.0 release build failed to build with protobuf 26.1

Open
#2,643 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale triage/needs-information
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log
/opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DPROTOBUF_USE_DLLS -Dopentelemetry_proto_EXPORTS -I/tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto -I/tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/api/include -I/tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/sdk/include -I/tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/sdk -I/tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/ext/include -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -fPIC -Wno-error=deprecated-declarations -Wno-type-limits -Wno-deprecated-declarations -Wno-unused-parameter -MD -MT CMakeFiles/opentelemetry_proto.dir/generated/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc.o -MF CMakeFiles/opentelemetry_proto.dir/generated/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc.o.d -o CMakeFiles/opentelemetry_proto.dir/generated/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc.o -c /tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/collector/trace/v1/trace_service.pb.cc
In file included from /tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.cc:5:
In file included from /tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:23:
In file included from /opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:23:
In file included from /opt/homebrew/include/google/protobuf/parse_context.h:27:
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:44:33: error: no type named 'InternalVisibility' in namespace 'google::protobuf::internal'
  ImplicitWeakMessage(internal::InternalVisibility, Arena* arena)
                      ~~~~~~~~~~^
In file included from /tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.cc:5:
In file included from /tmp/opentelemetry-cpp-20240422-40679-8q5ewu/opentelemetry-cpp-1.15.0/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/resource/v1/resource.pb.h:23:
In file included from /opt/homebrew/include/google/protobuf/generated_message_tctable_decl.h:23:
In file included from /opt/homebrew/include/google/protobuf/parse_context.h:27:
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:44:33: error: no type named 'InternalVisibility' in namespace 'google::protobuf::internal'
  ImplicitWeakMessage(internal::InternalVisibility, Arena* arena)
                      ~~~~~~~~~~^
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:59:9: error: unknown type name 'ClassData'
  const ClassData* GetClassData() const final {
        ^
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:74:40: error: non-virtual member function marked 'override' hides virtual member function
  MessageLite* New(Arena* arena) const override {
                                       ^
/opt/homebrew/include/google/protobuf/message_lite.h:83:24: note: hidden overloaded virtual function 'google::protobuf::MessageLite::New' declared here: different number of parameters (0 vs 1)
  virtual MessageLite* New() const = 0;
                       ^
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:59:9: error: unknown type name 'ClassData'
  const ClassData* GetClassData() const final {
        ^
/opt/homebrew/include/google/protobuf/implicit_weak_message.h:74:40: error: non-virtual member function marked 'override' hides virtual member function
  MessageLite* New(Arena* arena) const override {
                                       ^
/opt/homebrew/include/google/protobuf/message_lite.h:83:24: note: hidden overloaded virtual function 'google::protobuf::MessageLite::New' declared here: different number of parameters (0 vs 1)
  virtual MessageLite* New() const = 0;
                       ^

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8775690834/job/24083917227?pr=169703
relates to Homebrew/homebrew-core#169703

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the 1.15.0 release build on macOS with protobuf 26.1, starting from the generated third_party/opentelemetry-proto sources and the reported protobuf headers such as implicit_weak_message.h. Compare the generated code and dependency versions to identify the compatibility failure; done means the release builds successfully with that protobuf version.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.