Compiling error: library not found for -llibxml2.tbd

Today I tried to rebuild tvm dylib on mac, meet this error: [100%] Linking CXX shared library libtvm.dylib ld: library not found for -llibxml2.tbd clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have built tvm successfully several days ago following installation on the website and git pull some new code then. It seems that the new code causes this problem.

I have found /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libxml2.tbd and added this path to LD_LIBRARY_PATH, dont know why it still happen

1 Like

what is your “cmake.config”?

FYI, there are some discussions about this issue happening in other projects:


Thank you for your reply. The only line I changed in cmake.config is LLVM path, like this set(USE_LLVM /usr/local/opt/llvm/bin/llvm-config)

1 Like

Thank you, it really helps.

1 Like

@hogepodge has a nice summary of this issue: LLVM 10 on macOS with Homebrew

1 Like