LLVM error with python binding

I’ve installed tvm on ubuntu 14.04 with llvm 5.0. Python package installation was done without any errors. But when I import tvm in python, I got following errors.

hws@ubuntu:~/tvm$ python Python 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4] on linux2 Type “help”, “copyright”, “credits” or “license” for more information.

import tvm Traceback (most recent call last): File “”, line 1, in File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/init.py”, line 5, in from . import tensor File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/tensor.py”, line 4, in from ._ffi.node import NodeBase, NodeGeneric, register_node, convert_to_node File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/_ffi/node.py”, line 8, in from .node_generic import NodeGeneric, convert_to_node, const File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/_ffi/node_generic.py”, line 7, in from .base import string_types File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/_ffi/base.py”, line 43, in _LIB, _LIB_NAME = _load_lib() File “/home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/_ffi/base.py”, line 35, in _load_lib lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL) File “/usr/lib/python2.7/ctypes/init.py”, line 365, in init self._handle = _dlopen(self._name, mode) OSError: /home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/libtvm.so: undefined symbol: set_curterm

Anyone knows how to fix this error?

Thanks Turing

Keypoint: OSError: /home/hws/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/libtvm.so: undefined symbol: set_curterm

You could compile LLVM with this link flag: -lcurses

Thank you for your reply.
I’ve used prebuilt llvm.
So you mean I have to compile llvm from source?
Thanks.