jax-ml / jax

Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more
http://jax.readthedocs.io/
Apache License 2.0
29.98k stars 2.75k forks source link

failed to build jax 0.2.24 on Windows : 'apple_common' value has no field or method 'objc_proto_aspect' #8440

Closed Tsuna58 closed 2 years ago

Tsuna58 commented 2 years ago

python .\build\build.py --enable_cuda --cuda_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5" --cudnn_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5" --cuda_version=11.5 --cudnn_version=8.2.4

 _   _  __  __
| | / \ \ \/ /

| |/ \ \ / | |_| / \/ \ \// \//_\

Bazel binary path: D:\Dev\bazel\bazel.EXE Python binary path: D:/Dev/Python3.8.7/python.exe Python version: 3.8 NumPy version: 1.21.3 MKL-DNN enabled: yes Target CPU: AMD64 Target CPU features: release CUDA enabled: yes CUDA toolkit path: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 CUDNN library path: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 CUDA compute capabilities: 3.5,5.2,6.0,6.1,7.0 CUDA version: 11.5 CUDNN version: 8.2.4 NCCL enabled: yes TPU enabled: no ROCm enabled: no

Building XLA and installing it in the jaxlib source tree... D:\Dev\bazel\bazel.EXE run --verbose_failures=true --config=mkl_open_source_only --config=cuda :build_wheel -- --output_path=D:\OneDrive\Travail\jax\dist --cpu=AMD64 Starting local Bazel server and connecting to it... WARNING: Option 'experimental_strict_action_env' is deprecated: Use --incompatible_strict_action_env instead INFO: Options provided by the client: Inherited 'common' options: --isatty=1 --terminal_columns=80 INFO: Reading rc options for 'run' from d:\onedrive\travail\jax.bazelrc: Inherited 'common' options: --experimental_repo_remote_exec INFO: Options provided by the client: Inherited 'build' options: --python_path=D:/Dev/Python3.8.7/python.exe INFO: Reading rc options for 'run' from d:\onedrive\travail\jax.bazelrc: Inherited 'build' options: --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true -c opt --config=short_logs INFO: Reading rc options for 'run' from d:\onedrive\travail\jax.jax_configure.bazelrc: Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=D:/Dev/Python3.8.7/python.exe --action_env=PYENV_ROOT --python_path=D:/Dev/Python3.8.7/python.exe --action_env CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 --action_env CUDNN_INSTALL_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 --action_env TF_CUDA_PATHS=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 --action_env TF_CUDA_VERSION=11.5 --action_env TF_CUDNN_VERSION=8.2.4 --distinct_host_configuration=false INFO: Found applicable config definition build:short_logs in file d:\onedrive\travail\jax.bazelrc: --output_filter=DONT_MATCH_ANYTHING INFO: Found applicable config definition build:mkl_open_source_only in file d:\onedrive\travail\jax.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1 INFO: Found applicable config definition build:cuda in file d:\onedrive\travail\jax.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true INFO: Found applicable config definition build:cuda in file d:\onedrive\travail\jax.jax_configure.bazelrc: --action_env TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0 INFO: Found applicable config definition build:windows in file d:\onedrive\travail\jax.bazelrc: --copt=/D_USE_MATH_DEFINES --host_copt=/D_USE_MATH_DEFINES --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --copt=/Zc:preprocessor --cxxopt=/std:c++14 --host_cxxopt=/std:c++14 --linkopt=/DEBUG --host_linkopt=/DEBUG --linkopt=/OPT:REF --host_linkopt=/OPT:REF --linkopt=/OPT:ICF --host_linkopt=/OPT:ICF --experimental_strict_action_env=true ERROR: Traceback (most recent call last): File "C:/users/seb/_bazel_seb/axmvndt2/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl", line 63, column 71, in _ios_internal_ui_test_bundle = rule_factory.create_apple_bundling_rule( File "C:/users/seb/_bazel_seb/axmvndt2/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 955, column 55, in _create_apple_bundling_rule rule_attrs.append(_common_binary_linking_attrs(rule_descriptor)) File "C:/users/seb/_bazel_seb/axmvndt2/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 233, column 21, in _common_binary_linking_attrs apple_common.objc_proto_aspect, Error: 'apple_common' value has no field or method 'objc_proto_aspect' INFO: Repository highwayhash instantiated at: D:/onedrive/travail/jax/WORKSPACE:38:14: in C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/tensorflow/workspace2.bzl:1084:28: in workspace C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/tensorflow/workspace2.bzl:69:16: in _initialize_third_party C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/third_party/highwayhash/workspace.bzl:6:20: in repo C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/third_party/repo.bzl:113:21: in tf_http_archive Repository rule _tf_http_archive defined at: C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/third_party/repo.bzl:66:35: in INFO: Repository fft2d instantiated at: D:/onedrive/travail/jax/WORKSPACE:38:14: in C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/tensorflow/workspace2.bzl:1091:21: in workspace C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/tensorflow/workspace2.bzl:717:20: in _tf_repositories C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/third_party/repo.bzl:113:21: in tf_http_archive Repository rule _tf_http_archive defined at: C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/third_party/repo.bzl:66:35: in ERROR: C:/users/seb/_bazel_seb/axmvndt2/external/org_tensorflow/tensorflow/BUILD:847:11: error loading package '@com_github_grpc_grpc//': at C:/users/seb/_bazel_seb/axmvndt2/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl:28:6: at C:/users/seb/_bazel_seb/axmvndt2/external/build_bazel_rules_apple/apple/ios.bzl:22:5: initialization of module 'apple/internal/testing/ios_rules.bzl' failed and referenced by '@org_tensorflow//tensorflow:grpc++' ERROR: Analysis of target '//build:build_wheel' failed; build aborted: INFO: Elapsed time: 9.932s INFO: 0 processes. FAILED: Build did NOT complete successfully (156 packages loaded, 1912 targets\ FAILED: Build did NOT complete successfully (156 packages loaded, 1912 targets\ configured) currently loading: @org_tensorflow//tensorflow/compiler/xla/service/gpu ..\ . (6 packages) Fetching @llvm-project; fetching Fetching @eigen_archive; fetching Fetching ...rchive; Extracting C:/users/seb/_bazel_seb/axmvndt2/extern\ al/eigen_archive/temp12956814480329320922/eigen-7792b1e909a98703181aecb8810b4b\ 654004c25d.tar.gz Fetching @jsoncpp_git; fetching Fetching https://storage.googleapis.com/...3162e4a7c5e2f406e82dd968.tar.gz Fetching https://storage.googleapis.com/.../OouraFFT/archive/v1.0.tar.gz b'' Traceback (most recent call last): File ".\build\build.py", line 521, in main() File ".\build\build.py", line 516, in main shell(command) File ".\build\build.py", line 53, in shell output = subprocess.check_output(cmd) File "D:\Dev\Python3.8.7\lib\subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "D:\Dev\Python3.8.7\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['D:\Dev\bazel\bazel.EXE', 'run', '--verbose_failures=true', '--config=mkl_open_source_only', '--config=cuda', ':build_wheel', '--', '--output_path=D:\OneDrive\Travail\jax\dist', '--cpu=AMD64']' returned non-zero exit status 1.

hawkinsp commented 2 years ago

Windows is "community supported", but as far as I am aware it should work.

What version of bazel do you have installed? (We really should log that from the build script.)

Tsuna58 commented 2 years ago

I'm using bazel release 6.0.0-pre.20211019.1

hawkinsp commented 2 years ago

Can you try with Bazel 4.1.0? That's what we are using for our builds.

Tsuna58 commented 2 years ago

This problem seems solved with Bazel 4.1.0, thank you !

adamjstewart commented 2 years ago

Are there any plans to support newer Bazel releases in the future? Using older versions of Bazel is not really a "fix".