Skip to content

Build TVM on MacOS failed #12987

@caifeiy

Description

@caifeiy

Only set USE_LLVM=ON

[ 26%] Building CXX object CMakeFiles/tvm_objs.dir/src/te/operation/create_primfunc.cc.o /Users/ycf/Desktop/code/tvm/src/te/autodiff/ad_simplify.cc:542:29: error: 'value' is unavailable: introduced in macOS 10.13 return var_pair_opt.value().first; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/optional:954:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ /Users/ycf/Desktop/code/tvm/src/te/autodiff/ad_simplify.cc:568:29: error: 'value' is unavailable: introduced in macOS 10.13 return var_pair_opt.value().second; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/optional:954:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ /Users/ycf/Desktop/code/tvm/src/te/autodiff/ad_simplify.cc:595:29: error: 'value' is unavailable: introduced in macOS 10.13 return var_pair_opt.value().first; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/optional:954:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ /Users/ycf/Desktop/code/tvm/src/te/autodiff/ad_simplify.cc:622:29: error: 'value' is unavailable: introduced in macOS 10.13 return var_pair_opt.value().second; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/optional:954:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ 4 errors generated. make[2]: *** [CMakeFiles/tvm_objs.dir/src/te/autodiff/ad_simplify.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 26%] Building CXX object CMakeFiles/tvm_objs.dir/src/te/operation/cross_thread_reduction.cc.o make[1]: *** [CMakeFiles/tvm_objs.dir/all] Error 2 make: *** [all] Error 2

[Environment]
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.3.0
Thread model: posix

Homebrew LLVM version 15.0.1
Optimized build.
Default target: arm64-apple-darwin21.3.0
Host CPU: apple-m1

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions