open-telemetry / open-telemetry/opentelemetry-cpp

Getting ld: error: undefined symbol: google::protobuf::internal::ArenaStringPtr::Set while cross-compiling

Open
#2,201 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi
I am getting linking error while trying to cross-compile opentelemetry for android platform when OTLP_HTTP is set to true.
Installed protobuf version 3.21.12 using homebrew on my mac.
Sharing the options set on cmake command

    -DWITH_STL=ON \
    -DWITH_OTLP_HTTP=ON \
    -DProtobuf_USE_STATIC_LIBS=ON \
    -DPROTOBUF_PROTOC_EXECUTABLE=/usr/local/Cellar/protobuf@21/21.12/bin/protoc \
    -DProtobuf_PROTOC_LIBRARY=/usr/local/Cellar/protobuf@21/21.12/lib/libprotoc.a \
    -DProtobuf_LIBRARY=/usr/local/Cellar/protobuf@21/21.12/lib/libprotobuf.a \
    -DProtobuf_LITE_LIBRARY=/usr/local/Cellar/protobuf@21/21.12/lib/libprotobuf-lite.a \
    -DProtobuf_INCLUDE_DIR=/usr/local/Cellar/protobuf@21/21.12/include \
[ 95%] Linking CXX static library libopentelemetry_exporter_ostream_metrics.a
[ 95%] Built target opentelemetry_exporter_ostream_metrics
[ 96%] Linking CXX static library libopentelemetry_exporter_otlp_http_metric.a
[ 96%] Built target opentelemetry_exporter_otlp_http_metric
[ 97%] Linking CXX static library libopentelemetry_exporter_otlp_http.a
[ 97%] Built target opentelemetry_exporter_otlp_http
[ 98%] Building CXX object functional/otlp/CMakeFiles/func_otlp_http.dir/func_http_main.cc.o
[100%] Linking CXX executable func_otlp_http
ld: error: undefined symbol: google::protobuf::internal::ArenaStringPtr::Set(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&&, google::protobuf::Arena*)
>>> referenced by trace.pb.h:2569 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.h:2569)
>>>               otlp_recordable.cc.o:(opentelemetry::v1::exporter::otlp::OtlpRecordable::SetIdentity(opentelemetry::v1::trace::SpanContext const&, opentelemetry::v1::trace::SpanId)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by trace.pb.h:2358 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/trace/v1/trace.pb.h:2358)
>>>               otlp_recordable.cc.o:(opentelemetry::v1::exporter::otlp::OtlpRecordable::AddLink(opentelemetry::v1::trace::SpanContext const&, opentelemetry::v1::common::KeyValueIterable const&)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a

ld: error: undefined symbol: google::protobuf::internal::ArenaStringPtr::Set(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, google::protobuf::Arena*)
>>> referenced by common.pb.h:1744 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:1744)
>>>               otlp_recordable.cc.o:(opentelemetry::v1::exporter::otlp::OtlpRecordable::GetProtoInstrumentationScope() const) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by common.pb.h:1794 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:1794)
>>>               otlp_recordable.cc.o:(opentelemetry::v1::exporter::otlp::OtlpRecordable::GetProtoInstrumentationScope() const) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by arenastring.h:429 (/usr/local/Cellar/protobuf@21/21.12/include/google/protobuf/arenastring.h:429)
>>>               otlp_recordable.cc.o:(google::protobuf::internal::ArenaStringPtr::SetBytes(void const*, unsigned int, google::protobuf::Arena*)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced 22 more times

ld: error: undefined symbol: google::protobuf::internal::RepeatedPtrFieldBase::AddOutOfLineHelper(void*)
>>> referenced by repeated_ptr_field.h:218 (/usr/local/Cellar/protobuf@21/21.12/include/google/protobuf/repeated_ptr_field.h:218)
>>>               otlp_recordable.cc.o:(google::protobuf::RepeatedPtrField<opentelemetry::proto::common::v1::KeyValue>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<opentelemetry::proto::common::v1::KeyValue>::TypeHandler>(google::protobuf::RepeatedPtrField<opentelemetry::proto::common::v1::KeyValue>::TypeHandler::Type const*)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by repeated_ptr_field.h:218 (/usr/local/Cellar/protobuf@21/21.12/include/google/protobuf/repeated_ptr_field.h:218)
>>>               otlp_recordable.cc.o:(google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Event>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Event>::TypeHandler>(google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Event>::TypeHandler::Type const*)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by repeated_ptr_field.h:218 (/usr/local/Cellar/protobuf@21/21.12/include/google/protobuf/repeated_ptr_field.h:218)
>>>               otlp_recordable.cc.o:(google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Link>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Link>::TypeHandler>(google::protobuf::RepeatedPtrField<opentelemetry::proto::trace::v1::Span_Link>::TypeHandler::Type const*)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced 4 more times

ld: error: undefined symbol: google::protobuf::internal::fixed_address_empty_string
>>> referenced by common.pb.h:0 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:0)
>>>               otlp_populate_attribute_utils.cc.o:(void opentelemetry::proto::common::v1::AnyValue::set_string_value<char const* const&>(char const* const&)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by common.pb.h:0 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:0)
>>>               otlp_populate_attribute_utils.cc.o:(void opentelemetry::proto::common::v1::AnyValue::set_string_value<char const*, unsigned int>(char const*&&, unsigned int)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced by common.pb.h:0 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/build/generated/third_party/opentelemetry-proto/opentelemetry/proto/common/v1/common.pb.h:0)
>>>               otlp_populate_attribute_utils.cc.o:(void opentelemetry::proto::common::v1::AnyValue::set_string_value<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&>(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)) in archive ../../exporters/otlp/libopentelemetry_otlp_recordable.a
>>> referenced 20 more times

ld: error: undefined symbol: google::protobuf::MessageLite::SerializeWithCachedSizesToArray(unsigned char*) const
>>> referenced by otlp_http_client.cc:472 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:472)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::OtlpHttpClient::createSession(google::protobuf::Message const&, std::__ndk1::function<bool (opentelemetry::v1::sdk::common::ExportResult)>&&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Message::Utf8DebugString() const
>>> referenced by otlp_http_client.cc:916 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:916)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::OtlpHttpClient::createSession(google::protobuf::Message const&, std::__ndk1::function<bool (opentelemetry::v1::sdk::common::ExportResult)>&&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::ListFields(google::protobuf::Message const&, std::__ndk1::vector<google::protobuf::FieldDescriptor const*, std::__ndk1::allocator<google::protobuf::FieldDescriptor const*> >*) const
>>> referenced by otlp_http_client.cc:449 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:449)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::FieldSize(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:551 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:551)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetRepeatedInt32(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, int) const
>>> referenced by otlp_http_client.cc:558 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:558)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetInt32(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:486 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:486)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetInt64(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:492 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:492)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetUInt32(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:496 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:496)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetUInt64(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:502 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:502)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetDouble(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:525 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:525)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetFloat(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:529 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:529)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetBool(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:533 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:533)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetEnumValue(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
>>> referenced by otlp_http_client.cc:537 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:537)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetStringReference(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*) const
>>> referenced by otlp_http_client.cc:510 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:510)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a
>>> referenced by otlp_http_client.cc:515 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:515)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetMessage(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*) const
>>> referenced by otlp_http_client.cc:521 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:521)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: undefined symbol: google::protobuf::Reflection::GetRepeatedInt64(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*, int) const
>>> referenced by otlp_http_client.cc:569 (/Users/kaustubh.dandekar/workspace/telemetry/csl-third-party/build/opentelemetry/exporters/otlp/src/otlp_http_client.cc:569)
>>>               otlp_http_client.cc.o:(opentelemetry::v1::exporter::otlp::(anonymous namespace)::ConvertGenericMessageToJson(nlohmann::json_abi_v3_11_2::basic_json<std::__ndk1::map, std::__ndk1::vector, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, bool, long long, unsigned long long, double, std::__ndk1::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::__ndk1::vector<unsigned char, std::__ndk1::allocator<unsigned char> > >&, google::protobuf::Message const&, opentelemetry::v1::exporter::otlp::OtlpHttpClientOptions const&)) in archive ../../exporters/otlp/libopentelemetry_exporter_otlp_http_client.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [functional/otlp/func_otlp_http] Error 1
make[1]: *** [functional/otlp/CMakeFiles/func_otlp_http.dir/all] Error 2
make: *** [all] Error 2

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

Start with the CMake options shown for the Android cross-compilation and the final func_otlp_http link step. Check how the selected protobuf libraries and generated trace.pb.h/common.pb.h are combined for the target; done means func_otlp_http links successfully without the reported protobuf undefined symbols.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.