Caldarie / flutter_tflite_audio

Audio classification Tflite package for flutter (iOS & Android). Can support Google Teachable Machine models
MIT License
64 stars 26 forks source link

iOS build error (Solved. Pinned for reference) #25

Closed zxl777 closed 2 years ago

zxl777 commented 2 years ago

The solution may be here https://github.com/tensorflow/tensorflow/issues/52042

Build Error

duplicate symbol '_TfLiteXNNPackDelegateCreate' in:
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteSelectTfOps/Frameworks/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps(xnnpack_delegate.o)
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC
duplicate symbol '_TfLiteXNNPackDelegateDelete' in:
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteSelectTfOps/Frameworks/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps(xnnpack_delegate.o)
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC
duplicate symbol '_TfLiteXNNPackDelegateGetThreadPool' in:
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteSelectTfOps/Frameworks/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps(xnnpack_delegate.o)
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC
duplicate symbol '_TfLiteXNNPackDelegateOptionsDefault' in:
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteSelectTfOps/Frameworks/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps(xnnpack_delegate.o)
    /Users/sky/Downloads/flutter_tflite_audio-master/example/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC
ld: 4 duplicate symbols for architecture arm64
Caldarie commented 2 years ago

hi @zxl777

Thanks for searching up the issue for me.

I am having difficulties reproducing the issue. May i ask whether you get the same error on the example from this repository?

Also looking at the link that you have provided, it seems that force loading is a potential solution. In that case, have you tried following the instructions from here?

zxl777 commented 2 years ago

Change to this to work. pod'TensorFlowLiteSelectTfOps','~> 2.6.0'

Caldarie commented 2 years ago

Awesome! I will keep this issue open for others to see.

Once again, many thanks for investigating this issue.

bdytx5 commented 2 years ago

See https://github.com/tensorflow/tensorflow/issues/52042