BackupGGCode / llvm-py

Python bindings for LLVM
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SVN head against LLVM head? #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm getting problems with some LLVM 2.3 stuff and would like to try
LLVM-HEAD, but llvm-py-HEAD don't seem to work with LLVM-HEAD. (errors
attached).

Would be good to have a stable version compatible with latest LLVM stable
version and make sure llvm-py-HEAD at least compiles with LLVM-HEAD.

Any idea about this specific error?

--
~/llvm-py$ python setup.py build
Using llvm-config=llvm-config
running build
running build_py
copying llvm/core.py -> build/lib.linux-i686-2.5/llvm
running build_ext
building 'llvm._core' extension
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/llvm
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -D__STDC_LIMIT_MACROS -D_GNU_SOURCE
-I/usr/local/include -I/usr/include/python2.5 -c llvm/_core.c -o
build/temp.linux-i686-2.5/llvm/_core.o
llvm/_core.c: In function ‘_wLLVMHasInitializer’:
llvm/_core.c:404: warning: implicit declaration of function
‘LLVMHasInitializer’
llvm/_core.c: In function ‘_wLLVMGetCollector’:
llvm/_core.c:422: warning: implicit declaration of function 
‘LLVMGetCollector’
llvm/_core.c:422: warning: passing argument 1 of ‘PyString_FromString’
makes pointer from integer without a cast
llvm/_core.c: In function ‘_wLLVMSetCollector’:
llvm/_core.c:423: warning: implicit declaration of function 
‘LLVMSetCollector’
llvm/_core.c: In function ‘_wLLVMCreateExecutionEngine’:
llvm/_core.c:810: warning: passing argument 3 of ‘LLVMCreateJITCompiler’
makes integer from pointer without a cast
llvm/_core.c:810: error: too few arguments to function 
‘LLVMCreateJITCompiler’
error: command 'gcc' failed with exit status 1
--

This was using LLVM head and llvm-py HEAD.

Original issue reported on code.google.com by ph.silva on 18 Sep 2008 at 8:13

GoogleCodeExporter commented 9 years ago
I'm trying to fix this, by now I found two changes on LLVM head that breaks 
llvm-py:

see: 

svn diff -r 52834 ./include/llvm/Module.h
svn diff -r 52523 ./include/llvm-c/ExecutionEngine.h

agains LLVM HEAD (the first change relates to my original comment, the second 
will
only appear if you fix the first).

Original comment by ph.silva on 18 Sep 2008 at 8:49

GoogleCodeExporter commented 9 years ago
Follow a very very bad patch: It actually makes llmv-py build against LLVM head 
BUT
needs more changes to be a final one. Please don't commit it :) Just to feed the
discussions. Also follow the relevant revisions where most things changed on 
LLVM
that affects current llvm-py (just to make things easier to follow)

svn diff -r 52834 ./include/llvm/Module.h
svn diff -r 52523 ./include/llvm-c/ExecutionEngine.h
svn diff -r 53950 ./include/llvm/Support/IRBuilder.h
svn diff -r 53931 ./include/llvm/Support/IRBuilder.h
svn log -r r54822 ./include/llvm/Transforms/Scalar.h

Original comment by ph.silva on 18 Sep 2008 at 11:42

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry for the late reply.

Please see this:
http://mdevan.nfshost.com/llvm-py/userguide.html#llvm24

Original comment by mdevan.f...@gmail.com on 24 Sep 2008 at 11:16

GoogleCodeExporter commented 9 years ago
Alright, stupid me, sorry about that, I didn't saw that page before, just close 
this
bug, that's OK for me :) great work. Was a nice way to learn how to track LLVM 
API
changes anyway.

Original comment by ph.silva on 24 Sep 2008 at 11:40

GoogleCodeExporter commented 9 years ago
Do you have roadmap related to track next October 2.4 release of LLVM? Maybe do 
a
simultaneous release, would be great! I'll fetch the llpy-py 2.4 branch and 
test the
way I could here.

Original comment by ph.silva on 24 Sep 2008 at 11:43

GoogleCodeExporter commented 9 years ago
Well, there's no roadmap. I'll naturally be attempting to make a release as 
soon as
LLVM 2.4 is done.

Closing.

Original comment by mdevan.f...@gmail.com on 26 Sep 2008 at 5:00

GoogleCodeExporter commented 9 years ago

Original comment by mdevan.f...@gmail.com on 26 Sep 2008 at 5:00