必须指定Xcode版本以使用Apple CROSSTOOL [英] Xcode version must be specified to use an Apple CROSSTOOL

查看:161
本文介绍了必须指定Xcode版本以使用Apple CROSSTOOL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用bazel构建tensorflow-serving,但在构建过程中遇到了一些错误

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

ERROR:/private/var/tmp/_bazel_Kakadu/3f0c35881c95d2c43f04614911c03a57/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 '//tensorflow_serving/sources/storage_path:file_system_storage_path_source_proto' failed; build aborted.

我已经尝试使用bazel cleanbazel clean --expunge,但是它没有帮助,Bazel仍然看不到我的xcode(我想),但是它已经完全安装了.我什至重新安装了它以确保一切正常,但错误没有消失

I've already tried to use bazel clean and bazel clean --expunge but it didn't help and still Bazel doesn't see my xcode (I suppose) but it's completely installed. I even reinstalled it to make sure that all works fine but the error didn't disappeared

我的Bazel版本是

Build label: 0.5.2-homebrew
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Jul 13 12:29:40 2017 (1499948980)
Build timestamp: 1499948980
Build timestamp as int: 1499948980
KakaduDevs-Mac-mini:serving Kakadu$ 

OS是MacOS Sierra版本10.12.5

OS is MacOS Sierra version 10.12.5

我应该如何在bazel中指定Xcode版本,以避免发生此错误?看来错误很常见,但是我还没找到如何制作bazel的方法. 附言:我正在尝试安装tensorflow-serving它在这里解释的方式. https://tensorflow.github.io/serving/setup

What should I do to specify Xcode version in bazel to avoid this error? It seems that the error is common but I haven't found how I can make the bazel build. P.S I'm trying to install tensorflow-serving the way it's explained here. https://tensorflow.github.io/serving/setup

推荐答案

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

这篇关于必须指定Xcode版本以使用Apple CROSSTOOL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆