On Nov 5, 2009, at 11:00, Andrew MacKinlay <admac...@gmail.com> wrote:

Hi,

I'm trying to wrap the LingPipe library (http://alias-i.com/lingpipe/web/download.html ) using JCC.

I've had a couple of problems - one seems to be fixed by simply excluding a class that I don't think I need (I can also post separate info about that problem if anyone's interested) but the other is trickier.

I'm running OS X 10.5 with macpython 2.5, java 1.6.0_15, and GCC 4.0.1, although I get a very similar problem on Ubuntu 9.04 64 bit with python 2.6 and GCC 4.3.3.

I'm using the following command line (obviously the lingpipe jar is in the parent dir): python -m jcc --jar ../lingpipe-3.8.2.jar --build --python lingpipe --version 3.8.2 --files 4 --exclude com.aliasi.xml.XHtmlWriter

Things go fine apart from a few warnings until it dies with the following:

/Library/Python/2.5/site-packages/JCC-2.4-py2.5-macosx-10.5-i386.egg/ jcc/sources/functions.h: In function ‘PyObject* get_iterator_next(T* ) [with T = java::util::t_Iterator, U = java::lang::t_Integer, V = j ava::lang::Integer]’:
build/_lingpipe/__wrap04__.cpp:15874:   instantiated from here
/Library/Python/2.5/site-packages/JCC-2.4-py2.5-macosx-10.5-i386.egg/ jcc/sources/functions.h:116: error: no match for ‘operator=’ in ‘next = java::util::Iterator::next() const()’ build/_lingpipe/java/lang/Integer.h:20: note: candidates are: java::lang::Integer& java::lang::Integer::operator=(const java::lang::Integer&) /Library/Python/2.5/site-packages/JCC-2.4-py2.5-macosx-10.5-i386.egg/ jcc/sources/functions.h: In function ‘PyObject* get_iterator_next(T* ) [with T = java::util::t_Iterator, U = java::lang::t_Integer, V = j ava::lang::Integer]’:
build/_lingpipe/__wrap04__.cpp:15874:   instantiated from here
/Library/Python/2.5/site-packages/JCC-2.4-py2.5-macosx-10.5-i386.egg/ jcc/sources/functions.h:116: error: no match for ‘operator=’ in ‘next = java::util::Iterator::next() const()’ build/_lingpipe/java/lang/Integer.h:20: note: candidates are: java::lang::Integer& java::lang::Integer::operator=(const java::lang::Integer&) lipo: can't open input file: /var/folders/-x/-xosmfE4GNewB80LEz2rG+++ +TI/-Tmp-//ccGnGDoB.out (No such file or directory)
error: command 'gcc' failed with exit status 1

I can build PyLucene fine on both test systems.

Does anyone have any idea what's going on here?

Someone reported a similar error recently with the same get_iterator_next template. I wasn't able to reproduce it, though.

Maybe a way to sidestep the problem -or to get a better clue as to what the bug is - would be to try to use JCC from svn trunk. This template has changed there.

Another thing to try could be to increase the number of files to generate thus generating smaller ones and then maybe avoiding some compiler limit that may be triggering this.

Of course, there is also the possibility of a JCC bug that, for example, could be leaving out a required header file. The way to test for this condition is to generate one .cpp file per class via the "-- files separate" option and watch for errors. Come to think of it, this is what I would try first.

Andi..


Thanks,
Andy

Reply via email to