DeepSpeech icon indicating copy to clipboard operation
DeepSpeech copied to clipboard

build libdeepspeech.so failed for iOS

Open Boya-Na opened this issue 1 year ago • 1 comments

Hello,

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS with 14.4.1 (Apple M1 CPU)
  • TensorFlow installed from (our builds, or upstream TensorFlow): deepspeech builds
  • TensorFlow version (use command below): r2.3 (I guess, use default for deepspech 0.9.3)
  • Python version: 3.9.5
  • Bazel version (if compiling from source): 3.1.0
  • GCC/Compiler version (if compiling from source): c++ 11
  • Exact command to reproduce: bazel build --host_force_python=PY3 --config=ios_arm64 --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt //native_client:deepspeech_ios --define=runtime=tflite --copt=-DTFLITE_WITH_RUY_GEMV

I complie the libdeepspeech.so for follow iOS static build pipeline, and the log shows error:

ERROR: /private/var/tmp/_bazel_boya/9a5aece3aeba2110be2677b43cdd998b/external/local_config_cc/BUILD:48:1: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'ios_arm64'
ERROR: Analysis of target '//native_client:deepspeech_ios' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 2.090s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (4 packages loaded, 32 targets configured)

Building Android library is worked and the command was also worked before about the half of year (2023.06). I also tried the command bazel clean --expunge and it is not worked

My iOS SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

Are there suggestion for helping this error?

Thanks so much!

Boya-Na avatar Apr 30 '24 08:04 Boya-Na

why u want to build a ".so" for iOS? ".so" is elf format that used in linux kernel. iOS is not linux, iOS or macOS need a ".dylib" instead of ".so"

p2kyc0ng avatar Jun 28 '24 03:06 p2kyc0ng