mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Xcode: Duplicate Symbols (Conflicts with MLKit dependencies)

Open shindgewongxj opened this issue 1 year ago • 3 comments

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

iOS 14+

MediaPipe Tasks SDK version

0.10.12

Task name (e.g. Image classification, Gesture recognition etc.)

Vision

Programming Language and version (e.g. C++, Python, Java)

Swift

Describe the actual behavior

Failed to build or run

Describe the expected behaviour

Build Success

Standalone code/steps you may have used to try to get what you need

Pods:


target 'Project' do
  use_frameworks!
  pod 'GoogleMLKit/FaceDetection'
  pod 'MediaPipeTasksVision'
end


### Other info / Complete Logs

```shell
ld: <numbers> duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)

shindgewongxj avatar Apr 24 '24 09:04 shindgewongxj

Can you give us more details to investigate?

  1. The complete error message including a list of the duplicated symbols.
  2. Versions of GoogleMLKit and MediaPipeTasksVision installed from your Podfile.lock

priankakariat avatar May 03 '24 14:05 priankakariat

Thanks for your help, here's some additions!

Error Messeages:

  • 7313 duplicate symbols for architecturearm64
  • Linker command failed with exit code 1 (use -v to see invocation)

Some of duplicate symbols:

duplicate symbol 'google::protobuf::internal::WireFormatLite::EnumSize(google::protobuf::RepeatedField<int> const&)' in: 
    ProjectPath/Pods/MediaPipeTasksCommon/frameworks/graph_libraries/libMediaPipeTasksCommon_device_graph.a(wire_format_lite.o)
    Xcode/DerivedData/bxgztldalnfoeqcgjpzhxteijnxv/Build/Products/Debug-iphoneos/XCFrameworkIntermediates/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(wire_format_lite.o)
duplicate symbol 'google::protobuf::internal::WireFormatLite::SInt32Size(google::protobuf::RepeatedField<int> const&)' in:
    SamePath/libMediaPipeTasksCommon_device_graph.a(wire_format_lite.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(wire_format_lite.o)
duplicate symbol 'google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)' in:
    SamePath/libMediaPipeTasksCommon_device_graph.a(wire_format_lite.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(wire_format_lite.o)
duplicate symbol 'google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>**)' in:
    SamePath/libMediaPipeTasksCommon_device_graph.a(wire_format_lite.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(wire_format_lite.o)
duplicate symbol 'google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)' in:
    SamePath/MediaPipeTasksCommon/frameworks/graph_libraries/libMediaPipeTasksCommon_device_graph.a(wire_format_lite.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(wire_format_lite.o)
duplicate symbol 'mediapipe::tasks::AddPayload(absl::Status, std::__1::basic_string_view<char, std::__1::char_traits<char>>, mediapipe::tasks::MediaPipeTasksStatus)' in:
    SamePath/MediaPipeTasksCommon/frameworks/graph_libraries/libMediaPipeTasksCommon_device_graph.a(common.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(common.o)
duplicate symbol 'mediapipe::tasks::CreateStatusWithPayload(absl::StatusCode, std::__1::basic_string_view<char, std::__1::char_traits<char>>, mediapipe::tasks::MediaPipeTasksStatus)' in:
    SamePath/MediaPipeTasksCommon/frameworks/graph_libraries/libMediaPipeTasksCommon_device_graph.a(common.o)
    SamePath/MediaPipeTasksCommon/MediaPipeTasksCommon.framework/MediaPipeTasksCommon(common.o)

Podfile Frameworks:

target 'Project' do
  use_frameworks!
  pod 'GoogleMLKit/FaceDetection'
  pod 'MediaPipeTasksVision'
end

Dependencies:

Dependency Version
GTMSessionFetcher 3.4.1
GoogleDataTransport 9.4.1
GoogleMLKit 6.0.0
GoogleToolboxForMac 4.2.1
GoogleUtilities 7.13.2
MLImage 1.0.0-beta5
MLKitCommon 11.0.0
MLKitFaceDetection 5.0.0
MLKitVision 7.0.0
MediaPipeTasksCommon 0.10.13
MediaPipeTasksVision 0.10.13
PromisesObjC 2.4.0
nanopb 2.30910.0

shindgewongxj avatar May 06 '24 06:05 shindgewongxj