문제

I'm trying to install llvmpy on ubuntu 12.04 using edpFree 7.3-2

# 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

After the pip command I receive an error:

#./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

The problem is on vectorize component !

As prerequisite I installed (using aptitude):

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

May be the 3.0 must be replaced with 3.1 ?

Can You help me ?

도움이 되었습니까?

해결책

You would want at least llvm-3.1 which has the component that is declared as missing:

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

Though I would consider 3.3 if possible, as that's where development on that appears to have reached a reasonable point.

Edit: Looks like llvmpy-0.11.0 is being pulled in which expects llvm-3.2. Use:

pip install -I llvmpy==0.10.0

instead to get the version that binds against llvm-3.1. Tested on:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top