Problem of import tvm error

Hi, I was try import tvm, and I got a OSError: undefined symbol: _ZTVN4llvm19raw_svector_ostreamE it seems raw_svector_ostream defined in libLLVMSupport.a. why this happend?

Ooops it looks like some linking issues…What’s your output of ldd

An overkill would be just ignore and use the static LLVM. Could you try to link LLVM using something like

set(USE_LLVM "/usr/bin/llvm-config-8 --ignore-libllvm")

This would link libLLVM.a instead

1 Like

will, I find there is no, I build llvm from source. is this the reason?

My guess is that your is not in system’s search path. Your might be interested in adding it to env vars like LD_LIBRARY_PATH

My LLVM library is located /usr/local/lib, And I search the build directory lib path ,still no I try Ninja organize compile, it get the undefine error, as I use gnu makefile, it seems worked well.

set(USE_LLVM “/usr/bin/llvm-config-8 --ignore-libllvm”) it worked! thinks

1 Like