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.

Build on M1 Mac fail

See original GitHub issue

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2): macOS Big Sur
  • Target (e.g. desktop cpu, android arm64): desktop cpu & ios arm64
  • Bazel version: 3.7.2
  • Python version: 3.9.9
  • GCC/G++ version: 13.0.0
  • Unity version: 2021.2.7f
  • Xcode version (if building for iOS): 13.2.1

Describe the problem I followed the Installation-Guide#m1-mac to install, but when I tried to build, it failed.

Steps to reproduce the issue python3 build.py build --desktop cpu --ios arm64 -vv

And I also tried python3 build.py build --desktop cpu --include_opencv_libs -vv, the result will be same.

Full logs

python3 build.py build --desktop cpu --ios arm64 -vv

INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running `bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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 --define has changed, discarding analysis cache.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 829 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.903s, Critical Path: 0.15s
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/user/.nuget/packages/
  https://api.nuget.org/v3/index.json

/Users/user/Documents/GitHub/MediaPipePose/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 --verbose_failures //mediapipe_api:mediapipe_assets`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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.
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
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.412s, 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_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 libraries for Desktop...
DEBUG (build.py): Running `bazel build -c opt --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=local //mediapipe_api:mediapipe_desktop`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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 --define has changed, discarding analysis cache.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
ERROR: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/opencv/BUILD.bazel:48:6: @opencv//:opencv_binary depends on @macos_opencv//:opencv in repository @macos_opencv which failed to fetch. no such package '@macos_opencv//': The repository's path is "/usr/local/opt/opencv@3" (absolute: "/usr/local/opt/opencv@3") but this directory does not exist.
ERROR: Analysis of target '//mediapipe_api:mediapipe_desktop' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.348s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 598 targets config\
ured)
Traceback (most recent call last):
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 443, in <module>
    Argument().command().run()
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 141, in run
    self._run_command(self._build_desktop_commands())
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 52, in _run_command
    return subprocess.run(' '.join(command_list), check=True, shell=shell)
  File "/opt/homebrew/Cellar/python@3.9/3.9.9/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 --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=local //mediapipe_api:mediapipe_desktop' returned non-zero exit status 1.

python3 build.py build --desktop cpu --include_opencv_libs -vv

INFO (build.py): Building protobuf sources...
DEBUG (build.py): Running `bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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 --define has changed, discarding analysis cache.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 829 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: 1.031s, Critical Path: 0.26s
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/user/.nuget/packages/
  https://api.nuget.org/v3/index.json

/Users/user/Documents/GitHub/MediaPipePose/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 --verbose_failures //mediapipe_api:mediapipe_assets`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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.
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
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.466s, 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_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 libraries for Desktop...
DEBUG (build.py): Running `bazel build -c opt --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=local //mediapipe_api:mediapipe_desktop`
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/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_user/5062d34a58e179a33dc7e850c309acd0/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/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 --define has changed, discarding analysis cache.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3839996049629e6377abdfd04681ddeeb0cc3db13b9d2ff81bf46700cb4529f7"
DEBUG: Repository rules_cc instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:84:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564776078 -0400"
DEBUG: Repository rules_python instantiated at:
  /Users/user/Documents/GitHub/MediaPipePose/WORKSPACE:41:23: in <toplevel>
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
ERROR: /private/var/tmp/_bazel_user/5062d34a58e179a33dc7e850c309acd0/external/opencv/BUILD.bazel:48:6: @opencv//:opencv_binary depends on @macos_opencv//:opencv in repository @macos_opencv which failed to fetch. no such package '@macos_opencv//': The repository's path is "/usr/local/opt/opencv@3" (absolute: "/usr/local/opt/opencv@3") but this directory does not exist.
ERROR: Analysis of target '//mediapipe_api:mediapipe_desktop' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.468s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 718 targets config\
ured)
Traceback (most recent call last):
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 443, in <module>
    Argument().command().run()
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 141, in run
    self._run_command(self._build_desktop_commands())
  File "/Users/user/Documents/GitHub/MediaPipePose/build.py", line 52, in _run_command
    return subprocess.run(' '.join(command_list), check=True, shell=shell)
  File "/opt/homebrew/Cellar/python@3.9/3.9.9/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 --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=local //mediapipe_api:mediapipe_desktop' returned non-zero exit status 1.

Additional context

python3 build.py build --desktop cpu --ios arm64 -vv 截圖 2021-12-22 下午3 39 18

python3 build.py build --desktop cpu --include_opencv_libs -vv 截圖 2021-12-22 下午3 39 44

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
homulercommented, Dec 23, 2021

Can you confirm you are running Apple Silicon UnityEditor (not Intel)? https://unity3d.com/unity/whats-new/2021.2.7

1reaction
homulercommented, Dec 22, 2021

Oh, wait, which version of the plugin are you building? To build it on M1 Mac, the version must be >= 0.8.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode error on M1 Mac: Could not f…
Hi! I need a clue how to solve this issue. I can't build a universal command line app on my new MacBook Pro....
Read more >
Build failed on MacBook Pro M1 · Issue #580
After researching for quite a long time I found out this error is caused of clang incompatibility on apple-m1. Task :buildJniLib FAILED
Read more >
How to Solve React Native (IOS) Build Failed on Apple M1 ...
The solution to solve React Native build failure on M1 Macbook is to use Rosetta. What is a rosetta? Rosetta is a dynamic...
Read more >
M1 Mac: Cannot build packages requiring compilation
Hi, This is my first M1 Mac and the experience has been a nightmare so far. I cannot install basically any package that...
Read more >
How to Solve React Native Build Failed on M1 Macbook ...
The solution to React Native build failure on M1 Macbook is to use Rosetta. What is rosetta? Rosetta is a dynamic binary translator...
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