-
Notifications
You must be signed in to change notification settings - Fork 74.8k
Open
Labels
TF 2.19subtype:macOSmacOS Build/Installation issuesmacOS Build/Installation issuestype:build/installBuild and install issuesBuild and install issues
Description
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.19.0
Custom code
Yes
OS platform and distribution
macOS 13.6 (Ventura)
Mobile device
macOS 13.6 (Ventura)
Python version
3.12.11
Bazel version
6.5.0
GCC/compiler version
Apple clang version 13.0.0 (clang-1300.0.29.3)
CUDA/cuDNN version
CPU build only
GPU model and memory
No response
Current behavior?
Hi I am trying to build Tensorflow 2.19.0 from source on macOS 13.6 (Ventura) using bazel 6.5.0 , during build I am hitting this error -
=============================
Hermetic Python configuration:
Version: "3.12"
Kind: ""
Interpreter: "default" (provided by rules_python)
Requirements_lock label: "@python_version_repo//:requirements_lock_3_12.txt"
=====================================
ERROR: /private/var/tmp/_bazel_aime/1b2df77493bef603a8520b303246b04e/external/local_config_apple_cc/BUILD:61:23: in apple_cc_toolchain rule @local_config_apple_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. If your Xcode version has changed recently, verify that "xcode-select -p" is correct and then try: "bazel shutdown" to re-run Xcode configuration
ERROR: /private/var/tmp/_bazel_aime/1b2df77493bef603a8520b303246b04e/external/local_config_apple_cc/BUILD:61:23: Analysis of target '@local_config_apple_cc//:cc-compiler-darwin_x86_64' failed
my ENV is -
((test_env) ) bash-3.2$ bazel --version
bazel 6.5.0
((test_env) ) bash-3.2$ python -V
Python 3.12.11
((test_env) ) bash-3.2$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
((test_env) ) bash-3.2$ xcodebuild -version
Xcode 13.1
Build version 13A1030d
((test_env) ) bash-3.2$ clang --version
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
i did some suggestions mentioned here -
xcode-version-must-be-specified-to-use-an-apple-crosstool
Also tried with setting XCODE_VERSION and --xcode_version 13.1 to bazel build command.
but still same issue. can anyone help on this.
Standalone code to reproduce the issue
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout v2.19.0
bazel build //tensorflow/tools/pip_package:wheel --repo_env=USE_PYWRAP_RULES=1 --repo_env=WHEEL_NAME=tensorflow_cpu
Relevant log output
ERROR: /private/var/tmp/_bazel_aime/1b2df77493bef603a8520b303246b04e/external/local_config_apple_cc/BUILD:61:23: in apple_cc_toolchain rule @local_config_apple_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. If your Xcode version has changed recently, verify that "xcode-select -p" is correct and then try: "bazel shutdown" to re-run Xcode configuration
ERROR: /private/var/tmp/_bazel_aime/1b2df77493bef603a8520b303246b04e/external/local_config_apple_cc/BUILD:61:23: Analysis of target '@local_config_apple_cc//:cc-compiler-darwin_x86_64' failed
INFO: Repository icu instantiated at:
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/WORKSPACE:64:14: in <toplevel>
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/tensorflow/workspace2.bzl:934:28: in workspace
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/tensorflow/workspace2.bzl:77:8: in _initialize_third_party
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/third_party/icu/workspace.bzl:8:20: in repo
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/third_party/repo.bzl:136:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
/Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/third_party/repo.bzl:89:35: in <toplevel>
ERROR: /private/var/tmp/_bazel_aime/1b2df77493bef603a8520b303246b04e/external/bazel_tools/src/tools/launcher/BUILD:9:14: errors encountered resolving toolchains for @bazel_tools//src/tools/launcher:launcher
ERROR: /Users/scratch/aime/.ade/view_storage/aime_py31211/python/python_3rdparty/tensorflow/tensorflow/tools/build_info/BUILD:9:10: errors encountered resolving toolchains for //tensorflow/tools/build_info:gen_build_info
ERROR: Analysis of target '//tensorflow/tools/pip_package:wheel' failed; build aborted:
INFO: Elapsed time: 87.253s
Metadata
Metadata
Assignees
Labels
TF 2.19subtype:macOSmacOS Build/Installation issuesmacOS Build/Installation issuestype:build/installBuild and install issuesBuild and install issues