[build error] no viable constructor or deduction guide for deduction of template arguments of 'Array'

Hi all, when I build TVM (latest version) from source, the compiling will crash and throw this error:

/workplace/software/tvm/tvm/src/tir/analysis/identify_memcpy.cc:298:27: error: no viable constructor or deduction guide for deduction of template arguments of 'Array'
        output->push_back(Array{ptr->source, ptr->dest});
                          ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:327:3: note: candidate template ignored: couldn't infer template argument ''
  Array(IterType first, IterType last) {
  ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:354:12: note: candidate template ignored: couldn't infer template argument ''
  explicit Array(const size_t n, const T& val) { data_ = ArrayNode::CreateRepeated(n, val); }
           ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:247:16: note: candidate function template not viable: requires 1 argument, but 2 were provided
  friend class Array;
               ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:296:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  Array() { data_ = ArrayNode::Empty(); }
  ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:302:3: note: candidate function template not viable: requires single argument 'other', but 2 arguments were provided
  Array(Array<T>&& other) : ObjectRef() {  // NOLINT(*)
  ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:310:3: note: candidate function template not viable: requires single argument 'other', but 2 arguments were provided
  Array(const Array<T>& other) : ObjectRef() {  // NOLINT(*)
  ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:318:12: note: candidate function template not viable: requires single argument 'n', but 2 arguments were provided
  explicit Array(ObjectPtr<Object> n) : ObjectRef(n) {}
           ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:337:3: note: candidate function template not viable: requires single argument 'init', but 2 arguments were provided
  Array(std::initializer_list<T> init) {  // NOLINT(*)
  ^
/workplace/software/tvm/tvm/include/tvm/runtime/container/array.h:345:3: note: candidate function template not viable: requires single argument 'init', but 2 arguments were provided
  Array(const std::vector<T>& init) {  // NOLINT(*)

The environments are as follows:

  • ubuntu 16.04
  • gcc/g++ 7.5
  • clang version 8.0.0-3

I need your help, any suggestions and advice are appreciated!