-
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
Unable to build //src:java_tools_prebuilt_zip on MacOS with only Xcode command line tools #21935
Comments
@keith Is there a way to use |
i think it's possible for apple_support.run to support CLT only, but it would require the unix toolchain to add some env vars which it doesn't today. and generally so far we've been trying to reduce the unix toolchain's knowledge of apple specific weirdnesses. maybe we could make that action fallback to just a normal run if it wasn't using xcode? I don't recall what xcode specific bits rules_graalvm needed |
It needs to pass through the Apple variables (mostly |
i think in that case the xcode config apis from bazel return none. so theoretically we could use that. i think we'd have to still provide those variables, but at that point i guess we could safely hardcode them to where we "know" the CLT should be |
I'm running into the same, except that, technically, I do have a complete Xcode installation—it just doesn't live beneath I'm using the Bazel CLI flags such as IIUC:
To make progress locally, I'm patching Bazel's MODULE.bazel and adding a What's the right path forward?
|
Since it's already asking a lot of rulesets to use |
Description of the bug:
I'm unable to build
bazel build //src:java_tools_prebuilt_zip
on MacOS with only the Xcode command line tools installed. It's unclear to me whether this is a bug, me needing to adjust Bazel's flags, or whetherrules_graalvm
'snative_image
simply requires a full Xcode install and can't be used with only the command line tools.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Have a MacOS device. Do not have Xcode installed. Install the Xcode command line tools via
xcode-select –-install
.Run
bazel build //src:java_tools_prebuilt_zip
. It should fail.Which operating system are you running Bazel on?
MacOS 14.4.1
What is the output of
bazel info release
?release 7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
#20638
#20513 (comment)
Any other information, logs, or outputs that you want to share?
Here's some context on my machine, and what I've tried:
Running
bazel build //src:java_tools_prebuilt_zip
on current master gets meI figured it might be a problem with the
--macos_minimum_os
, so I edited the.bazelrc
to saybuild:macos --macos_minimum_os=11.3 --host_macos_minimum_os=11.3 --macos_sdk_version=11.3
. This gets meI have tried adding
common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
to the .bazelrc, and this makes no difference, with or without the other changes to the sdk version flags.I have tried editing the MODULE.bazel file to ensure the
apple_support
line appears beforerules_cc
, since one of the linked issues implied order was important.The text was updated successfully, but these errors were encountered: