-
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
BAZEL_USE_CPP_ONLY_TOOLCHAIN doesn't work without Xcode / Xcode CLT installed. #16009
Comments
Instead of hardcoding `/usr/bin/libtool` which requires Xcode / Xcode CLT installed, which `BAZEL_USE_CPP_ONLY_TOOLCHAIN` is meant to avoid. Related to #16009. Closes #16010. PiperOrigin-RevId: 503922158 Change-Id: I64392ada951938d612dd0b28141e6b2e4ee6952c Co-authored-by: Uri Baghin <[email protected]>
there's an additional problem here:
I.e., that while the GNU libtool is found, it's not passed the correct argument; I tried patching libtool itself (because I don't know how to configure which options to pass it through bazel itself) and in addition to the mode ( Uninstalled gnu libtool then gets me back to apple's libtool but then symbols aren't resolved at runtime (despite successful linking during the link stage). |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
Just checked, there are still references to |
Fwiw I don't think there was ever a goal of supporting builds without even the CLT. I imagine the best solution if you wanted that would be to use a custom cc toolchain like toolchains_llvm. I think some changes would still be required though. |
I think builds without that environment variable already work with CLT and without Xcode though. I thought it was meant to support toolchains provided through other means like brew etc. If not then maybe it's pointless to have it? |
The point is to allow you to use the CLT without a full Xcode install (and has the side benefit of making your build more similar to Linux builds if you care about cross platform, at the cost of some platform specific improvements) |
What I mean is that bazel never needed full Xcode install as far as I remember, regardless of whether you use |
Description of the bug:
BAZEL_USE_CPP_ONLY_TOOLCHAIN
on Darwin is meant to disable the Xcode toolchain resolution and use the common Unix toolchain resolution based on what binaries are available on thePATH
and set with environment variables. However it will still hardcode several apple tools, like/usr/bin/libtool
,/usr/bin/gcc
and/usr/bin/install_name_tool
(incc_wrapper.sh
).What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Expected output: successful build using the binaries on your
PATH
.Actual output:
Which operating system are you running Bazel on?
macOS 12.5 21G72
What is the output of
bazel info release
?release 5.2.0
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 master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: