我试图在OSX上安装llvmpy。我已从网站下载了llvm并将我的PATH变量设置为包含llvm的bin目录。
正在运行python setup.py build
我收到以下错误。
% python setup.py build
LLVM version = u'3.3'
Generate intrinsic IDs
Traceback (most recent call last):
File "setup.py", line 69, in <module>
auto_intrinsic_gen(incdir)
File "setup.py", line 60, in auto_intrinsic_gen
intrgen.gen(path, fout)
File "/Users/blah/repos/llvmpy-0.11.2/tools/intrgen.py", line 13, in gen
for line in open(f):
IOError: [Errno 2] No such file or directory: u'/Users/blah/repos/clang+llvm-3.3-x86_64-apple-darwin12/include/llvm/Intrinsics.gen'
我修改了setup.py文件以获得行
58 path = "%s/llvm/Intrinsics.gen" % incdir
而不是
58 path = "%s/llvm/IR/Intrinsics.gen" % incdir
我得到一个不同的错误: -
In file included from llvmpy/api.cpp:8:
llvmpy/include/llvm_binding/extra.h:3:10: fatal error: 'llvm/Value.h' file not found
#include <llvm/Value.h>
^
4 warnings and 1 error generated.
error: command 'cc' failed with exit status 1
我该如何解决这个问题?