Xcode version must be specified to use an Apple CROSSTOOL

前端 未结 5 429
庸人自扰
庸人自扰 2021-01-30 03:22

I try to build tensorflow-serving using bazel but I\'ve encountered some errors during the building

ERROR:/private/var/tmp/_bazel_Kakadu/3f0c35881c95d2c43f04614         


        
相关标签:
5条回答
  • 2021-01-30 03:37

    For me it was a licensing issue for xcodebuild. After running bazel clean --expunge I've tried to run again bazel and I've got the instruction to run sudo xcodebuild -license. I have executed, accepted the license terms, run again bazel clean --expunge and everything has started to work again. Hopefully it solves some of the cases.

    0 讨论(0)
  • 2021-01-30 03:37

    In order to build objc, Bazel requires that you specify an xcode version - this is usually done automatically by xcode_configure. If that's not working, you can manually specify the xcode version on the command line using the --xcode_version flag.

    0 讨论(0)
  • 2021-01-30 03:52

    Had the same problem, and since I am using a beta version of XCode, I had to find the installation in /Downloads/Xcode-beta.app instead.

    Incidentally, the solution for me was to open XCode, go to Preferences, and select the Locations tab. The Command Line Tools drop-down was blank, and I had to press it and select a version (Xcode 9.0 in my case). I then ran bazel clean --expunge and repeated the build process without getting the error. Hope this helps someone.

    0 讨论(0)
  • 2021-01-30 03:59
    bazel clean --expunge 
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -license
    bazel clean --expunge 
    bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
    
    0 讨论(0)
  • 2021-01-30 04:00

    It looks like xcode_configure isn't properly identifying that you have xcode installed. This can sometimes happen if you install xcode but have not yet fully opened it (it may ask you to agree to Terms and Conditions before being fully functional). If this is the problem, you'll need to bazel clean --expunge again after that...

    If this doesn't help, you can get some debug information to identify what's gone wrong, by invoking (after a failed build):

    cat $(bazel info output_base)/external/local_config_xcode/BUILD

    This should contain some comments pertaining to failures in finding your installed xcodes.

    0 讨论(0)
提交回复
热议问题