-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
OS X toolchain broke CLI without XCode #8479
Comments
Can you post the specific log for this failure? (I'm assuming it's not exactly the same as last time?) |
Thanks @keith -- sorry, was too busy making sure I filled all the fields in and starting
|
More possibly-useful info:
|
That's a great bug!!! Thanks for catching it. I'll fix it right tomorrow (it's eod in MUC already). |
I can repro on a mac with Xcode uninstalled. I couldn't repro with just CLT selected, or with |
Fixes bazelbuild#8479. To keep this backwards compatible we have to detect xcode early in the Bazel build (even when no C++ is being built). In cases where user knows there is xcode, or when they know it won't be needed, I'm adding environment variable `BAZEL_USE_XCODE_TOOLCHAIN`. When set to `1`, Bazel will not try to detect xcode, it will assume it is there. Makes bazelbuild#6926 a little bit more complicated. RELNOTES: `BAZEL_USE_XCODE_TOOLCHAIN=1` tells Bazel not to look for Xcode to decide whether to enable toolchains for Apple rules, but to assume Xcode is available. Can be also used when building on Darwin and no C++ or ObjC is being built, so there is no need to detect Xcode.
I believe I have a fix in #8492, could you take a look to see if that fixes the issue for you too? |
Works for me:
|
Thanks for checking! |
Fixes bazelbuild#8479. To keep this backwards compatible we have to detect xcode early in the Bazel build (even when no C++ is being built). In cases where user knows there is xcode, or when they know it won't be needed, I'm adding environment variable `BAZEL_USE_XCODE_TOOLCHAIN`. When set to `1`, Bazel will not try to detect xcode, it will assume it is there. Makes bazelbuild#6926 a little bit more complicated. RELNOTES: `BAZEL_USE_XCODE_TOOLCHAIN=1` tells Bazel not to look for Xcode to decide whether to enable toolchains for Apple rules, but to assume Xcode is available. Can be also used when building on Darwin and no C++ or ObjC is being built, so there is no need to detect Xcode. Closes bazelbuild#8492. PiperOrigin-RevId: 250518695
Fixes bazelbuild#8479. To keep this backwards compatible we have to detect xcode early in the Bazel build (even when no C++ is being built). In cases where user knows there is xcode, or when they know it won't be needed, I'm adding environment variable `BAZEL_USE_XCODE_TOOLCHAIN`. When set to `1`, Bazel will not try to detect xcode, it will assume it is there. Makes bazelbuild#6926 a little bit more complicated. RELNOTES: `BAZEL_USE_XCODE_TOOLCHAIN=1` tells Bazel not to look for Xcode to decide whether to enable toolchains for Apple rules, but to assume Xcode is available. Can be also used when building on Darwin and no C++ or ObjC is being built, so there is no need to detect Xcode. Closes bazelbuild#8492. PiperOrigin-RevId: 250518695
Description of the problem / feature request:
If I build
bazel
from HEAD (5736381), then that version of bazel cannot compile bazel on OS X.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See #7397 for more info -- about once daily I pull and build bazel, then try to build bazel again with the built binary before I upgrade my local install.
Key difference in my setup from Bazel CI for OS X I only have the command-line tools installed, and not the XCode IDE:
#7397 (comment)
What operating system are you running Bazel on?
macOS 10.14.5
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.I have
bazel-0.25.2
in /usr/local/bin/bazel, and latest bazel that worked from head in~/bin/bazel
(~last Friday HEAD). I have tried the above command with both.What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Have you found anything relevant by searching the web?
Just my series of issues finding problems in Bazel with my common setup that is not tested in your CI :)
If you make
XCode
an official requirement for developing on Mac, I'll happily install it. I figured for now I'm a useful canary?The text was updated successfully, but these errors were encountered: