2

尝试在 ubuntu 14.0.4 上制作一个具有 numba 0.33.0 作为依赖项的 python 脚本。已安装 llvm 6.0 并将 llvm_config 变量设置为 llvm_config 位置。

构建 llvmlite 时面临的问题

以下是堆栈跟踪

安装收集到的包:llvmlite, numba Running setup.py install for llvmlite ... error Complete output from command /home/ubuntu/www/Spam_detection_algo/spam/bin/python3 -u -c "import setuptools, tokenize; file ='/ tmp/pip-install-lca77547/llvmlite/setup.py';f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\r\n', '\ n');f.close();exec(编译(代码、文件), 'exec'))" install --record /tmp/pip-record-a53bsnug/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/www/Spam_detection_algo /spam/include/site/python3.4/llvmlite:运行安装运行构建从文件 /tmp/pip-install-lca77547/llvmlite/llvmlite/_version.py {'full':'02bd87a8449bb2984e9791bdd1d653338442b6b8','version': '0.23.2'}

▽ 运行 build_ext /home/ubuntu/www/Spam_detection_algo/spam/bin/python3 /tmp/pip-install-lca77547/llvmlite/ffi/bu​​ild.py LLVM 版本... # static-libstdc++ 避免运行时依赖于 # 特定的 libstdc++版本。g++ -shared -I/usr/lib/llvm-6.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole -files -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers - pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - fno-rtti -g -flto assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine。

SVML not detected
Traceback (most recent call last):
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 153, in <module>
    main()
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 143, in main
    main_posix('linux', '.so')
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 135, in main_posix
    subprocess.check_call(['make', '-f', makefile])
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/home/ubuntu/www/Spam_detection_algo/spam/bin/python3' failed with exit status 1
4

1 回答 1

1

请按照此处所述检查您的LLVM_CONFIG环境变量。

如果您的 LLVM 安装在非标准位置,请将 LLVM_CONFIG 环境变量设置为相应的 llvm-config 或 llvm-config.exe 可执行文件的位置。这个变量必须持续到 llvmlite 的安装中——例如,到 Python 环境中。

示例:如果 LLVM 安装在 /opt/llvm/ 中,而 llvm-config 二进制文件位于 /opt/llvm/bin/llvm-config,请设置 LLVM_CONFIG=/opt/llvm/bin/llvm-config。

于 2018-11-04T07:08:04.300 回答