Repository: tensorflow
Issue: Unable to build tensorflow-lite-select-ops.aar for tf 2.16
Labels: stat:awaiting tensorflower,type:build/install,subtype: ubuntu/linux,TF 2.16

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

TF 2.16.1

### Custom code

No

### OS platform and distribution

Ubuntu 20.04

### Mobile device

Android

### Python version

3.11

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Getting build errors when building tensorflow lite 2.16.

```
ERROR: /host_dir/tensorflow-2.16.1/tmp/BUILD:19:28: Linking tmp/libtensorflowlite_flex_jni.so failed: (Exit 1): clang failed: error executing command (from target //tmp:libtensorflowlite_flex_jni.so) external/androidndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang @bazel-out/android-armeabi-v7a-opt/bin/tmp/libtensorflowlite_flex_jni.so-2.params
ld.lld: error: undefined symbol: google::protobuf::Message::DebugString() const
>>> referenced by function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/0/function_ops.pic.o:(std::__ndk1::__function::__func<tensorflow::$_0, std::__ndk1::allocator<tensorflow::$_0>, absl::lts_20230802::Status (tensorflow::shape_inference::InferenceContext*)>::operator()(tensorflow::shape_inference::InferenceContext*&&))
>>> referenced by function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/0/function_ops.pic.o:(std::__ndk1::__function::__func<tensorflow::$_0, std::__ndk1::allocator<tensorflow::$_0>, absl::lts_20230802::Status (tensorflow::shape_inference::InferenceContext*)>::operator()(tensorflow::shape_inference::InferenceContext*&&))
>>> referenced by function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/0/function_ops.pic.o:(std::__ndk1::__function::__func<tensorflow::$_0, std::__ndk1::allocator<tensorflow::$_0>, absl::lts_20230802::Status (tensorflow::shape_inference::InferenceContext*)>::operator()(tensorflow::shape_inference::InferenceContext*&&))
>>> referenced 36 more times

ld.lld: error: undefined symbol: google::protobuf::internal::kGlobalEmptyTable
>>> referenced by partitioned_function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/partitioned_function_ops.pic.o:(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::Map(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue> const&))
>>> referenced by optimized_function_graph_info.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/optimized_function_graph_info.pic.o:(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >::Map<std::__ndk1::__hash_map_const_iterator<std::__ndk1::__hash_const_iterator<std::__ndk1::__hash_node<std::__ndk1::__hash_value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, void*>*> > >(std::__ndk1::__hash_map_const_iterator<std::__ndk1::__hash_const_iterator<std::__ndk1::__hash_node<std::__ndk1::__hash_value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, void*>*> > const&, std::__ndk1::__hash_map_const_iterator<std::__ndk1::__hash_const_iterator<std::__ndk1::__hash_node<std::__ndk1::__hash_value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, void*>*> > const&))
>>> referenced by optimized_function_graph_info.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/optimized_function_graph_info.pic.o:(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >::Map(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > const&))
>>> referenced 125 more times

ld.lld: error: undefined symbol: google::protobuf::Arena::AllocateAlignedWithHookForArray(unsigned int, std::type_info const*)
>>> referenced by partitioned_function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/partitioned_function_ops.pic.o:(google::protobuf::Arena::AllocateAlignedWithHookForArray(unsigned int, unsigned int, std::type_info const*))
>>> referenced by partitioned_function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/partitioned_function_ops.pic.o:(google::protobuf::Arena::AllocateAlignedWithHookForArray(unsigned int, unsigned int, std::type_info const*))
>>> referenced by kernel.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/lite/delegates/flex/_objs/delegate_only_runtime/kernel.pic.o:(std::__ndk1::pair<google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::InnerMap::iterator_base<google::protobuf::MapPair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue> >, bool> google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::InnerMap::TryEmplaceInternal<char const (&) [25]>(char const (&) [25]))

ld.lld: error: undefined symbol: google::protobuf::internal::ThreadSafeArena::AddCleanup(void*, void (*)(void*))
>>> referenced by partitioned_function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/partitioned_function_ops.pic.o:(void google::protobuf::Arena::RegisterDestructorInternal<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*, google::protobuf::Arena*, std::__ndk1::integral_constant<bool, false>))
>>> referenced by kernel.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/lite/delegates/flex/_objs/delegate_only_runtime/kernel.pic.o:(std::__ndk1::pair<google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::InnerMap::iterator_base<google::protobuf::MapPair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue> >, bool> google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::InnerMap::TryEmplaceInternal<char const (&) [25]>(char const (&) [25]))
>>> referenced by feature.pb.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/example/_objs/example_protos_cc_impl/feature.pb.pic.o:(tensorflow::Features::Features(google::protobuf::Arena*, bool))
>>> referenced 71 more times

ld.lld: error: undefined symbol: google::protobuf::Arena::AllocateAlignedWithCleanup(unsigned int, std::type_info const*)
>>> referenced by partitioned_function_ops.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/partitioned_function_ops.pic.o:(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::AttrValue>::InnerMap::TreeConvert(unsigned int))
>>> referenced by feature_util.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/feature_util.pic.o:(google::protobuf::Map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, tensorflow::Feature>::InnerMap::TreeConvert(unsigned int))
>>> referenced by function.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/0/function.pic.o:(google::protobuf::internal::StringTypeHandler::New(google::protobuf::Arena*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&&))
>>> referenced 59 more times

ld.lld: error: undefined symbol: google::protobuf::internal::RepeatedPtrFieldBase::AddOutOfLineHelper(void*)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedPtrField<tensorflow::SavedSliceMeta>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<tensorflow::SavedSliceMeta>::TypeHandler>(google::protobuf::RepeatedPtrField<tensorflow::SavedSliceMeta>::TypeHandler::Type const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedPtrField<tensorflow::TensorSliceProto>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<tensorflow::TensorSliceProto>::TypeHandler>(google::protobuf::RepeatedPtrField<tensorflow::TensorSliceProto>::TypeHandler::Type const*))
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(google::protobuf::RepeatedPtrField<tensorflow::data::CompressedComponentMetadata>::TypeHandler::Type* google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<tensorflow::data::CompressedComponentMetadata>::TypeHandler>(google::protobuf::RepeatedPtrField<tensorflow::data::CompressedComponentMetadata>::TypeHandler::Type const*))
>>> referenced 85 more times

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<unsigned long long>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<unsigned long long>::Add<unsigned long long const*>(unsigned long long const*, unsigned long long const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<unsigned long long>::FastAdderImpl<0, true>::Add(unsigned long long))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<long long>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<long long>::Add<long long const*>(long long const*, long long const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<long long>::FastAdderImpl<0, true>::Add(long long))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<unsigned int>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<unsigned int>::Add<unsigned int const*>(unsigned int const*, unsigned int const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<unsigned int>::FastAdderImpl<0, true>::Add(unsigned int))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<int>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<int>::Add<unsigned short const*>(unsigned short const*, unsigned short const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<int>::FastAdderImpl<0, true>::Add(int))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<int>::Add<short const*>(short const*, short const*))
>>> referenced 8 more times

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<float>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<float>::Add<float const*>(float const*, float const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<float>::FastAdderImpl<0, true>::Add(float))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<double>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<double>::Add<double const*>(double const*, double const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<double>::FastAdderImpl<0, true>::Add(double))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<bool>::Reserve(int)
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(void google::protobuf::RepeatedField<bool>::Add<bool const*>(bool const*, bool const*))
>>> referenced by save_restore_tensor.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/save_restore_tensor.pic.o:(google::protobuf::RepeatedField<bool>::FastAdderImpl<0, true>::Add(bool))

ld.lld: error: undefined symbol: google::protobuf::MessageLite::AppendToString(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*) const
>>> referenced by tensor_list.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/tensor_list.pic.o:(tensorflow::TensorList::Encode(tensorflow::VariantTensorData*) const)
>>> referenced by tensor_coding.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/tensor_coding.pic.o:(tensorflow::port::StringListEncoderImpl::Append(google::protobuf::MessageLite const&))

ld.lld: error: undefined symbol: google::protobuf::MessageLite::ParseFromString(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)
>>> referenced by tensor_list.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/tensor_list.pic.o:(tensorflow::TensorList::Decode(tensorflow::VariantTensorData const&))
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(tensorflow::data::UncompressElement(tensorflow::data::CompressedElement const&, std::__ndk1::vector<tensorflow::Tensor, std::__ndk1::allocator<tensorflow::Tensor> >*))
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(bool tensorflow::DecodeVariantImpl<tensorflow::data::CompressedElement>(tensorflow::VariantTensorData, tensorflow::TypeResolver<tensorflow::data::CompressedElement, false, false, true>, tensorflow::data::CompressedElement*))
>>> referenced 11 more times

ld.lld: error: undefined symbol: google::protobuf::MessageLite::SerializeToArray(void*, int) const
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(tensorflow::data::CompressElement(std::__ndk1::vector<tensorflow::Tensor, std::__ndk1::allocator<tensorflow::Tensor> > const&, tensorflow::data::CompressedElement*))

ld.lld: error: undefined symbol: google::protobuf::RepeatedField<unsigned long long>::Add(unsigned long long const&)
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(tensorflow::data::CompressedComponentMetadata::_internal_add_uncompressed_bytes(unsigned long long))
>>> referenced by tensor.pb_text.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/tensor.pb_text.pic.o:(tensorflow::TensorProto::_internal_add_uint64_val(unsigned long long))
>>> referenced by graph_debug_info_builder.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/graph_debug_info_builder.pic.o:(tensorflow::GraphDebugInfo_StackTrace::_internal_add_frame_id(unsigned long long))
>>> referenced 1 more times

ld.lld: error: undefined symbol: google::protobuf::internal::ArenaStringPtr::Mutable(google::protobuf::Arena*)
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(tensorflow::data::CompressedElement::_internal_mutable_data())
>>> referenced by dataset_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/dataset_utils.pic.o:(tensorflow::NodeDef::_internal_mutable_device())
>>> referenced by attr_value.pb_text.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/attr_value.pb_text.pic.o:(tensorflow::AttrValue::_internal_mutable_s())
>>> referenced 66 more times

ld.lld: error: undefined symbol: google::protobuf::Message::GetTypeName() const
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(tensorflow::Variant::Value<tensorflow::data::CompressedElement>::TypeName() const)
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(void tensorflow::EncodeVariant<tensorflow::data::CompressedElement>(tensorflow::data::CompressedElement const&, tensorflow::VariantTensorData*))
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(void tensorflow::EncodeVariant<tensorflow::data::CompressedElement>(tensorflow::data::CompressedElement const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*))
>>> referenced 290 more times

ld.lld: error: undefined symbol: google::protobuf::MessageLite::SerializeToString(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*) const
>>> referenced by compression_utils.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tmp/_objs/custom_tensorflowlite_flex_flex_delegate_tensorflow_lib/compression_utils.pic.o:(void tensorflow::EncodeVariantImpl<tensorflow::data::CompressedElement>(tensorflow::data::CompressedElement const&, tensorflow::TypeResolver<tensorflow::data::CompressedElement, false, false, true>, tensorflow::VariantTensorData*))
>>> referenced by variant.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/variant.pic.o:(.text._ZN10tensorflow13EncodeVariantINS_22VariantTensorDataProtoEEEvRKT_PNSt6__ndk112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE+0x0)
>>> referenced by variant_tensor_data.cc
>>>               bazel-out/android-armeabi-v7a-opt/bin/tensorflow/core/_objs/portable_tensorflow_lib_lite/variant_tensor_data.pic.o:(tensorflow::VariantTensorData::SerializeToString(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >*))
>>> referenced 3 more times

ld.lld: 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)
Target //tmp:tensorflow-lite-select-tf-ops failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1652.863s, Critical Path: 470.96s
INFO: 17918 processes: 1284 internal, 16634 local.
FAILED: Build did NOT complete successfully
```

### Standalone code to reproduce the issue

```shell
- Using docker setup from this tutorial https://www.tensorflow.org/lite/android/lite_build

wget https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.zip
unzip v2.16.1.zip
cd tensorflow-v2.16.1/tensorflow/lite/tools
docker build . -t tflite-builder -f tflite-android.Dockerfile
cd ../../../
docker run -it -v $PWD:/host_dir tflite-builder bash
sdkmanager \
  "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
  "platform-tools" \
  "platforms;android-${ANDROID_API_LEVEL}"
./configure
tensorflow/lite/tools/build_aar.sh \
  --input_models=/host_dir/model.tflite \
   --target_archs=arm64-v8a,armeabi-v7a
```
```


### Relevant log output

_No response_