llvmpy在Ubuntu Server 12.04上

时间:2013-03-05 13:45:47

标签: python enthought llvm-3.0

我正在尝试使用edpFree 7.3-2在ubuntu 12.04上安装llvmpy

# uname -a 
Linux svnserver 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:   precise

在pip命令之后我收到错误:

#./pip install llvmpy
Downloading/unpacking llvmpy
  Running setup.py egg_info for package llvmpy
    LLVM version = u'3.0'
    Generate intrinsic IDs
    Searching shared library libLLVM-3.0 in /usr/lib/llvm-3.0/lib
    Using PTX
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build/llvmpy/setup.py", line 136, in <module>
        + extra_components)
      File "/tmp/pip-build/llvmpy/setup.py", line 41, in get_libs_and_objs
        parts = run_llvm_config(['--libs'] + components).split()
      File "/tmp/pip-build/llvmpy/setup.py", line 34, in run_llvm_config
        raise Exception("%r stderr is:\n%s" % (args, stderr.decode()))
    Exception: ['llvm-config', '--libs', 'core', 'analysis', 'scalaropts', 'executionengine', 'jit', 'native', 'interpreter', 'bitreader', 'bitwriter', 'instrumentation', 'ipa', 'ipo', 'transformutils', 'asmparser', 'linker', 'support', 'vectorize', 'ptxdesc', 'ptxcodegen', 'ptxasmprinter', 'ptxinfo', 'ptx'] stderr is:
    llvm-config: unknown component name: vectorize

    Complete output from command python setup.py egg_info:
    LLVM version = u'3.0'

Generate intrinsic IDs

Searching shared library libLLVM-3.0 in /usr/lib/llvm-3.0/lib

Using PTX

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build/llvmpy/setup.py", line 136, in <module>

    + extra_components)

  File "/tmp/pip-build/llvmpy/setup.py", line 41, in get_libs_and_objs

    parts = run_llvm_config(['--libs'] + components).split()

  File "/tmp/pip-build/llvmpy/setup.py", line 34, in run_llvm_config

    raise Exception("%r stderr is:\n%s" % (args, stderr.decode()))

Exception: ['llvm-config', '--libs', 'core', 'analysis', 'scalaropts', 'executionengine', 'jit', 'native', 'interpreter', 'bitreader', 'bitwriter', 'instrumentation', 'ipa', 'ipo', 'transformutils', 'asmparser', 'linker', 'support', 'vectorize', 'ptxdesc', 'ptxcodegen', 'ptxasmprinter', 'ptxinfo', 'ptx'] stderr is:

llvm-config: unknown component name: vectorize

问题在于矢量化组件!

作为我安装的先决条件(使用aptitude):

llvm-3.0
llvm-3.0-dev
llvm-3.0-runtime
libllvm3.0

可能3.0必须替换为3.1?

你能帮助我吗?

1 个答案:

答案 0 :(得分:3)

您至少需要llvm-3.1具有声明为缺失的组件:

$ llvm-config --libs vectorize
-lLLVMVectorize -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
$ llvm-config --version
3.1

虽然如果可能的话我会考虑3.3,因为那里的开发似乎有reached a reasonable point

修改:似乎正在提取llvmpy-0.11.0,预计会llvm-3.2。使用:

pip install -I llvmpy==0.10.0

而是获取与llvm-3.1绑定的版本。经过测试:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal