0

I want to build a framework for iOS so that I can run inference in C++ on both Android and iOS via Flutter.

So far I have managed to compile the libs for Android and succesfully loaded a model on my simulator.

Unfortunately I have not managed to build the framework for iOS. This is the command I run

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

I have tried both master and v2.18.1. I have tried bazel clean --expunge and then ./configure where I only configure for ios.

The error I get is:

/private/var/tmp/_bazel_/e9b99aa5e7fc3acc8b3389554a922f98/external/flatbuffers/src/BUILD.bazel:19:11: 
Compiling src/code_generators.cpp [for tool] failed: (Aborted): wrapped_clang_pp failed: error executing 
command (from target @flatbuffers//src:code_generators) 
external/local_config_cc/wrapped_clang_pp '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics 
-Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG 

dyld[32985]: missing LC_UUID load command in /private/var/tmp/_bazel_/e9b99aa5e7fc3acc8b3389554a922f98/
external/local_config_cc/wrapped_clang
dyld[32985]: missing LC_UUID load command
Target //tensorflow/lite/ios:TensorFlowLiteC_static_framework failed to build

There seems to be an updated version called LiteRT, but I have not found out if it is possible to compile C/C++ libs for Android and iOS yet.

I haven't seen this sort of error before. When I search for LC_UUID I only find posts about Golang.

I have made sure I use clang from XCode and not homebrew. No success so far.

1
  • This seems build system-specific. I don't know about bazel beyond not liking it, but just looking up "missing LC_UUID" gave me this recent issue github.com/bazelbuild/bazel/issues/27026, that might help you. Commented Oct 14 at 14:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.