Cannot build on OSX

Hi,

I am trying to build TVM on a Mac running 10.15.4 following this: https://tvm.apache.org/docs/install/from_source.html

When building I run into the following error

[ 8%] Building CXX object CMakeFiles/tvm_runtime.dir/src/runtime/container.cc.o [32/2736] Undefined symbols for architecture x86_64: "_VTADeviceAlloc", referenced from: vta::CommandQueue::InitSpace() in runtime.cc.o "_VTADeviceFree", referenced from: vta::CommandQueue::~CommandQueue() in runtime.cc.o "_VTADeviceRun", referenced from: vta::CommandQueue::Synchronize(unsigned int) in runtime.cc.o "_VTAFlushCache", referenced from: vta::UopQueue<33554432, true, true>::ReadBarrier() in runtime.cc.o vta::InsnQueue<33554432, true, true>::ReadBarrier() in runtime.cc.o "_VTAMemAlloc", referenced from: vta::DataBuffer::Alloc(unsigned long) in runtime.cc.o vta::BaseQueue<VTAUop>::InitSpace(unsigned int, unsigned int, bool, bool) in runtime.cc.o vta::BaseQueue<VTAGenericInsn>::InitSpace(unsigned int, unsigned int, bool, bool) in runtime.cc.o "_VTAMemCopyFromHost", referenced from: _VTABufferCopy in runtime.cc.o vta::UopQueue<33554432, true, true>::ReadBarrier() in runtime.cc.o vta::InsnQueue<33554432, true, true>::ReadBarrier() in runtime.cc.o "_VTAMemCopyToHost", referenced from: _VTABufferCopy in runtime.cc.o "_VTAMemFree", referenced from: _VTABufferFree in runtime.cc.o std::__1::shared_ptr<vta::CommandQueue> std::__1::shared_ptr<vta::CommandQueue>::make_shared<>() in runtime.cc.o vta::InsnQueue<33554432, true, true>::~InsnQueue() in runtime.cc.o vta::UopQueue<33554432, true, true>::~UopQueue() in runtime.cc.o vta::UopQueue<33554432, true, true>::~UopQueue() in runtime.cc.o vta::BaseQueue<VTAUop>::~BaseQueue() in runtime.cc.o vta::BaseQueue<VTAUop>::~BaseQueue() in runtime.cc.o ... "_VTAMemGetPhyAddr", referenced from: vta::DataBuffer::Alloc(unsigned long) in runtime.cc.o vta::BaseQueue<VTAUop>::InitSpace(unsigned int, unsigned int, bool, bool) in runtime.cc.o vta::BaseQueue<VTAGenericInsn>::InitSpace(unsigned int, unsigned int, bool, bool) in runtime.cc.o "tvm::runtime::WorkspacePool::FreeWorkspace(DLContext, void*)", referenced from: tvm::runtime::VTADeviceAPI::FreeWorkspace(DLContext, void*) in device_api.cc.o "tvm::runtime::WorkspacePool::AllocWorkspace(DLContext, unsigned long)", referenced from: tvm::runtime::VTADeviceAPI::AllocWorkspace(DLContext, unsigned long, DLDataType) in device_api.cc.o "tvm::runtime::WorkspacePool::WorkspacePool(DLDeviceType, std::__1::shared_ptr<tvm::runtime::DeviceAPI>)", referenced from: tvm::runtime::VTAWorkspacePool::VTAWorkspacePool() in device_api.cc.o "tvm::runtime::WorkspacePool::~WorkspacePool()", referenced from: tvm::runtime::VTAWorkspacePool::~VTAWorkspacePool() in device_api.cc.o "tvm::runtime::Registry::Register(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", r eferenced from: __GLOBAL__sub_I_device_api.cc in device_api.cc.o "tvm::runtime::Registry::set_body(tvm::runtime::PackedFunc)", referenced from: tvm::runtime::Registry::set_body(std::__1::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>) in device_api.cc.o "tvm::runtime::DeviceAPI::FreeStream(DLContext, void*)", referenced from: vtable for tvm::runtime::VTADeviceAPI in device_api.cc.o "tvm::runtime::DeviceAPI::CreateStream(DLContext)", referenced from: vtable for tvm::runtime::VTADeviceAPI in device_api.cc.o "tvm::runtime::DeviceAPI::SyncStreamFromTo(DLContext, void*, void*)", referenced from: vtable for tvm::runtime::VTADeviceAPI in device_api.cc.o "typeinfo for tvm::runtime::DeviceAPI", referenced from: typeinfo for tvm::runtime::VTADeviceAPI in device_api.cc.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I saw the hint about -lc++abi, but not sure if I added the flag correctly by adding the following lines to the cmake config.

add_compile_options("-lc++abi")

link_libraries("-lc++abi")

Thanks

Works now with latest