question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'@local_config_cc//:toolchain' does not contain a toolchain for cpu 'ios_arm64'

See original GitHub issue

System information

  • OS Platform and Distribution: macOS Big Sur
  • Target (e.g. desktop cpu, android arm64): ios arm64
  • Bazel version: 3.7.2
  • Python version: 3.9.7
  • GCC/G++ version: 10.3.0
  • Unity version: 2019.3.19
  • Xcode version (if building for iOS): 13.1

Describe the problem I can build the desktop cpu but when I’m going to build ios arm64, I got an error.

Steps to reproduce the issue cd Downloads/MediaPipeUnityPlugin-master python3 build.py build --ios arm64

Full logs

anny@AnnydeMacBook-Pro MediaPipeUnityPlugin-master % python3 build.py build --ios arm64
INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running `bazel build -c opt //mediapipe_api:mediapipe_proto_srcs`
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'rules_python' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'bazel_skylib' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
INFO: Build option --copt has changed, discarding analysis cache.
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 683 targets configured).
INFO: Found 1 target...
Target //mediapipe_api:mediapipe_proto_srcs up-to-date:
  bazel-bin/mediapipe_api/mediapipe_proto_srcs.zip
INFO: Elapsed time: 0.448s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
DEBUG (build.py): Unarchiving 'bazel-bin/mediapipe_api/mediapipe_proto_srcs.zip' to 'build/Scripts/Protobuf'...
INFO (build.py): Built protobuf sources
INFO (build.py): Downloading dlls...
DEBUG (build.py): Running `nuget install -o .nuget -Source https://api.nuget.org/v3/index.json`
Feeds used:
  /Users/anny/.nuget/packages/
  https://api.nuget.org/v3/index.json

/Users/anny/Downloads/MediaPipeUnityPlugin-master/packages.config 中列出的所有封裝均已安裝。
DEBUG (build.py): Copying '.nuget/System.Buffers.4.4.0/lib/netstandard2.0/System.Buffers.dll' to 'build/Plugins/Protobuf/System.Buffers.dll'...
DEBUG (build.py): Changing the mode of 'build/Plugins/Protobuf/System.Buffers.dll'...
DEBUG (build.py): Copying '.nuget/Google.Protobuf.3.15.6/lib/netstandard2.0/Google.Protobuf.dll' to 'build/Plugins/Protobuf/Google.Protobuf.dll'...
DEBUG (build.py): Changing the mode of 'build/Plugins/Protobuf/Google.Protobuf.dll'...
DEBUG (build.py): Copying '.nuget/System.Runtime.CompilerServices.Unsafe.4.5.2/lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll' to 'build/Plugins/Protobuf/System.Runtime.CompilerServices.Unsafe.dll'...
DEBUG (build.py): Changing the mode of 'build/Plugins/Protobuf/System.Runtime.CompilerServices.Unsafe.dll'...
DEBUG (build.py): Copying '.nuget/System.Memory.4.5.3/lib/netstandard2.0/System.Memory.dll' to 'build/Plugins/Protobuf/System.Memory.dll'...
DEBUG (build.py): Changing the mode of 'build/Plugins/Protobuf/System.Memory.dll'...
INFO (build.py): Downloaded protobuf dlls
INFO (build.py): Building resource files
DEBUG (build.py): Running `bazel build -c opt //mediapipe_api:mediapipe_assets`
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'rules_python' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'bazel_skylib' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
INFO: Analyzed target //mediapipe_api:mediapipe_assets (0 packages loaded, 26 targets configured).
INFO: Found 1 target...
Target //mediapipe_api:mediapipe_assets up-to-date:
  bazel-bin/mediapipe_api/mediapipe_assets.zip
INFO: Elapsed time: 0.490s, Critical Path: 0.07s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
DEBUG (build.py): Unarchiving 'bazel-bin/mediapipe_api/mediapipe_assets.zip' to 'build/Resources'...
DEBUG (build.py): Unarchiving 'bazel-bin/mediapipe_api/mediapipe_assets.zip' to 'Assets/StreamingAssets'...
INFO (build.py): Built resource files
INFO (build.py): Building native libaries for iOS...
DEBUG (build.py): Running `bazel build -c opt --config=ios_arm64 --copt=-fembed-bitcode --apple_bitcode=embedded //mediapipe_api/objc:MediaPipeUnity`
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'rules_python' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'bazel_skylib' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
INFO: Build options --apple_bitcode, --apple_platform_type, --copt, and 2 more have changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel_anny/b184a625afb252456503f47e3bf9f280/external/local_config_cc/BUILD:48:19: 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 '//mediapipe_api/objc:MediaPipeUnity' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 0.426s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (13 packages loaded, 182 targets \
configured)
Traceback (most recent call last):
  File "/Users/anny/Downloads/MediaPipeUnityPlugin-master/build.py", line 443, in <module>
    Argument().command().run()
  File "/Users/anny/Downloads/MediaPipeUnityPlugin-master/build.py", line 168, in run
    self._run_command(self._build_ios_commands())
  File "/Users/anny/Downloads/MediaPipeUnityPlugin-master/build.py", line 52, in _run_command
    return subprocess.run(' '.join(command_list), check=True, shell=shell)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'bazel build -c opt --config=ios_arm64 --copt=-fembed-bitcode --apple_bitcode=embedded //mediapipe_api/objc:MediaPipeUnity' returned non-zero exit status 1.

Additional context 截圖 2021-11-11 上午9 39 54

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
homulercommented, Nov 11, 2021

Does changing the path as follows change the result? (If the path to Xcode is different, please change it to suit your environment)

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

python3 build.py clean
python3 build.py build --ios arm64 -vvv
0reactions
Longgood-Annycommented, Nov 11, 2021

OH!!! YES!!! IT WORKS~ ヽ( ★ω★)ノ THANK YOU EVERY MUCH!!! m(_ _)m

Read more comments on GitHub >

github_iconTop Results From Across the Web

does not contain a toolchain for cpu 'arm64-v8a' when ...
i changed the command bazel build -c opt //tensorflow/lite:libtensorflowlite.so --fat_apk_cpu=arm64-v8a ,and it works well. i want know What is ...
Read more >
Bazel build failed for `does not contain a toolchain for cpu ...
I would request you to follow below steps. Install Xcode; bazel clean --expunge; optionally remove all unnecesairly targets (all); run bazel ...
Read more >
Unable to find toolchain
I'm working on upgrading to bazel 0.21.0. It's a monster. On the plus side, rules_go seems to work with our CROSSTOOL out of...
Read more >
bazelrc
Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the. # target CPU to build transient dependencies correctly. See.
Read more >
Linux Cross-Compile Toolchain on Cygwin - developer.moe
You want to have a GCC toolchain to compile C/C++ programs for Linux, while you work on your Windows machine? You already use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found