4

I notice that LLVM 3.3 is deprecated and start to install llvm 3.8.1->llvmlite->llvmpy->numba

I download and compile llvm 3.8.1 source (I am not sure whether I should download other packages like clang)

and simply cmake. (I didn't find REQUIRES_RTTI=1 options this time)

then I point LLVM_CONFIG to the llvm-config produced by cmake and try to pip install --user livelite, however:

/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status make: *** [libllvmlite.so] Error 1 3.8.1

Traceback (most recent call last):
  File "/tmp/pip-build-Kr1kPD/llvmlite/ffi/build.py", line 152, in <module>
    main()
  File "/tmp/pip-build-Kr1kPD/llvmlite/ffi/build.py", line 142, in main
    main_posix('linux', '.so')
  File "/tmp/pip-build-Kr1kPD/llvmlite/ffi/build.py", line 134, in main_posix
    subprocess.check_call(['make', '-f', makefile])
  File "/usr/local/software/python2/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/usr/local/bin/python2' failed with exit status 1

----------------------------------------
    Command "/usr/local/bin/python2 -u -c "import setuptools,      tokenize;__file__='/tmp/pip-build-Kr1kPD/llvmlite/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0a3VQ7-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-Kr1kPD/llvmlite/

It maybe due to I didnot install libedit-dev.

Do you whether it is caused by this? and Can I install libedit-dev on centos without root authority?


Below is obsolete information, which should be ignored, keep it only as historical record.

I install llvm according to this instruction, and encounter the error below when import it. http://www.llvmpy.org/

Can anyone tell me what is the problem.

I download the LLVM source code, the version is 3.3

BTW: I set llvm with: "./configure --enable-optimized --prefix=/home/wliax/llvm_liwei"

However, after "REQUIRES_RTTI=1 make", the compiled library is at:

"/home/wliax/llvm/llvm-3.3.src/Release+Asserts/bin/llvm-config"

so I then use:

"LLVM_CONFIG_PATH=/home/wliax/llvm/llvm-3.3.src/Release+Asserts/bin/llvm-config python setup.py install --user"

so the llvmpy lib is at "/homes/wliax/.local/lib/python2.7/site-packages"

import llvm Traceback (most recent call last): File "", line 1, in File "/homes/wliax/.local/lib/python2.7/site-packages/llvm/init.py", line 7, in from llvmpy import extra File "/homes/wliax/.local/lib/python2.7/site-packages/llvmpy/extra.py", line 6, in from llvmpy import _api ImportError: /homes/wliax/.local/lib/python2.7/site-packages/llvmpy/_api.so: undefined symbol: _ZTVNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE

Wei Li
  • 41
  • 4

0 Answers0