Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS does not build on x86 Simulators #35

Open
mrousavy opened this issue Jan 31, 2024 · 3 comments
Open

iOS does not build on x86 Simulators #35

mrousavy opened this issue Jan 31, 2024 · 3 comments

Comments

@mrousavy
Copy link
Owner

On iOS, we currently build TensorFlowLiteC from source. This builds a fat iOS binary:

bazel build --config=ios_fat -c opt --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteC_framework
bazel build --config=ios_fat -c opt --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteCCoreML_framework

..for some reason users have reported that this does not work when running the app on an iOS Simulator on a Intel x86 Mac.

I don't have such Mac anymore, but I am not sure what's going wrong - maybe there is a way to also build for x86?

@eedeebee
Copy link

eedeebee commented Mar 7, 2024

Hey thanks for this project!

I am seeing a similar build failure on an M2 (pro) mac as well that seems related and separately I have an Intel based mac (i9) and it is able to build for an IOS simulator just fine. I can build for physical device no problem on both.

here's the error message from the build on an iPhone 15 Pro Max simulator on the M2 mac; perhaps there is a caching issue?

Building for iOS Simulator, but linking in object file built for iOS, file '/Users/XXX/Repos/notewize-player/node_modules/react-native-fast-tflite/ios/TensorFlowLiteC.framework/TensorFlowLiteC' for architecture arm64

I can paste up more of the build log if that is helpful!

I'm happy to help debug if you can give me any pointers as to where to start or look.

@mrousavy
Copy link
Owner Author

mrousavy commented Mar 7, 2024

Honestly not sure why this is failing, might be interesting to see if TFLite works for Simulators or if they have some patches for that.

@movila
Copy link

movila commented Mar 14, 2024

I got similar error as follow ld: building for 'iOS-simulator', but linking in object file (/Users/XXX/rn-test/node_modules/react-native-fast-tflite/ios/TensorFlowLiteC.framework/TensorFlowLiteC) built for 'iOS'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants