Skip to content

Instantly share code, notes, and snippets.

@bfroehle
Created August 21, 2012 17:50
Show Gist options
  • Save bfroehle/3417840 to your computer and use it in GitHub Desktop.
Save bfroehle/3417840 to your computer and use it in GitHub Desktop.
$ LLVM_CONFIG_PATH=llvm-config-3.1 python setup.py build
LLVM version = 3.1
Generate intrinsic IDs
Using PTX
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/llvm
copying llvm/__init__.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/core.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/_intrinsic_ids.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/test_llvmpy.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/ee.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/passes.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/_util.py -> build/lib.linux-x86_64-2.7/llvm
running build_ext
building 'llvm._core' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/llvm
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/_core.cpp -o build/temp.linux-x86_64-2.7/llvm/_core.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/wrap.cpp -o build/temp.linux-x86_64-2.7/llvm/wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/extra.cpp -o build/temp.linux-x86_64-2.7/llvm/extra.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/llvm/_core.o build/temp.linux-x86_64-2.7/llvm/wrap.o build/temp.linux-x86_64-2.7/llvm/extra.o -L/usr/lib/llvm-3.1/lib -lpthread -lm -lstdc++ -ldl -lLLVMPTXCodeGen -lLLVMPTXDesc -lLLVMPTXInfo -lLLVMPTXAsmPrinter -lLLVMLinker -lLLVMArchive -lLLVMAsmParser -lLLVMipo -lLLVMVectorize -lLLVMInstrumentation -lLLVMBitWriter -lLLVMBitReader -lLLVMInterpreter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser -lLLVMMCParser -lLLVMX86Disassembler -lLLVMX86Desc -lLLVMX86AsmPrinter -lLLVMX86Info -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMExecutionEngine -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -o build/lib.linux-x86_64-2.7/llvm/_core.so -fPIC
$ cd build/
$ PYTHONPATH=lib.linux-x86_64-2.7 python -c "import llvm.core"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bfroehle/src/llvmpy/build/lib.linux-x86_64-2.7/llvm/core.py", line 38, in <module>
import llvm._core as _core # C wrappers
ImportError: /home/bfroehle/src/llvmpy/build/lib.linux-x86_64-2.7/llvm/_core.so: undefined symbol: ffi_type_sint16
$
$ LLVM_CONFIG_PATH=llvm-config-3.1 python setup.py build
LLVM version = 3.1
Generate intrinsic IDs
Using PTX
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/llvm
copying llvm/__init__.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/core.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/_intrinsic_ids.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/test_llvmpy.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/ee.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/passes.py -> build/lib.linux-x86_64-2.7/llvm
copying llvm/_util.py -> build/lib.linux-x86_64-2.7/llvm
running build_ext
building 'llvm._core' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/llvm
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/_core.cpp -o build/temp.linux-x86_64-2.7/llvm/_core.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/wrap.cpp -o build/temp.linux-x86_64-2.7/llvm/wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -I/usr/include -I/usr/lib/llvm-3.1/include -I/usr/include/python2.7 -c llvm/extra.cpp -o build/temp.linux-x86_64-2.7/llvm/extra.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/llvm/_core.o build/temp.linux-x86_64-2.7/llvm/wrap.o build/temp.linux-x86_64-2.7/llvm/extra.o -L/usr/lib/llvm-3.1/lib -lLLVMPTXCodeGen -lLLVMPTXDesc -lLLVMPTXInfo -lLLVMPTXAsmPrinter -lLLVMLinker -lLLVMArchive -lLLVMAsmParser -lLLVMipo -lLLVMVectorize -lLLVMInstrumentation -lLLVMBitWriter -lLLVMBitReader -lLLVMInterpreter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser -lLLVMMCParser -lLLVMX86Disassembler -lLLVMX86Desc -lLLVMX86AsmPrinter -lLLVMX86Info -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMExecutionEngine -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -o build/lib.linux-x86_64-2.7/llvm/_core.so -L/usr/lib/llvm-3.1/lib -lpthread -lffi -ldl -lm
$ cd build/
$ PYTHONPATH=lib.linux-x86_64-2.7 python -c "import llvm.core"
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment