am15h / tflite_flutter_plugin

TensorFlow Lite Flutter Plugin
https://pub.dev/packages/tflite_flutter
Apache License 2.0
508 stars 353 forks source link

Conflict with tensorflowlitec.framework while trying to use this plugin with firebase_ml_custom #48

Open ricardochen opened 4 years ago

ricardochen commented 4 years ago

While trying to use this plugin with firebase_ml_custom to download models from firebase I get this error:

[!] The 'Pods-Runner' target has frameworks with conflicting names: tensorflowlitec.framework.

Any idea how to fix this? I already imported the plugin locally to work around the issue with the linking with pub.

Thanks.

am15h commented 4 years ago

You can change the rename the TensorFlowLiteC.framework folder to TFLiteFlutter.framework and similarly change https://github.com/am15h/tflite_flutter_plugin/blob/master/ios/tflite_flutter.podspec#L20 and https://github.com/am15h/tflite_flutter_plugin/blob/master/ios/tflite_flutter.podspec#L27 as well.

ricardochen commented 4 years ago

Hi, I did what you recommended but now I'm getting duplicate symbols, for example: duplicate symbol '_TfLiteTensorDataFree' in: /Users/ricardochen/Documents/GitHub/product_recognition/tflite_flutter_plugin-master/ios/TFLiteC.framework/TFLiteC(common_16c5e108d1d1bcacc04136cd10a98b4c.o) /Users/ricardochen/Documents/GitHub/product_recognition/productrecognition/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC(c_api_internal.o) duplicate symbol '_TfLiteTensorRealloc' in: /Users//Documents/GitHub//tflite_flutter_plugin-master/ios/TFLiteC.framework/TFLiteC(common_16c5e108d1d1bcacc04136cd10a98b4c.o) /Users//Documents/GitHub//imageclasfication/ios/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC(c_api_internal.o)

Uijeong97 commented 4 years ago

I have same problem. I tried many solutions, but I can't solve it..

am15h commented 4 years ago

firebase_ml_custom uses platform channels as compared to tflite_flutter using dart:ffi. So this error is a bit strange. I will need to take a deeper look to find a possible solution of using these two together. Moreover, can you please elaborate on why you want to use these together. Probably in future we can plan to support such use cases with tflite_flutter itself

ricardochen commented 4 years ago

firebase_ml_custom is for downloading custom models from firebase, which in the dependencies have firebase packages which have tensorflowtile.framework as a dependency.

mrka124 commented 3 years ago

@ricardochen how do you import package as local plugin to work around this issue?

acanturgut commented 3 years ago

Hey everyone! Any solution for this issue!

MATTYGILO commented 3 years ago

Has anyone fixed this yet

Aminatak commented 3 years ago

I'm facing the same issue, any update ?

fnoceda commented 3 years ago

Same problem here with tflite_flutter: ^0.9.0, firebase_core ^1.3.0, firebase_messaging ^10.0.3, any solution? please

fnoceda commented 3 years ago

You can change the rename the TensorFlowLiteC.framework folder to TFLiteFlutter.framework and similarly change https://github.com/am15h/tflite_flutter_plugin/blob/master/ios/tflite_flutter.podspec#L20 and https://github.com/am15h/tflite_flutter_plugin/blob/master/ios/tflite_flutter.podspec#L27 as well.

I try the @am15h solution, and clear my project, when i run pod install work, but when i build in xcode i get this error: ld: framework not found TFLiteFlutter any idea?

fnoceda commented 3 years ago

Finaly I make a empty project, and use these versions, I know this isn't a god practice, but i have a short dead line for this project, for now, work tflite_flutter: ^0.8.0 firebase_core: 1.1.1 firebase_messaging: 9.1.0 google_ml_kit: ^0.5.1

mrka124 commented 3 years ago

same as @fnoceda Has anyone fixed this yet?

Mmisiek commented 2 years ago

Same problem after adding TensofFlowLiteC.framewrk to pub-cache:

michal@Michals-MacBook-Pro~/Development/pest_scope/ios $ pod install
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_crashlytics: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_ml_custom: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_remote_config: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '8.7.0' defined in 'firebase_core'
Downloading dependencies
Installing TensorFlowLiteC (2.7.0)
Installing TensorFlowLiteSwift (2.7.0)
[!] The 'Pods-Runner' target has frameworks with conflicting names: tensorflowlitec.framework.