bazel: Bazel@HEAD cannot build Bazel on OS X
Description of the problem / feature request:
At d03dcfb450a8f3717d81f9ecde5ac24ec53e042a, build bazel (with Bazel 0.23.0) and then use the newly-built bazel
binary to build bazel again.
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
brew upgrade bazelbuild/tap/bazel # install bazel 0.23.0
B23=/usr/local/bin/bazel
git checkout d03dcfb450a8f3717d81f9ecde5ac24ec53e042a
${B23} build //src:bazel
BHEAD=bazel-bin/src/bazel
${BHEAD} build //src:bazel
outputs:
➜ bazel git:(master) ${BHEAD} //src:bazel
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 5e0b72f0-aebb-4d1a-90dd-7408fd73d4c1
DEBUG: /private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/osx/xcode_configure.bzl:153:9: Invoking xcode-locator failed, return code 1, stderr: error: Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" , stdout:
ERROR: no such package '@local_config_cc//': Traceback (most recent call last):
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/cpp/cc_configure.bzl", line 55
configure_osx_toolchain(repository_ctx, overriden_tools)
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/cpp/osx_cc_configure.bzl", line 65, in configure_osx_toolchain
run_xcode_locator(repository_ctx, paths["@bazel_tool..."])
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/osx/xcode_configure.bzl", line 154, in run_xcode_locator
fail(error_msg)
Invoking xcode-locator failed, return code 1, stderr: error: Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" , stdout:
ERROR: Analysis of target '//src:bazel' failed; build aborted: no such package '@local_config_cc//': Traceback (most recent call last):
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/cpp/cc_configure.bzl", line 55
configure_osx_toolchain(repository_ctx, overriden_tools)
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/cpp/osx_cc_configure.bzl", line 65, in configure_osx_toolchain
run_xcode_locator(repository_ctx, paths["@bazel_tool..."])
File "/private/var/tmp/_bazel_dan/53ac6b78c42db31234d67d8ef02ecc08/external/bazel_tools/tools/osx/xcode_configure.bzl", line 154, in run_xcode_locator
fail(error_msg)
Invoking xcode-locator failed, return code 1, stderr: error: Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" , stdout:
INFO: Elapsed time: 5.943s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (89 packages loaded, 606 targets configured)
➜
What operating system are you running Bazel on?
OS X latest
What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?
➜ bazel git:(master) git remote get-url origin ; git rev-parse master ; git rev-parse HEAD git@github.com:bazelbuild/bazel.git d03dcfb450a8f3717d81f9ecde5ac24ec53e042a d03dcfb450a8f3717d81f9ecde5ac24ec53e042a
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
See #7397 for more info on my setup. One key thing: I have xcode-cli tools, but not XCode application.
The root cause is the named commit; problem does not happen at previous commit of ac6d4fd194c2d9aba13ce613ec373f627210b18d
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (17 by maintainers)
➜ bazel git:(master) ✗ env -i xcrun xcodebuild -version ; echo $?
xcrun: error: unable to find utility “xcodebuild”, not a developer tool or in PATH 72 ➜ bazel git:(master) ✗ xcodebuild
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance