build tvm failed on macos

I try to install tvm as described at http://docs.tvm.ai/install/index.html.
When I run
make -j8
,I get the following error message:
c++ -std=c++11 -Wall -O2 -Iinclude -I/Users/dongxiao/working/tvm/dlpack/include -I/Users/dongxiao/working/tvm/dmlc-core/include -IHalideIR/src -Itopi/include -fPIC -DTVM_CUDA_RUNTIME=0 -DTVM_ROCM_RUNTIME=0 -DTVM_OPENCL_RUNTIME=0 -DTVM_VULKAN_RUNTIME=0 -DTVM_OPENGL_RUNTIME=0 -DTVM_METAL_RUNTIME=0 -DTVM_SGX_RUNTIME=0 -I/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/ -framework Accelerate -shared -o lib/libtvm_runtime.dylib build/runtime/c_dsl_api.o build/runtime/c_runtime_api.o build/runtime/cpu_device_api.o build/runtime/dso_module.o build/runtime/file_util.o build/runtime/module.o build/runtime/module_util.o build/runtime/registry.o build/runtime/system_lib_module.o build/runtime/thread_pool.o build/runtime/threading_backend.o build/runtime/workspace_pool.o build/runtime/rpc/rpc_device_api.o build/runtime/rpc/rpc_event_impl.o build/runtime/rpc/rpc_module.o build/runtime/rpc/rpc_server_env.o build/runtime/rpc/rpc_session.o build/runtime/rpc/rpc_socket_impl.o build/runtime/graph/graph_runtime.o build/contrib/cblas/cblas.o -pthread -lm -ldl -Wl,-Bsymbolic-functions -L/Users/dongxiao/tools/clang/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF -lLLVMMIRParser -lLLVMCoverage -lLLVMTableGen -lLLVMDlltoolDriver -lLLVMOrcJIT -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiAsmPrinter -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMBPFAsmPrinter -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMObjectYAML -lLLVMLibDriver -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMLineEditor -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMTarget -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMScalarOpts -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lcurses -lz -lm -lc++abi
ld: unknown option: -Bsymbolic-functions
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/libtvm_runtime.dylib] Error 1
make: *** Waiting for unfinished jobs…
ar crv lib/libHalideIR.a build/arithmetic/Deinterleave.o build/arithmetic/Interval.o build/arithmetic/ModulusRemainder.o build/arithmetic/Simplify.o build/arithmetic/Substitute.o build/base/Debug.o build/base/Error.o build/base/Float16Opt.o build/base/Type.o build/base/Util.o build/ir/IR.o build/ir/IREquality.o build/ir/IRMutator.o build/ir/IROperator.o build/ir/IRPrinter.o build/ir/IRVisitor.o build/tvm/node.o
a - build/arithmetic/Deinterleave.o
a - build/arithmetic/Interval.o
a - build/arithmetic/ModulusRemainder.o
a - build/arithmetic/Simplify.o
a - build/arithmetic/Substitute.o
a - build/base/Debug.o
a - build/base/Error.o
a - build/base/Float16Opt.o
a - build/base/Type.o
a - build/base/Util.o
a - build/ir/IR.o
a - build/ir/IREquality.o
a - build/ir/IRMutator.o
a - build/ir/IROperator.o
a - build/ir/IRPrinter.o
a - build/ir/IRVisitor.o
a - build/tvm/node.o
1 warning generated.
I only make one modification in config.mk file as listed follows:
LLVM_CONFIG = /Users/dongxiao/tools/clang/bin/llvm-config

The operation system used is macos 10.13.3 (17D47)

please try to update tvm to the latest version and retry again. The option has been removed in latest version

Thanks for your reply.I tried the new version and the previous error disappeared.But when I run the opt_gemm.py in tutorials(tutorials/optimize/opt_gemm.py), I got the target check error as follows:

Check failed! bf != nullptr Target llvm is not enabled.

I’m sure the LLVM_CONFIG path in config.mk is right.

I have solved that by using CMake. I set the ‘USE_LLVM’ in the CMakeList.txt to ‘ON’. Then using ‘cmake …’ and ‘amek -j8’.

How did you manage to install the target libraries for macOS?

I am unable to get these running. sudo apt-get update sudo apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev

Please let me know.