2

Trying to make a python script having numba 0.33.0 as dependency work on ubuntu 14.0.4. Have installed llvm 6.0 for the same and set the llvm_config variable to llvm_config location.

Facing issues while building llvmlite

Following is the stack trace

Installing collected packages: 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(compile(code, __file__, '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:
    running install
    running build
    got version from file /tmp/pip-install-lca77547/llvmlite/llvmlite/_version.py {'full': '02bd87a8449bb2984e9791bdd1d653338442b6b8', 'version': '0.23.2'}

▽
    running build_ext
    /home/ubuntu/www/Spam_detection_algo/spam/bin/python3 /tmp/pip-install-lca77547/llvmlite/ffi/build.py
    LLVM version... # static-libstdc++ avoids runtime dependencies on a
    # particular libstdc++ version.
    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.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp object_file.cpp -o libllvmlite.so  -L/usr/lib/llvm-6.0/lib -flto -Wl,--exclude-libs=ALL -lLLVM-6.0
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    cc1plus: error: -Werror=date-time: no option -Wdate-time
    make: *** [libllvmlite.so] Error 1
    6.0.1

    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
dbc
  • 104,963
  • 20
  • 228
  • 340

2 Answers2

1

Please check your LLVM_CONFIG environment variable as noted here.

If your LLVM is installed in a nonstandard location, set the LLVM_CONFIG environment variable to the location of the corresponding llvm-config or llvm-config.exe executable. This variable must persist into the installation of llvmlite—for example, into a Python environment.

EXAMPLE: If LLVM is installed in /opt/llvm/ with the llvm-config binary located at /opt/llvm/bin/llvm-config, set LLVM_CONFIG=/opt/llvm/bin/llvm-config.

Yushan ZHANG
  • 523
  • 5
  • 18
-1

with numba -s I found with python 3.11 numba 0.57.0

    __SVML Information__
    SVML State, config.USING_SVML                 : False
    SVML Library Loaded                           : True
    llvmlite Using SVML Patched LLVM              : False
    SVML Operational                              : False

I installed

    +intel/win-64::icc_rt-2023.1.0-intel_46319
    +conda-forge/win-64::llvmlite-0.40.1-py311h5bc0dda_0

after installing

conda install -c numba llvmlite

the llvmlite new version is now

llvmlite Version : 0.40.1+0.ga4e5632.dirty

and numba -s report now:

    __SVML Information__
    SVML State, config.USING_SVML                 : True
    SVML Library Loaded                           : True
    llvmlite Using SVML Patched LLVM              : True
    SVML Operational                              : True    
dbc
  • 104,963
  • 20
  • 228
  • 340
  • @dbc, Hi, many thanks for your really nice correction/presentation ! I was surprised by the fact that my post was send without my 'conscience' ... – Zaza Danslemetro Sep 02 '23 at 23:37