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
30.27k stars 2.78k forks source link

Compilation Error trying to Build jaxlib #17045

Closed dbl001 closed 1 year ago

dbl001 commented 1 year ago

Description

I am trying to build jaxlib for metal, following these instructions.

https://developer.apple.com/metal/jax/

I'm on MacOS 13.5 with an AMD Radeon Pro 5700 XT GPU

% llvm-config --version

14.0.6
(jax-metal) (base) davidlaxer@BlueDiamond-2 jax % whereis llvm-config
llvm-config: /opt/local/bin/llvm-config

(jax-metal) (base) davidlaxer@BlueDiamond-2 jax % /usr/local/bin/llvm-config --version
15.0.0git

(jax-metal) (base) davidlaxer@BlueDiamond-2 jax % python build/build.py --bazel_options=--@xla//xla/python:enable_tpu=true

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

Bazel binary path: ./bazel-5.1.1-darwin-x86_64
Bazel version: 5.1.1
Python binary path: /Users/davidlaxer/jax-metal/bin/python
Python version: 3.8
NumPy version: 1.24.4
MKL-DNN enabled: yes
Target CPU: x86_64
Target CPU features: release
CUDA enabled: no
TPU enabled: no
ROCm enabled: no
Plugin device enabled: no

Building XLA and installing it in the jaxlib source tree...
./bazel-5.1.1-darwin-x86_64 run --verbose_failures=true :build_wheel -- --output_path=/Users/davidlaxer/PySR/jax/dist --cpu=x86_64
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /Users/davidlaxer/PySR/jax/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /Users/davidlaxer/PySR/jax/.bazelrc:
  Inherited 'build' options: --nocheck_visibility --apple_platform_type=macos --macos_minimum_os=10.14 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --experimental_cc_shared_library --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 --define=tsl_link_protobuf=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir. --@xla//xla/python:enable_gpu=false --@xla//xla/python:enable_tpu=false --@xla//xla/python:enable_plugin_device=false
INFO: Reading rc options for 'run' from /Users/davidlaxer/PySR/jax/.jax_configure.bazelrc:
  Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/Users/davidlaxer/jax-metal/bin/python --action_env=PYENV_ROOT --python_path=/Users/davidlaxer/jax-metal/bin/python --distinct_host_configuration=false --@xla//xla/python:enable_tpu=true --config=avx_posix --config=mkl_open_source_only
INFO: Found applicable config definition build:short_logs in file /Users/davidlaxer/PySR/jax/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:avx_posix in file /Users/davidlaxer/PySR/jax/.bazelrc: --copt=-mavx --host_copt=-mavx
INFO: Found applicable config definition build:mkl_open_source_only in file /Users/davidlaxer/PySR/jax/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:macos in file /Users/davidlaxer/PySR/jax/.bazelrc: --config=posix
INFO: Found applicable config definition build:posix in file /Users/davidlaxer/PySR/jax/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
DEBUG: /private/var/tmp/_bazel_davidlaxer/d468a538d443dde81b2bc827e6b05dcd/external/xla/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'tf_runtime' because it already exists.
DEBUG: /private/var/tmp/_bazel_davidlaxer/d468a538d443dde81b2bc827e6b05dcd/external/xla/third_party/repo.bzl:132:14: 
Warning: skipping import of repository 'llvm-raw' because it already exists.
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/e13d1b5227a77bb7becfd4c49a60720ecc33f870.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/7d879c8b161085a4374ea481b93a52adb19c0529.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
Loading: 
Loading: 0 packages loaded
Analyzing: target //build:build_wheel (0 packages loaded, 0 targets configured)
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/b971ac5250ea8de900eae9f95e06548d14cd95fe.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/openxla/stablehlo/archive/09c82d2dbefeae322010548ee2542c97364f3d32.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11_abseil/archive/2c4932ed6f6204f1656e245838f4f5eae69d2e29.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/boringssl/archive/c00d7ca810e93780bd0c8ee4eea28f4f2ea4bcdc.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
INFO: Analyzed target //build:build_wheel (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[1 / 4] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[12 / 1,782] Compiling llvm/utils/TableGen/CodeGenIntrinsics.cpp; 1s local ... (16 actions, 15 running)
ERROR: /private/var/tmp/_bazel_davidlaxer/d468a538d443dde81b2bc827e6b05dcd/external/llvm-project/llvm/BUILD.bazel:583:10: Compiling llvm/utils/TableGen/Attributes.cpp failed: (Exit 1): cc_wrapper.sh failed: error executing command 
  (cd /private/var/tmp/_bazel_davidlaxer/d468a538d443dde81b2bc827e6b05dcd/execroot/__main__ && \
  exec env - \
    PATH='/Users/davidlaxer/.opam/_coq-platform_.2021.02.1/bin:/Users/davidlaxer/jax-metal/bin:/Users/davidlaxer/.juliaup/bin:/Users/davidlaxer/.cabal/bin:/Users/davidlaxer/.ghcup/bin:/Users/davidlaxer/anaconda3/bin:/Users/davidlaxer/anaconda3/condabin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/davidlaxer/.cargo/bin:/Users/jetbrains/.local/bin' \
    PWD=/proc/self/cwd \
  external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/darwin-opt/bin/external/llvm-project/llvm/_objs/llvm-min-tblgen/Attributes.d '-frandom-seed=bazel-out/darwin-opt/bin/external/llvm-project/llvm/_objs/llvm-min-tblgen/Attributes.o' '-DLLVM_ON_UNIX=1' '-DHAVE_BACKTRACE=1' '-DBACKTRACE_HEADER=<execinfo.h>' '-DLTDL_SHLIB_EXT=".so"' '-DLLVM_PLUGIN_EXT=".so"' '-DLLVM_ENABLE_THREADS=1' '-DHAVE_DEREGISTER_FRAME=1' '-DHAVE_LIBPTHREAD=1' '-DHAVE_PTHREAD_GETNAME_NP=1' '-DHAVE_PTHREAD_H=1' '-DHAVE_PTHREAD_SETNAME_NP=1' '-DHAVE_REGISTER_FRAME=1' '-DHAVE_SETENV_R=1' '-DHAVE_STRERROR_R=1' '-DHAVE_SYSEXITS_H=1' '-DHAVE_UNISTD_H=1' '-DHAVE_MACH_MACH_H=1' '-DHAVE_MALLOC_MALLOC_H=1' '-DHAVE_MALLOC_ZONE_STATISTICS=1' '-DHAVE_PROC_PID_RUSAGE=1' '-DHAVE_UNW_ADD_DYNAMIC_FDE=1' '-DLLVM_NATIVE_ARCH="X86"' '-DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser' '-DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter' '-DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler' '-DLLVM_NATIVE_TARGET=LLVMInitializeX86Target' '-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo' '-DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC' '-DLLVM_NATIVE_TARGETMCA=LLVMInitializeX86TargetMCA' '-DLLVM_HOST_TRIPLE="x86_64-unknown-darwin"' '-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-unknown-darwin"' '-DLLVM_VERSION_MAJOR=17' '-DLLVM_VERSION_MINOR=0' '-DLLVM_VERSION_PATCH=0' '-DLLVM_VERSION_STRING="17.0.0git"' -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS '-DBLAKE3_USE_NEON=0' -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 -DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -iquote external/llvm-project -iquote bazel-out/darwin-opt/bin/external/llvm-project -iquote external/llvm_terminfo -iquote bazel-out/darwin-opt/bin/external/llvm_terminfo -iquote external/llvm_zlib -iquote bazel-out/darwin-opt/bin/external/llvm_zlib -iquote external/bazel_tools -iquote bazel-out/darwin-opt/bin/external/bazel_tools -isystem external/llvm-project/llvm/include -isystem bazel-out/darwin-opt/bin/external/llvm-project/llvm/include '-fvisibility=hidden' -Wno-sign-compare '-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir.' -mavx '-std=c++17' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-fmodule-name=@llvm-project//llvm:llvm-min-tblgen' '-fmodule-map-file=bazel-out/darwin-opt/bin/external/llvm-project/llvm/llvm-min-tblgen.cppmap' -fmodules-strict-decluse -Wprivate-header '-fmodule-map-file=external/local_config_cc/module.modulemap' '-fmodule-map-file=bazel-out/darwin-opt/bin/external/llvm-project/llvm/Support.cppmap' '-fmodule-map-file=bazel-out/darwin-opt/bin/external/llvm-project/llvm/TableGen.cppmap' '-fmodule-map-file=bazel-out/darwin-opt/bin/external/llvm-project/llvm/config.cppmap' '-fmodule-map-file=bazel-out/darwin-opt/bin/external/bazel_tools/tools/cpp/malloc.cppmap' -c external/llvm-project/llvm/utils/TableGen/Attributes.cpp -o bazel-out/darwin-opt/bin/external/llvm-project/llvm/_objs/llvm-min-tblgen/Attributes.o)
# Configuration: 453baf4879e102ee5df052ec6087622b871704c7bccc3f61df28e0cf20545b9f
# Execution platform: @local_execution_config_platform//:platform
In file included from external/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
In file included from /usr/local/include/llvm/TableGen/Record.h:17:
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12:
In file included from /usr/local/include/llvm/ADT/Hashing.h:48:
In file included from /usr/local/include/llvm/Support/ErrorHandling.h:17:
In file included from /usr/local/include/llvm/Support/Compiler.h:18:
/usr/local/include/llvm/Config/llvm-config.h:21:9: warning: 'LLVM_DEFAULT_TARGET_TRIPLE' macro redefined [-Wmacro-redefined]
#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-apple-darwin22.3.0"
        ^
<command line>:34:9: note: previous definition is here
#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-unknown-darwin"
        ^
In file included from external/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
In file included from /usr/local/include/llvm/TableGen/Record.h:17:
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12:
In file included from /usr/local/include/llvm/ADT/Hashing.h:48:
In file included from /usr/local/include/llvm/Support/ErrorHandling.h:17:
In file included from /usr/local/include/llvm/Support/Compiler.h:18:
/usr/local/include/llvm/Config/llvm-config.h:30:9: warning: 'LLVM_HOST_TRIPLE' macro redefined [-Wmacro-redefined]
#define LLVM_HOST_TRIPLE "x86_64-apple-darwin22.3.0"
        ^
<command line>:33:9: note: previous definition is here
#define LLVM_HOST_TRIPLE "x86_64-unknown-darwin"
        ^
In file included from external/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
In file included from /usr/local/include/llvm/TableGen/Record.h:17:
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12:
In file included from /usr/local/include/llvm/ADT/Hashing.h:48:
In file included from /usr/local/include/llvm/Support/ErrorHandling.h:17:
In file included from /usr/local/include/llvm/Support/Compiler.h:18:
/usr/local/include/llvm/Config/llvm-config.h:33:9: warning: 'LLVM_NATIVE_ARCH' macro redefined [-Wmacro-redefined]
#define LLVM_NATIVE_ARCH X86
        ^
<command line>:25:9: note: previous definition is here
#define LLVM_NATIVE_ARCH "X86"
        ^
In file included from external/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
In file included from /usr/local/include/llvm/TableGen/Record.h:17:
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12:
In file included from /usr/local/include/llvm/ADT/Hashing.h:48:
In file included from /usr/local/include/llvm/Support/ErrorHandling.h:17:
In file included from /usr/local/include/llvm/Support/Compiler.h:18:
/usr/local/include/llvm/Config/llvm-config.h:69:9: warning: 'LLVM_VERSION_MAJOR' macro redefined [-Wmacro-redefined]
#define LLVM_VERSION_MAJOR 15
        ^
<command line>:35:9: note: previous definition is here
#define LLVM_VERSION_MAJOR 17
        ^
In file included from external/llvm-project/llvm/utils/TableGen/Attributes.cpp:9:
In file included from /usr/local/include/llvm/TableGen/Record.h:17:
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12:
In file included from /usr/local/include/llvm/ADT/Hashing.h:48:
In file included from /usr/local/include/llvm/Support/ErrorHandling.h:17:
In file included from /usr/local/include/llvm/Support/Compiler.h:18:
/usr/local/include/llvm/Config/llvm-config.h:78:9: warning: 'LLVM_VERSION_STRING' macro redefined [-Wmacro-redefined]
#define LLVM_VERSION_STRING "15.0.0git"
        ^
<command line>:38:9: note: previous definition is here
#define LLVM_VERSION_STRING "17.0.0git"
        ^
external/llvm-project/llvm/utils/TableGen/Attributes.cpp:134:8: error: use of undeclared identifier 'TableGen'
static TableGen::Emitter::OptClass<Attributes> X("gen-attrs",
       ^
5 warnings and 1 error generated.
Target //build:build_wheel failed to build
INFO: Elapsed time: 2.317s, Critical Path: 1.64s
INFO: 34 processes: 23 internal, 11 local.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully
b''
Traceback (most recent call last):
  File "build/build.py", line 564, in <module>
    main()
  File "build/build.py", line 559, in main
    shell(command)
  File "build/build.py", line 53, in shell
    output = subprocess.check_output(cmd)
  File "/Users/davidlaxer/anaconda3/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/davidlaxer/anaconda3/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./bazel-5.1.1-darwin-x86_64', 'run', '--verbose_failures=true', ':build_wheel', '--', '--output_path=/Users/davidlaxer/PySR/jax/dist', '--cpu=x86_64']' returned non-zero exit status 1.

What jax/jaxlib version are you using?

jaxlib-v0.4.10

Which accelerator(s) are you using?

MPS AMD GPU

Additional system info

Python 3.8, MacOS 13.5

NVIDIA GPU info

No response

hawkinsp commented 1 year ago

I'm not sure what's up here, given we routinely build jaxlib on Mac.

The paths like /usr/local/include/llvm/Support/Compiler.h make me think that for some reason a system LLVM is involved: it should not be.

dbl001 commented 1 year ago

There's a llvm-project built from github which installed with files in /usr/local/include and /usr/local/bin. There's also one from MacPorts

% port list llvm-15
llvm-15                        @15.0.7         lang/llvm-15

Then there's the Apple version. What's the correct version to build jaxlib on the Mac? How do I specify which version to use (e.g. environment variable, build flag?

hawkinsp commented 1 year ago

You shouldn't be using any of these. The jaxlib build downloads its own LLVM version. I'm not sure how or why these are getting picked up, but one thing you could try is removing the MacPorts LLVM release.

dbl001 commented 1 year ago

The trace shows /usr/local ... but MacPorts would be in /opt/local. So, it's picking up the github version of llvm-project that was built and installed. Somehow,it seems that it's using my search path to find the include files and not one's that are local to the jaxlib build.

dbl001 commented 1 year ago

Also, issue finding xla:

% python build/build.py --bazel_options=--@xla//xla/python:enable_tpu=true
ERROR: @xla//xla/python:enable_tpu :: Error loading option @xla//xla/python:enable_tpu: no such package '@xla//xla/python': The repository '@xla' could not be resolved

If I remove ' --bazel_options=--@xla//xla/python:enable_tpu=true', then,

(ai) (jax-metal) davidlaxer@BlueDiamond-2 jax % export CC=/usr/local/bin/clang
export CXX=/usr/local/bin/clang++
 % /usr/local/bin/clang --version
clang version 15.0.0 (https://github.com/llvm/llvm-project.git 89818f2dc0b6edeaf9f74ada513ebe489de8ba40)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /usr/local/bin

% python build/build.py         

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

WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
Bazel binary path: ./bazel-3.7.2-darwin-x86_64
Python binary path: /Users/davidlaxer/jax-metal/bin/python
Python version: 3.8
NumPy version: 1.24.4
SciPy version: 1.10.1
MKL-DNN enabled: yes
Target CPU features: release
CUDA enabled: no
TPU enabled: no
ROCm enabled: no

Building XLA and installing it in the jaxlib source tree...
./bazel-3.7.2-darwin-x86_64 run --verbose_failures=true --config=short_logs --config=avx_posix --config=mkl_open_source_only :build_wheel -- --output_path=/Users/davidlaxer/jax/dist
WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /Users/davidlaxer/jax/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /Users/davidlaxer/jax/.bazelrc:
  Inherited 'build' options: --repo_env PYTHON_BIN_PATH=/Users/davidlaxer/jax-metal/bin/python --action_env=PYENV_ROOT --python_path=/Users/davidlaxer/jax-metal/bin/python --repo_env TF_NEED_CUDA=0 --action_env TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0 --repo_env TF_NEED_ROCM=0 --action_env TF_ROCM_AMDGPU_TARGETS=gfx803,gfx900,gfx906,gfx1010 --distinct_host_configuration=false -c opt --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true --spawn_strategy=standalone --strategy=Genrule=standalone --enable_platform_specific_config
INFO: Found applicable config definition build:short_logs in file /Users/davidlaxer/jax/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:avx_posix in file /Users/davidlaxer/jax/.bazelrc: --copt=-mavx --host_copt=-mavx
INFO: Found applicable config definition build:mkl_open_source_only in file /Users/davidlaxer/jax/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:macos in file /Users/davidlaxer/jax/.bazelrc: --config=posix
INFO: Found applicable config definition build:posix in file /Users/davidlaxer/jax/.bazelrc: --copt=-Wno-sign-compare --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
Loading: 
Loading: 0 packages loaded
DEBUG: /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software.
Analyzing: target //build:build_wheel (0 packages loaded, 0 targets configured)
Analyzing: target //build:build_wheel (0 packages loaded, 0 targets configured)
Analyzing: target //build:build_wheel (0 packages loaded, 0 targets configured)
DEBUG: Rule 'io_bazel_rules_docker' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1556410077 -0400"
DEBUG: Repository io_bazel_rules_docker instantiated at:
  /Users/davidlaxer/jax/WORKSPACE:34:10: in <toplevel>
  /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/external/org_tensorflow/tensorflow/workspace0.bzl:108:34: in workspace
  /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/external/bazel_toolchains/repositories/repositories.bzl:37:23: in repositories
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/4c4f1ae93ea7477ccb4772007fc78313f5a0644f.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //build:build_wheel (1 packages loaded, 2450 targets configured).
INFO: Found 1 target...
[0 / 5] [Prepa] BazelWorkspaceStatusAction stable-status.txt
ERROR: /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/external/flatbuffers/grpc/src/compiler/BUILD:75:11: C++ compilation of rule '@flatbuffers//grpc/src/compiler:python_generator_private' failed (Exit 1): cc_wrapper.sh failed: error executing command 
  (cd /private/var/tmp/_bazel_davidlaxer/8ad43b8709647bf5741554c65757d353/execroot/__main__ && \
  exec env - \
    PATH='/Users/davidlaxer/.opam/_coq-platform_.2021.02.1/bin:/usr/local/bin:/Users/davidlaxer/jax-metal/bin:/Users/davidlaxer/.juliaup/bin:/Users/davidlaxer/.cabal/bin:/Users/davidlaxer/.ghcup/bin:/Users/davidlaxer/anaconda3/envs/ai/bin:/Users/davidlaxer/anaconda3/condabin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/davidlaxer/.cargo/bin:/Users/jetbrains/.local/bin' \
    PWD=/proc/self/cwd \
    TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0 \
    TF_ROCM_AMDGPU_TARGETS=gfx803,gfx900,gfx906,gfx1010 \
  external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -MD -MF bazel-out/darwin-opt/bin/external/flatbuffers/grpc/src/compiler/_objs/python_generator_private/python_generator.d '-frandom-seed=bazel-out/darwin-opt/bin/external/flatbuffers/grpc/src/compiler/_objs/python_generator_private/python_generator.o' -iquote external/flatbuffers -iquote bazel-out/darwin-opt/bin/external/flatbuffers -Ibazel-out/darwin-opt/bin/external/flatbuffers/grpc/src/compiler/_virtual_includes/python_generator_private -Ibazel-out/darwin-opt/bin/external/flatbuffers/_virtual_includes/flatbuffers -Ibazel-out/darwin-opt/bin/external/flatbuffers/src/_virtual_includes/flatbuffers -Wno-sign-compare -mavx '-std=c++14' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/flatbuffers/grpc/src/compiler/python_generator.cc -o bazel-out/darwin-opt/bin/external/flatbuffers/grpc/src/compiler/_objs/python_generator_private/python_generator.o)
Execution platform: @local_execution_config_platform//:platform
external/flatbuffers/grpc/src/compiler/python_generator.cc:19:10: fatal error: 'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 error generated.
Target //build:build_wheel failed to build
INFO: Elapsed time: 7.957s, Critical Path: 0.65s
INFO: 33 processes: 28 internal, 5 local.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully
b''
Traceback (most recent call last):
  File "build/build.py", line 564, in <module>
    main()
  File "build/build.py", line 559, in main
    shell(command)
  File "build/build.py", line 52, in shell
    output = subprocess.check_output(cmd)
  File "/Users/davidlaxer/anaconda3/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/davidlaxer/anaconda3/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./bazel-3.7.2-darwin-x86_64', 'run', '--verbose_failures=true', '--config=short_logs', '--config=avx_posix', '--config=mkl_open_source_only', ':build_wheel', '--', '--output_path=/Users/davidlaxer/jax/dist']' returned non-zero exit status 1.
dbl001 commented 1 year ago

Successfully built 'jaxlib' with Python 3.9.