You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUILD] Improve CMake to allow specify llvm-config #1200
Hello, I'm trying to build tvm with LLVM support. I use LLVM 6.0 from Ubuntu 18.04. However, after
building tvm and importing it in python I get the following:
$ export LD_LIBRARY_PATH=/path-to-tvm-build-dir/:$LD_LIBRARY_PATH
$ export PYTHONPATH=/path-to-tvm-src-dir/python:${PYTHONPATH}
$ python -c 'import tvm'
: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
After googling for a little while I found out that this problem comes from linking against llvm libs
twice. And indeed, while building tvm's .so files, it links against a bunch of libLLVMBlahBlah.a
files and also against libLLVM-6.0.so.1. Manually removing the latter seems to fix the problem. A quick and dirty workaround is to put list(REMOVE_ITEM LLVM_LIBS LLVM) after llvm_map_components_to_libnames(LLVM_LIBS all) in CMakeLists.txt. (Actually, there is already a
line removing LTO from the same list, not sure what it is, may be another workaround?)
Honestly, I'm not sure what would be a proper workaround, may be calling the llvm-config
executable.
Hmm, it seems that the CMake module for find LLVM is not functioning properly. Maybe we will need a customized version of CMake that calls llvm-config and also allows optional specification of llvm-config
changed the title [-]LLVM ERROR: inconsistency in registered CommandLine options[/-][+][BUILD] Improve CMake to allow specify llvm-config[/+]on May 31, 2018
Activity
tqchen commentedon May 31, 2018
Hmm, it seems that the CMake module for find LLVM is not functioning properly. Maybe we will need a customized version of CMake that calls
llvm-configand also allows optional specification of llvm-configtqchen commentedon May 31, 2018
We did that in Makefile version of build
[-]LLVM ERROR: inconsistency in registered CommandLine options[/-][+][BUILD] Improve CMake to allow specify llvm-config[/+]tqchen commentedon Jun 11, 2018
#1254