[SOLVED] Building TVM with LLVM not working on MacOS

I’ve downloaded a pre-built binary for LLVM 11.0. I then change the line in config.make to: set(USE_LLVM my/path/to/llvm/bin/llvm-config)

cgyurgyik@MacBook-Pro build % ninja             
[1/1] Linking CXX shared library libtvm.dylib
FAILED: libtvm.dylib 
: && /Library/Developer/CommandLineTools/usr/bin/c++ -std=c++14 -O2 -Wall -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -dynamiclib -Wl,-headerpad_max_install_names  -o libtvm.dylib -install_name @rpath/libtvm.dylib 
/Users/cgyurgyik/Projects/llvm-prebuilt/llvm/lib/libLLVMDemangle.a  -lz  -lcurses  -lm  -llibxml2.tbd && :
ld: library not found for -llibxml2.tbd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

I’m assuming I’ve made some small error in the installation process, but not entirely sure. This is my first time building TVM. I can add more of the error message as well if necessary.

I believe @hogepodge has a thread for this issue here: macOS Workarounds (formerly LLVM 10 on macOS with Homebrew)

1 Like

Yep, using 10.0.0 worked for me. Thanks!