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

Build of Hello World Failed on Darwin (MacOS) #31

Closed
DennisFaucher opened this issue Aug 20, 2019 · 4 comments
Closed

Build of Hello World Failed on Darwin (MacOS) #31

DennisFaucher opened this issue Aug 20, 2019 · 4 comments
Labels
platform:desktop desktop type:build/install For Build and Installation issues

Comments

@DennisFaucher
Copy link

$ bazel build -c opt mediapipe/examples/desktop/hello_world:hello_world
Starting local Bazel server and connecting to it...
DEBUG: Rule 'build_bazel_rules_apple' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6c9fcae7a3597aabd43f28be89466afe0eab18de", shallow_since = "1565379803 -0700" and dropping ["tag"]
DEBUG: Call stack for the definition of repository 'build_bazel_rules_apple' which is a git_repository (rule definition at /private/var/tmp/_bazel_faucherd/3a6923036fc899f82029b0fb9d70b802/external/bazel_tools/tools/build_defs/repo/git.bzl:181:18):

  • /Users/faucherd/Documents/Personal/Machine_Learning/Google/mediapipe/WORKSPACE:251:1
    ERROR: /private/var/tmp/_bazel_faucherd/3a6923036fc899f82029b0fb9d70b802/external/local_config_cc/BUILD:46:1: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin_x86_64'
    ERROR: Analysis of target '//mediapipe/examples/desktop/hello_world:hello_world' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed; build aborted
    INFO: Elapsed time: 58.077s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (53 packages loaded, 1164 targets configured)
@jiuqiant
Copy link
Collaborator

jiuqiant commented Aug 20, 2019

The error could mean that Bazel can't find an appropriate c++ compiler on your mac.
Did you install Xcode in your /Applications folder (that's where Bazel will look for it), and are the Xcode command line tools also installed?
Please see the "Installing on macOS" section in install.md for more details.
If you still have the issue, let me know the version number of the OS, Bazel, XCode you have.

@DennisFaucher
Copy link
Author

Thank you @jiuqiant. I did not have Xcode installed. I installed Xcode and got closer but still received a (different) error.

$ bazel run --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world
DEBUG: Rule 'build_bazel_rules_apple' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6c9fcae7a3597aabd43f28be89466afe0eab18de", shallow_since = "1565379803 -0700" and dropping ["tag"]
DEBUG: Call stack for the definition of repository 'build_bazel_rules_apple' which is a git_repository (rule definition at /private/var/tmp/_bazel_faucherd/3a6923036fc899f82029b0fb9d70b802/external/bazel_tools/tools/build_defs/repo/git.bzl:181:18):

  • /Users/faucherd/Documents/Personal/Machine_Learning/Google/mediapipe/WORKSPACE:251:1
    INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    ERROR: /private/var/tmp/_bazel_faucherd/3a6923036fc899f82029b0fb9d70b802/external/zlib_archive/BUILD.bazel:5:1: undeclared inclusion(s) in rule '@zlib_archive//:zlib':
    this rule is missing dependency declarations for the following files included by 'external/zlib_archive/uncompr.c':

@jiuqiant
Copy link
Collaborator

I am wondering if you need to uninstall and install bazel again after your get Xcode and its command line tools. Also, please do bazel clean --expunge to make sure you have a clean start.

It seems like the error message is truncated, I would like to see more error message if possible. Moreover, can you report the version number of your OS, Bazel, clang, and XCode?

Here are some links that may help:

@DennisFaucher
Copy link
Author

Thank you again @jiuqiant. --expunge did the trick

Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date:
bazel-bin/mediapipe/examples/desktop/hello_world/hello_world
INFO: Elapsed time: 212.890s, Critical Path: 149.52s
INFO: 539 processes: 539 darwin-sandbox.
INFO: Build completed successfully, 548 total actions
INFO: Build completed successfully, 548 total actions
I0820 16:49:42.129235 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.129977 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130002 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130019 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130035 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130053 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130074 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130100 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130112 210040256 hello_world.cc:56] Hello World!
I0820 16:49:42.130125 210040256 hello_world.cc:56] Hello World!

@mgyong mgyong added type:build/install For Build and Installation issues platform:desktop desktop labels Aug 27, 2019
arttupii pushed a commit to arttupii/mediapipe that referenced this issue Nov 18, 2023
…io_classifier

Implement audio classifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:desktop desktop type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

3 participants