-
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
Too many unrelated "xcode version must be specified" errors #6056
Comments
We have also encountered this problem internally on some users' macs, and there seem to be several mechanisms that can trigger it. We don't have a good solution yet. If you see the error again, could you please upload your java.log? Also, which version(s) of XCode command line tools do you have installed, and where? (see @rupertks - pinging you since you might have context on this issue. |
where is the java.log? |
also, may I ask why you think this is P3? Having to do bazel clean expunge periodically sounds like it should be P1 |
can you provide the output of this command?
EDIT: and |
Happened again after "fiddling" with toolchains (specifically java_toolchain/host_java_toolchain/javabase/host_javabase)
package(default_visibility = ["//visibility:public"]) load(":osx_archs.bzl", "OSX_TOOLS_ARCHS") CC_TOOLCHAINS = [( cc_library( cc_library( filegroup( filegroup( cc_toolchain_suite( [ [ [
|
Also I'd really appreciate understanding why you think this is P3. |
@sergiocampama could you elevate the priority of this? It's not urgent but would be good to get done within a quarter. |
This happens to me pretty much weekly and is really annoying. We don't have any C/C++ code in our project so it's quite unclear why this is happening at all. |
Just happened to me yesterday. Obviously no CPP code.
Bazel itself recommending clean expunge is awful IMHO
…On Tue, 20 Nov 2018 at 3:47 Johan Björk ***@***.***> wrote:
This happens to me pretty much weekly and is really annoying. We don't
have any C/C++ code in our project so it's quite unclear why this is
happening at all.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6056 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFxdNxxwX-a_lqHjWZr6jqj9PQkEdks5uw18rgaJpZM4WWV3G>
.
|
@sergiocampama ping? |
I'm sorry, but I don't have the bandwidth to look into this issue. AFAIA, this is part of the bazel infrastructure setup, so the bazel team should have way more insight into the details on how this works. |
I can take a look at why Xcode selection fails (not at why rules_scala needs C++), but I'm afraid this doesn't have enough data for me to reproduce the issue. The fact that Is there a deterministic reproduction process for this bug? Are you running Santa and/or VSCode by any chance? The next time this happens, could you check if a simple Lastly it looks like you use Bazel 0.15. Is there any chance you could upgrade to at least 0.18? There have been various fixes to the |
This happened with 0.19.2 (first reported when I used 15 but upgraded a few
versions since).
I’ll try shutdown.
Btw,
I think that rules_scala isn’t relevant here and that any starlark rule
with toolchains can cause this but I’m not really sure
…On Wed, 28 Nov 2018 at 19:39 Julio Merino ***@***.***> wrote:
I can take a look at why Xcode selection fails (not at why rules_scala
needs C++), but I'm afraid this doesn't have enough data for me to
reproduce the issue.
The fact that xcodebuild -version was terminated by a signal is very
suspicious though.
Is there a deterministic reproduction process for this bug?
Are you running Santa and/or VSCode by any chance?
The next time this happens, could you check if a simple bazel shutdown is
sufficient to correct the issue? There were some changes back in April (
3a292ef
<3a292ef>)
to remove an on-disk cache of Xcode locations. The suggestion to run clean
--expunge may be stale but I'm not sure.
Lastly it looks like you use Bazel 0.15. Is there any chance you could
upgrade to at least 0.18? There have been various fixes to the
xcode_locator tool since then to make it more reliable and they may
actually fix this problem. (Or in any case, some of those fixes was to add
extra logging in case of problems, which could be very helpful here.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6056 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF2t3h0DXw4keGqH3qdTN6C9AcpTpks5uzspdgaJpZM4WWV3G>
.
|
Just had this happen again with 0.18.1.
-- |
Did shutdown help? Also are you doing changes related to toolchains?
…On Thu, 29 Nov 2018 at 0:42 Johan Björk ***@***.***> wrote:
Just had this happen again with 0.18.1.
$ bazel build //... --nobuild
DEBUG:
/private/var/tmp/_bazel_me/60a181658afb41895a4dba3b821290b1/external/bazel_tools/tools/osx/xcode_configure.bzl:87:9:
Invoking xcodebuild failed, developer dir:
/Applications/Xcode.app/Contents/Developer ,return code 256, stderr:
Process terminated by signal 15, stdout:
I still don't have a clear idea when it's happening, possibly something
fairly unique with my workflow is that I'm using a lot of different bazel
workspaces often at the same time.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6056 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF0Hqv0QA4h-h3gn65oEa3MYpV_5fks5uzxFlgaJpZM4WWV3G>
.
|
Yes shutdown helped. We do register a custom toolchain (internal compiler). It looks vaguely like this
|
If this happens to me it's often temporally-related to running gazelle (only observed it on mac, never linux):
|
redisliu's solution from #4314 works for me |
Still happens for us with bazel 0.22. Please let me know if there is any other information that would be helpful as it reproduces pretty regularly for me. |
The reason I asked about VSCode is because of: #4603. We troubleshot similar problems there but eventually traced them to a bug in Santa. I wonder if something similar is going on here. Again, the fact that |
Ah, no VSCode or Santa here. I'll enable coredumps and will let you know if something appears |
One way to easily reproduce the original issue here is by ctrl-c'ing while bazel is
The contents of |
We've worked around this currently by checking in our own Xcode config and passing |
This PR #7519 fixes the ctrl-c issue (and likely other issues where this comes up naturally) |
Another repro case that @ob pointed out:
|
The analysis repro case isn't fixed by my PR. The easiest way for me to repro is by adding an invalid label to the
And you'll end up with this error. For some reason I can't easily reproduce this by breaking a |
Because of this known issue #6056 (comment) we might want to leave this open, up to you all |
FYI #7592 |
*** Reason for rollback *** Breaks in edge cases where xcodes are not or incorrectly installed. *** Original change description *** Make Xcode setup more resilient Previously if you tried to build a project from a entirely clean bazel state, and ctrl-c'd while bazel was fetching the local_config_xcode information, you would end up in a state where the local_config_xcode/BUILD file contained error information, which made the Apple crosstool unusable until you did a `clean --expunge`. Now the Xcode setup calls `fail()` in those cases, which makes bazel re-run it again the next time you try to build. It is still possible to reproduce if you ctrl-c while the `xcodebuild -version` command that determines if you have Xcode installed at all runs. Because we want to support users who don't have Xcode installed on macOS, we cannot fail in that case. Fixes #6056 Closes #7519. PiperOrigin-RevId: 236161124
When you meet this problem, enter " xcode-select". Then follow the "reset" step, this problem will never happen.
|
Description of the problem / feature request:
I've been working the past few days on rules_scala and its toolchain and I got several times the following message:
rules_scala has no c/cpp code of itself but maybe the toolchain triggers something.
Additionally I did not change anything about my Xcode version and in fact I'm pretty certain it's not fully installed since when I open the app it says something about needing to install additional components.
If I run clean expunge it fixes the problem but I don't think this is a valid solution.
What operating system are you running Bazel on?
OS X Sierra
What's the output of
bazel info release
?release 0.15.0-homebrew
The text was updated successfully, but these errors were encountered: