Issue 1:
Please:

Check for duplicate issues.

Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:

Build from source.

Run the full test suite.

If applicable, include full error messages/tracebacks.

Errors

I'm seeing loads of errors of the form

2022-07-28T00:41:03.1426552Z stderr: > self.assertEqual(tangents[1].dtype, dtypes.float0)
2022-07-28T00:41:03.1427091Z stderr: E AssertionError: dtype('bool') != dtype([('float0', 'V')])

It seems to be affecting 59 tests:

2022-07-28T00:41:03.1428063Z stderr: =========================== short test summary info ============================
2022-07-28T00:41:03.1456495Z stderr: FAILED tests/api_test.py::APITest::test_float0_reshape - AssertionError: dtyp...
2022-07-28T00:41:03.1457678Z stderr: FAILED tests/api_test.py::APITest::test_float0_error - KeyError: dtype([('flo...
2022-07-28T00:41:03.1461929Z stderr: FAILED tests/api_test.py::APITest::test_grad_of_bool - KeyError: dtype([('flo...
2022-07-28T00:41:03.1462520Z stderr: FAILED tests/api_test.py::APITest::test_jit_jvp_of_int - AssertionError: (dty...
2022-07-28T00:41:03.1463325Z stderr: FAILED tests/api_test.py::APITest::test_grad_of_int - KeyError: dtype([('floa...
2022-07-28T00:41:03.1463925Z stderr: FAILED tests/api_test.py::APITest::test_grad_of_int_index - TypeError: a byte...
2022-07-28T00:41:03.1464520Z stderr: FAILED tests/api_test.py::APITest::test_issue_871 - TypeError: reduce_sum doe...
2022-07-28T00:41:03.1465103Z stderr: FAILED tests/api_test.py::APITest::test_vjp_of_int_index - TypeError: a bytes...
2022-07-28T00:41:03.1465685Z stderr: FAILED tests/api_test.py::APITest::test_jvp_of_int_add - AssertionError: (dty...
2022-07-28T00:41:03.1466273Z stderr: FAILED tests/api_test.py::APITest::test_jit_grad_of_int - TypeError: a bytes-...
2022-07-28T00:41:03.1466856Z stderr: FAILED tests/api_test.py::APITest::test_jit_vjp_of_int - TypeError: Called ad...
2022-07-28T00:41:03.1467420Z stderr: FAILED tests/api_test.py::APITest::test_vjp_of_int_shapes - TypeError: (Shape...
2022-07-28T00:41:03.1468005Z stderr: FAILED tests/api_test.py::APITest::test_vjp_of_int_fulllike - KeyError: dtype...
2022-07-28T00:41:03.1468604Z stderr: FAILED tests/api_test.py::CustomJVPTest::test_float0 - AssertionError: dtype(...
2022-07-28T00:41:03.1469198Z stderr: FAILED tests/api_test.py::CustomJVPTest::test_float0_initial_style - Assertio...
2022-07-28T00:41:03.1469786Z stderr: FAILED tests/api_test.py::CustomVJPTest::test_float0 - KeyError: dtype([('flo...
2022-07-28T00:41:03.1470267Z stderr: FAILED tests/api_test.py::CleanupTest::test_call_wrapped_second_phase_cleanup
2022-07-28T00:41:03.1470855Z stderr: FAILED tests/api_test.py::CustomVJPTest::test_float0_initial_style - Assertio...
2022-07-28T00:41:03.1471446Z stderr: FAILED tests/core_test.py::CoreTest::test_reference_cycles_jit - AssertionErr...
2022-07-28T00:41:03.1471942Z stderr: FAILED tests/lax_numpy_indexing_test.py::IndexingTest::testJVPOfGradOfIndexing
2022-07-28T00:41:03.1472485Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testOperatorOverload__lshift___uint16_uint32[]
2022-07-28T00:41:03.1473052Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testOperatorOverload__rshift___uint16_uint32[]
2022-07-28T00:41:03.1473765Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testDeleteIndexArray_bool[1,4]_axis=-1_idx=pyint64
2022-07-28T00:41:03.1474342Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testDeleteIndexArray_uint16[2,3,4]_axis=2_idx=int64
2022-07-28T00:41:03.1474905Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testDeleteIndexArray_uint32[2,3,4]_axis=2_idx=int64
2022-07-28T00:41:03.1475440Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testPiecewise_bfloat16_ncond=3_nfunc=3
2022-07-28T00:41:03.1475967Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testPiecewise_int16_ncond=1_nfunc=2
2022-07-28T00:41:03.1476496Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testPiecewise_pyint32_ncond=2_nfunc=2
2022-07-28T00:41:03.1477073Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testRightOperatorOverload__rlshift___uint16_uint32[]
2022-07-28T00:41:03.1477781Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testRightOperatorOverload__rrshift___uint16_uint32[]
2022-07-28T00:41:03.1478374Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testTake_bfloat16[3,4]_index=pyint32_axis=None_mode=clip
2022-07-28T00:41:03.1478937Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testTake_int16[3,4]_index=pyint16_axis=None_mode=None
2022-07-28T00:41:03.1479638Z stderr: FAILED tests/lax_numpy_test.py::LaxBackedNumpyTests::testTake_int32[3,4,5]_index=int32_axis=-1_mode=None
2022-07-28T00:41:03.1480350Z stderr: FAILED tests/lax_numpy_test.py::NumpySignaturesTest::testWrappedSignaturesMatch
2022-07-28T00:41:03.1480994Z stderr: FAILED tests/nn_test.py::NNFunctionsTest::testSoftplusGrad - KeyError: dtype(...
2022-07-28T00:41:03.1481614Z stderr: FAILED tests/nn_test.py::NNFunctionsTest::testSoftplusGradInf - KeyError: dty...
2022-07-28T00:41:03.1482225Z stderr: FAILED tests/nn_test.py::NNFunctionsTest::testSoftplusGradNan - KeyError: dty...
2022-07-28T00:41:03.1482946Z stderr: FAILED tests/nn_test.py::NNFunctionsTest::testSoftplusGradNegInf - KeyError: ...
2022-07-28T00:41:03.1483575Z stderr: FAILED tests/nn_test.py::NNFunctionsTest::testSoftplusGradZero - KeyError: dt...
2022-07-28T00:41:03.1484343Z stderr: FAILED tests/random_test.py::LaxRandomTest::testPermutation_dtype=<class 'numpy.float32'>_range_or_shape=(0, 5)_axis=-1_independent=False
2022-07-28T00:41:03.1485153Z stderr: FAILED tests/random_test.py::LaxRandomTest::testPermutation_dtype=<class 'numpy.float32'>_range_or_shape=(0, 5)_axis=-2_independent=True
2022-07-28T00:41:03.1486016Z stderr: FAILED tests/random_test.py::LaxRandomTest::testPermutation_dtype=<class 'numpy.int32'>_range_or_shape=(0, 5)_axis=-1_independent=False
2022-07-28T00:41:03.1486822Z stderr: FAILED tests/random_test.py::LaxRandomTest::testPermutation_dtype=<class 'numpy.int32'>_range_or_shape=(0,)_axis=-1_independent=False
2022-07-28T00:41:03.1487372Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_complex64[5,5]
2022-07-28T00:41:03.1487859Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_complex64[5,8]
2022-07-28T00:41:03.1488375Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_complex64[8,5]
2022-07-28T00:41:03.1488849Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_complex64[8,8]
2022-07-28T00:41:03.1489320Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_float32[5,5]
2022-07-28T00:41:03.1489790Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_float32[5,8]
2022-07-28T00:41:03.1490252Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_float32[8,5]
2022-07-28T00:41:03.1490709Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_csr_fromdense_ad_float32[8,8]
2022-07-28T00:41:03.1491169Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_complex64[5,5]
2022-07-28T00:41:03.1491650Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_complex64[5,8]
2022-07-28T00:41:03.1492124Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_complex64[8,5]
2022-07-28T00:41:03.1492595Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_complex64[8,8]
2022-07-28T00:41:03.1493069Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_float32[5,5]
2022-07-28T00:41:03.1493516Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_float32[5,8]
2022-07-28T00:41:03.1493974Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_float32[8,5]
2022-07-28T00:41:03.1494438Z stderr: FAILED tests/sparse_test.py::cuSparseTest::test_coo_fromdense_ad_float32[8,8]
2022-07-28T00:41:03.1494868Z stderr: ========= 59 failed, 14190 passed, 1447 skipped in 1589.83s (0:26:29) ==========

You can access the full build logs here: https://github.com/samuela/nixpkgs-upkeep/runs/7551101765?check_suite_focus=true.

To me, this indicates a dependency version issue, possibly with numpy. However, all of the versions are within their constraints as far as python setup.py build is concerned. Here are the relevant pip freeze dependency versions:

[nix-shell:~/dev/nixpkgs]$ pip freeze
absl-py @ file:///build/absl-py-1.0.0/dist/absl_py-1.0.0-py3-none-any.whl
flatbuffers @ file:///build/source/python/dist/flatbuffers-2.0.0-py2.py3-none-any.whl
jax @ file:///build/source/dist/jax-0.3.6-py3-none-any.whl
jaxlib @ file:///build/dist/jaxlib-0.3.0-cp39-none-manylinux2010_x86_64.whl
numpy @ file:///build/numpy-1.21.5/dist/numpy-1.21.5-cp39-cp39-linux_x86_64.whl
opt-einsum @ file:///build/opt_einsum-3.3.0/dist/opt_einsum-3.3.0-py3-none-any.whl
SciPy @ file:///build/scipy-1.8.0/dist/SciPy-1.8.0-cp39-cp39-linux_x86_64.whl
six @ file:///build/six-1.16.0/dist/six-1.16.0-py2.py3-none-any.whl
typing_extensions @ file:///build/typing_extensions-4.1.1/dist/typing_extensions-4.1.1-py3-none-any.whl

More information is available in the CI run linked above.

Issue 2:
I'm trying to install JAX and ran into different problems with different approaches:

When building source, I got an error message saying gcc versions later than 7 are not supported, despite the fact my gcc version is 6.3.0:

INFO: Invocation ID: e47c8044-2dc9-43e8-a08b-6a3d96bf5376
Bazel binary path: ./bazel-0.22.0-linux-x86_64
Python binary path: /home/labs/adamh/miniconda3/bin/python
MKL-DNN enabled: yes
-march=native: no
CUDA enabled: yes
CUDA toolkit path: /usr/local/cuda
CUDNN library path: /apps/RH7U2/general/cudnn/10.1/

Building XLA and installing it in the jaxlib source tree...
INFO: Invocation ID: 363bb8f2-fc0c-405f-91ea-3d77ef9db18b
DEBUG: /home/labs/adamh/.cache/bazel/_bazel_adamh/63707596de86748e21162cbeff2def7e/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5:
Auto-Configuration Warning: 'TMP' environment variable is not set, using 'C:\Windows\Temp' as default
INFO: Analysed target //build:install_xla_in_source_tree (1 packages loaded, 1 target configured).
INFO: Found 1 target...
INFO: From Compiling external/llvm/lib/Support/VirtualFileSystem.cpp:
external/llvm/lib/Support/VirtualFileSystem.cpp: In member function 'std::unique_ptr<llvm::vfs::RedirectingFileSystem::Entry> llvm::vfs::RedirectingFileSystemParser::parseEntry(llvm::yaml::Node*, llvm::vfs::RedirectingFileSystem*, bool)':
external/llvm/lib/Support/VirtualFileSystem.cpp:1421:5: warning: 'Kind' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (Kind) {
^~~~~~
external/llvm/lib/Support/VirtualFileSystem.cpp:1112:66: warning: 'NameValueNode' may be used uninitialized in this function [-Wmaybe-uninitialized]
void error(yaml::Node *N, const Twine &Msg) { Stream.printError(N, Msg); }
~~~~~~~~~~~~~~~~~^~~~~~~~
external/llvm/lib/Support/VirtualFileSystem.cpp:1282:17: note: 'NameValueNode' was declared here
yaml::Node *NameValueNode;
^~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/Support/YAMLParser.cpp:
external/llvm/lib/Support/YAMLParser.cpp: In member function 'bool llvm::yaml::Scanner::findBlockScalarIndent(unsigned int&, unsigned int, unsigned int&, bool&)':
external/llvm/lib/Support/YAMLParser.cpp:1517:17: warning: 'LongestAllSpaceLine' may be used uninitialized in this function [-Wmaybe-uninitialized]
setError(
~~~~~~~~^
"Leading all-spaces line must be smaller than the block indent",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LongestAllSpaceLine);
~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/Support/UnicodeCaseFold.cpp:
external/llvm/lib/Support/UnicodeCaseFold.cpp:8:1: warning: multi-line comment [-Wcomment]
// utils/unicode-case-fold.py \
^
INFO: From Compiling external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp:
external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp: In member function 'virtual llvm::Error llvm::codeview::TypeRecordMapping::visitKnownRecord(llvm::codeview::CVType&, llvm::codeview::VFTableShapeRecord&)':
external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp:282:66: warning: 'Byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
Record.Slots.push_back(static_cast<VFTableSlotKind>(Byte >> 4));
~~~~~^~~~
INFO: From Compiling external/llvm/lib/MC/MachObjectWriter.cpp:
external/llvm/lib/MC/MachObjectWriter.cpp: In member function 'void llvm::MachObjectWriter::writeNlist(llvm::MachObjectWriter::MachSymbolData&, const llvm::MCAsmLayout&)':
external/llvm/lib/MC/MachObjectWriter.cpp:379:13: warning: 'AliaseeInfo' may be used uninitialized in this function [-Wmaybe-uninitialized]
Address = AliaseeInfo->StringIndex;
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/MC/ELFObjectWriter.cpp:
external/llvm/lib/MC/ELFObjectWriter.cpp: In function 'uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)':
external/llvm/lib/MC/ELFObjectWriter.cpp:1188:36: warning: 'AddrsigSection' may be used uninitialized in this function [-Wmaybe-uninitialized]
SectionOffsets[AddrsigSection] = std::make_pair(SecStart, SecEnd);
^
INFO: From Compiling external/protobuf_archive/src/google/protobuf/descriptor.cc:
external/protobuf_archive/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::Symbol google::protobuf::DescriptorPool::NewPlaceholderWithMutexHeld(const string&, google::protobuf::DescriptorPool::PlaceholderType) const':
external/protobuf_archive/src/google/protobuf/descriptor.cc:3893:58: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
memset(placeholder_enum, 0, sizeof(*placeholder_enum));
^
In file included from external/protobuf_archive/src/google/protobuf/message.h:122,
from external/protobuf_archive/src/google/protobuf/descriptor.pb.h:29,
from external/protobuf_archive/src/google/protobuf/descriptor.cc:52:
external/protobuf_archive/src/google/protobuf/descriptor.h:885:26: note: 'class google::protobuf::EnumDescriptor' declared here
class LIBPROTOBUF_EXPORT EnumDescriptor {
^~~~~~~~~~~~~~
external/protobuf_archive/src/google/protobuf/descriptor.cc:3907:60: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::EnumValueDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
memset(placeholder_value, 0, sizeof(*placeholder_value));
^
In file included from external/protobuf_archive/src/google/protobuf/message.h:122,
from external/protobuf_archive/src/google/protobuf/descriptor.pb.h:29,
from external/protobuf_archive/src/google/protobuf/descriptor.cc:52:
external/protobuf_archive/src/google/protobuf/descriptor.h:1040:26: note: 'class google::protobuf::EnumValueDescriptor' declared here
class LIBPROTOBUF_EXPORT EnumValueDescriptor {
^~~~~~~~~~~~~~~~~~~
external/protobuf_archive/src/google/protobuf/descriptor.cc:3926:64: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::Descriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
memset(placeholder_message, 0, sizeof(*placeholder_message));
^
In file included from external/protobuf_archive/src/google/protobuf/message.h:122,
from external/protobuf_archive/src/google/protobuf/descriptor.pb.h:29,
from external/protobuf_archive/src/google/protobuf/descriptor.cc:52:
external/protobuf_archive/src/google/protobuf/descriptor.h:223:26: note: 'class google::protobuf::Descriptor' declared here
class LIBPROTOBUF_EXPORT Descriptor {
^~~~~~~~~~
external/protobuf_archive/src/google/protobuf/descriptor.cc: In member function 'google::protobuf::FileDescriptor* google::protobuf::DescriptorPool::NewPlaceholderFileWithMutexHeld(const string&) const':
external/protobuf_archive/src/google/protobuf/descriptor.cc:3960:46: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class google::protobuf::FileDescriptor' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
memset(placeholder, 0, sizeof(*placeholder));
^
In file included from external/protobuf_archive/src/google/protobuf/message.h:122,
from external/protobuf_archive/src/google/protobuf/descriptor.pb.h:29,
from external/protobuf_archive/src/google/protobuf/descriptor.cc:52:
external/protobuf_archive/src/google/protobuf/descriptor.h:1283:26: note: 'class google::protobuf::FileDescriptor' declared here
class LIBPROTOBUF_EXPORT FileDescriptor {
^~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-writable-strings'
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/service/hlo_profile_printer_data.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/service/hlo.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/core/example/example.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/service/gpu/backend_configs.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/xla.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/service/gpu/autotuning.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/stream_executor/logging.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/compiler/xla/xla_data.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/stream_executor/dnn.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From ProtoCompile external/org_tensorflow/tensorflow/core/grappler/costs/op_performance_data.pb.cc:
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist.
INFO: From Compiling external/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:
external/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp: In function 'void getIntOperandsFromRegisterString(llvm::StringRef, llvm::SelectionDAG*, const llvm::SDLoc&, std::vector<llvm::SDValue, std::allocator<llvm::SDValue> >&)':
external/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:3843:16: warning: 'IntField' may be used uninitialized in this function [-Wmaybe-uninitialized]
unsigned IntField;
^~~~~~~~
INFO: From Compiling external/org_tensorflow/tensorflow/compiler/xla/service/algebraic_simplifier.cc:
external/org_tensorflow/tensorflow/compiler/xla/service/algebraic_simplifier.cc:3676:6: warning: 'bool xla::{anonymous}::AlgebraicSimplifierVisitor::TransformToClampIfSameShape(xla::HloInstruction*, xla::HloInstruction*, xla::HloInstruction*, xla::HloInstruction*, xla::HloInstruction*, xla::HloInstruction*)' defined but not used [-Wunused-function]
bool AlgebraicSimplifierVisitor::TransformToClampIfSameShape(
^~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp:
external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp: In member function 'virtual llvm::Error llvm::codeview::TypeRecordMapping::visitKnownRecord(llvm::codeview::CVType&, llvm::codeview::VFTableShapeRecord&)':
external/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp:282:66: warning: 'Byte' may be used uninitialized in this function [-Wmaybe-uninitialized]
Record.Slots.push_back(static_cast<VFTableSlotKind>(Byte >> 4));
~~~~~^~~~
INFO: From Compiling external/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:
external/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp: In function 'int llvm::X86Disassembler::decodeInstruction(llvm::X86Disassembler::InternalInstruction*, llvm::X86Disassembler::byteReader_t, const void*, llvm::X86Disassembler::dlog_t, void*, const void*, uint64_t, llvm::X86Disassembler::DisassemblerMode)':
external/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:1902:53: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct llvm::X86Disassembler::InternalInstruction'; use assignment or value-initialization instead [-Wclass-memaccess]
memset(insn, 0, sizeof(struct InternalInstruction));
^
In file included from external/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp:20:
external/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h:524:8: note: 'struct llvm::X86Disassembler::InternalInstruction' declared here
struct InternalInstruction {
^~~~~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/MC/MachObjectWriter.cpp:
external/llvm/lib/MC/MachObjectWriter.cpp: In member function 'void llvm::MachObjectWriter::writeNlist(llvm::MachObjectWriter::MachSymbolData&, const llvm::MCAsmLayout&)':
external/llvm/lib/MC/MachObjectWriter.cpp:379:13: warning: 'AliaseeInfo' may be used uninitialized in this function [-Wmaybe-uninitialized]
Address = AliaseeInfo->StringIndex;
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/MC/ELFObjectWriter.cpp:
external/llvm/lib/MC/ELFObjectWriter.cpp: In function 'uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)':
external/llvm/lib/MC/ELFObjectWriter.cpp:1188:36: warning: 'AddrsigSection' may be used uninitialized in this function [-Wmaybe-uninitialized]
SectionOffsets[AddrsigSection] = std::make_pair(SecStart, SecEnd);
^
INFO: From Compiling external/org_tensorflow/tensorflow/compiler/xla/service/gpu/thunk.cc:
external/org_tensorflow/tensorflow/compiler/xla/service/gpu/thunk.cc: In function 'std::ostream& xla::gpu::operator<<(std::ostream&, xla::gpu::Thunk::Kind)':
external/org_tensorflow/tensorflow/compiler/xla/service/gpu/thunk.cc:62:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
INFO: From Compiling external/llvm/lib/Transforms/Scalar/GVNHoist.cpp:
external/llvm/lib/Transforms/Scalar/GVNHoist.cpp:137:1: warning: multi-line comment [-Wcomment]
// / \
^
INFO: From Compiling external/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp:
external/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp:350:5: warning: multi-line comment [-Wcomment]
// / | \
^
INFO: From Compiling external/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:
external/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp: In function 'llvm::Value* FindLIVLoopCondition(llvm::Value*, llvm::Loop*, bool&, OperatorChain&, llvm::DenseMap<llvm::Value*, llvm::Value*>&)':
external/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:474:7: warning: 'NewChain' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (NewChain != OC_OpChainMixed) {
^~
INFO: From Compiling external/llvm/lib/Transforms/Scalar/MergeICmps.cpp:
external/llvm/lib/Transforms/Scalar/MergeICmps.cpp:484:7: warning: multi-line comment [-Wcomment]
// \ \ \ \
^
external/llvm/lib/Transforms/Scalar/MergeICmps.cpp:745:3: warning: multi-line comment [-Wcomment]
// \ \ \ \
^
INFO: From Compiling external/llvm/lib/Transforms/Scalar/SROA.cpp:
external/llvm/lib/Transforms/Scalar/SROA.cpp: In member function 'llvm::iterator_range<llvm::sroa::AllocaSlices::partition_iterator> llvm::sroa::AllocaSlices::partitions()':
external/llvm/lib/Transforms/Scalar/SROA.cpp:355:19: warning: '<anonymous>.llvm::sroa::Partition::BeginOffset' may be used uninitialized in this function [-Wmaybe-uninitialized]
class llvm::sroa::Partition {
^~~~~~~~~
external/llvm/lib/Transforms/Scalar/SROA.cpp:355:19: warning: '<anonymous>.llvm::sroa::Partition::EndOffset' may be used uninitialized in this function [-Wmaybe-uninitialized]
external/llvm/lib/Transforms/Scalar/SROA.cpp: In function 'llvm::Value* getAdjustedPtr({anonymous}::IRBuilderTy&, const llvm::DataLayout&, llvm::Value*, llvm::APInt, llvm::Type*, llvm::Twine)':
external/llvm/lib/Transforms/Scalar/SROA.cpp:1585:34: warning: 'OffsetBasePtr' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (OffsetPtr && OffsetPtr != OffsetBasePtr)
~~~~~~~~~~^~~~~~~~~~~~~~~~
INFO: From Compiling external/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:
external/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:1201:3: warning: multi-line comment [-Wcomment]
// | ----------------\
^
INFO: From Compiling external/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:
external/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp: In function 'bool unswitchBestCondition(llvm::Loop&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::AssumptionCache&, llvm::TargetTransformInfo&, llvm::function_ref<void(bool, llvm::ArrayRef<llvm::Loop*>)>, llvm::ScalarEvolution*, llvm::MemorySSAUpdater*)':
external/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2740:3: warning: 'BestUnswitchCost' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (BestUnswitchCost >= UnswitchThreshold) {
^~
INFO: From Compiling external/org_tensorflow/tensorflow/core/framework/common_shape_fns.cc:
In file included from external/org_tensorflow/tensorflow/core/util/padding.h:26,
from external/org_tensorflow/tensorflow/core/framework/common_shape_fns.h:21,
from external/org_tensorflow/tensorflow/core/framework/common_shape_fns.cc:15:
external/org_tensorflow/tensorflow/core/util/tensor_format.h: In function 'int tensorflow::GetTensorDimsFromSpatialDims(int, tensorflow::TensorFormat)':
external/org_tensorflow/tensorflow/core/util/tensor_format.h:148:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
external/org_tensorflow/tensorflow/core/util/tensor_format.h: In function 'int tensorflow::GetTensorSpatialDims(int, tensorflow::TensorFormat)':
external/org_tensorflow/tensorflow/core/util/tensor_format.h:124:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
INFO: From Compiling external/org_tensorflow/tensorflow/core/framework/tensor_util.cc:
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc: In function 'bool tensorflow::tensor::internal::PackedValuesNotEqual(T, T) [with T = float]':
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc:250:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast<int32_t&>(a) != reinterpret_cast<int32_t&>(b);
^
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc:250:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast<int32_t&>(a) != reinterpret_cast<int32_t&>(b);
^
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc: In function 'bool tensorflow::tensor::internal::PackedValuesNotEqual(T, T) [with T = double]':
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc:254:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast<int64_t&>(a) != reinterpret_cast<int64_t&>(b);
^
external/org_tensorflow/tensorflow/core/framework/tensor_util.cc:254:71: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast<int64_t&>(a) != reinterpret_cast<int64_t&>(b);
^
INFO: From Compiling external/org_tensorflow/tensorflow/core/framework/op_kernel.cc:
In file included from external/org_tensorflow/tensorflow/core/framework/op_kernel.cc:49:
external/org_tensorflow/tensorflow/core/platform/platform_strings.h:96:1: warning: multi-line comment [-Wcomment]
// #define TF_PLAT_STR_(x) \
^
ERROR: /home/labs/adamh/.cache/bazel/_bazel_adamh/63707596de86748e21162cbeff2def7e/external/nccl_archive/BUILD.bazel:67:1: error while parsing .d file: /home/labs/adamh/.cache/bazel/_bazel_adamh/63707596de86748e21162cbeff2def7e/execroot/__main__/bazel-out/k8-opt/bin/external/nccl_archive/_objs/device_lib/max_all_gather.cu.d (No such file or directory)
In file included from /usr/local/cuda-9.2/bin/..//include/host_config.h:50,
from /usr/local/cuda-9.2/bin/..//include/cuda_runtime.h:78,
from <command-line>:
/usr/local/cuda-9.2/bin/..//include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
#error -- unsupported GNU version! gcc versions later than 7 are not supported!
^~~~~
Target //build:install_xla_in_source_tree failed to build
INFO: Elapsed time: 462.630s, Critical Path: 50.51s
INFO: 1198 processes: 1198 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "build/build.py", line 313, in <module>
main()
File "build/build.py", line 309, in main
[":install_xla_in_source_tree", os.getcwd()])
File "build/build.py", line 50, in shell
output = subprocess.check_output(cmd)
File "/home/labs/adamh/miniconda3/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/labs/adamh/miniconda3/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['./bazel-0.22.0-linux-x86_64', 'run', '--verbose_failures=true', '--config=mkl_open_source_only', '--config=cuda', ':install_xla_in_source_tree', '/home/labs/adamh/jax/build']' returned non-zero exit status 1.

When I tried to pip install jaxlib+jax, installation seemed to go OK, but when I tried to import jax I got the following error message:

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-122f308a8eba> in <module>
----> 1 import jax.numpy as np

~/jax/jax/__init__.py in <module>
17
18 from jax.version import __version__
---> 19 from jax.api import *
20 import jax.numpy as np # side-effecting import sets up operator overloads

~/jax/jax/api.py in <module>
44 from .util import (unzip2, unzip3, curry, partial, safe_map, safe_zip,
45 WrapHashably, prod)
---> 46 from .lib.xla_bridge import canonicalize_dtype, device_count
47 from .abstract_arrays import ShapedArray
48 from .interpreters import partial_eval as pe

~/jax/jax/lib/xla_bridge.py in <module>
31 import numpy as onp # 'onp' rather than 'np' to distinguish from autograd.numpy
32
---> 33 import jaxlib
34
35 # Check the jaxlib version before importing anything else from jaxlib.

~/miniconda3/lib/python3.6/site-packages/jaxlib/__init__.py in <module>
13 # limitations under the License.
14
---> 15 from . import xla_client
16 from .version import __version__
17

~/miniconda3/lib/python3.6/site-packages/jaxlib/xla_client.py in <module>
36 # and TensorFlow may fail with duplicate protocol buffer message definitions.
37
---> 38 from . import pywrap_xla as c_api
39
40 # Import the XRT backend, if available.

~/miniconda3/lib/python3.6/site-packages/jaxlib/pywrap_xla.py in <module>
26 fp.close()
27 return _mod
---> 28 _pywrap_xla = swig_import_helper()
29 del swig_import_helper
30 else:

~/miniconda3/lib/python3.6/site-packages/jaxlib/pywrap_xla.py in swig_import_helper()
22 if fp is not None:
23 try:
---> 24 _mod = imp.load_module('_pywrap_xla', fp, pathname, description)
25 finally:
26 fp.close()

~/miniconda3/lib/python3.6/imp.py in load_module(name, file, filename, details)
241 return load_dynamic(name, filename, opened_file)
242 else:
--> 243 return load_dynamic(name, filename, file)
244 elif type_ == PKG_DIRECTORY:
245 return load_package(name, filename)

~/miniconda3/lib/python3.6/imp.py in load_dynamic(name, path, file)
341 spec = importlib.machinery.ModuleSpec(
342 name=name, loader=loader, origin=path)
--> 343 return _load(spec)
344
345 else:

ImportError: /lib64/libm.so.6: version `GLIBC_2.23' not found (required by /home/labs/adamh/miniconda3/lib/python3.6/site-packages/jaxlib/_pywrap_xla.so)

Any help would be much appreciated!