Skip to content

Install llvmpy with MinGW32

valtron edited this page Nov 2, 2014 · 5 revisions

Install prebuilt

LLVMPy can be downloaded as a prebuilt executable from http://www.lfd.uci.edu/~gohlke/pythonlibs/ (works for me) or from https://github.com/dand-oss/numba-windows-binaries (crashes for me).

Building from source

  • add C:\LLVM\llvm-{version}\bin to your path
  • pip install -e git+git://github.com/llvmpy/llvmpy.git#egg=llvmpy
  • it'll fail; cd into src/llvmpy
  • in src/llvmpy/setup.py, change default_llvm_config for win32 to 'llvm-config'
  • error I got was the typical "vcvarsall.bat" thing; add distutils.cfg with "[build]\ncompiler=mingw32" into C:/Python27/Lib/distutils
  • running again will likely give you a "-mno-cygwin" error; to fix this, go into Lib/distutils, remove "-mno-cygwin" option for cygwincompiler.py (should appear 4 times)

llvmpy should build now. However, it looks like there are bugs SOMEWHERE, I don't know where. The code crashes sometimes. For example, always when trying to print a module, it crashes. It does work limitedly, though. It was possible for me to create and execute a short function (adds two numbers).