Protobuf: what can i do ? "Xcode version must be specified to use an Apple CROSSTOOL"

Created on 18 Sep 2017  路  5Comments  路  Source: protocolbuffers/protobuf

ERROR: /private/var/tmp/_bazel_phynero/759a3c362e95012bc330dc146849fc13/external/local_config_cc/BUILD:49:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL.

ERROR: Analysis of target '//:add_person_java_lite' failed; build aborted.

Most helpful comment

Here I think it helped to set the xcode version with something like:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Or maybe to set up the command line tools:
sudo xcode-select --switch /Library/Developer/CommandLineTools/
Maybe a bazel clean / expunge was also needed?

All 5 comments

my os verson is 10.12.6
and my xcode version is 8.3.3

when i run "cat $(bazel info output_base)/external/local_config_xcode/BUILD"
show
xcode_config(name = 'host_xcodes')

Error: Running xcodebuild -version failed, return code 72, stderr: xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH , stdout:

now . what should i do?

Here I think it helped to set the xcode version with something like:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Or maybe to set up the command line tools:
sudo xcode-select --switch /Library/Developer/CommandLineTools/
Maybe a bazel clean / expunge was also needed?

worked for me thanks!

Here I think it helped to set the xcode version with something like:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Or maybe to set up the command line tools:
sudo xcode-select --switch /Library/Developer/CommandLineTools/
Maybe a bazel clean / expunge was also needed?

This combination worked beautifully for me.

Above stuff 猬嗭笍 didn't help me, but this helped

bazel clean --expunge 
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
bazel clean --expunge 
Was this page helpful?
0 / 5 - 0 ratings