Re: odd error; JCC bug?

2012-11-10 Thread Andi Vajda


On Thu, 1 Nov 2012, Bill Janssen wrote:


I was trying to wrap the Java parts of JModelica.  So, here's a cookbook
to reproduce the problem:

 % svn checkout https://svn.jmodelica.org/tags/1.8 src
 % cd src/Compiler/ModelicaCompiler
 % setenv ANT_OPTS -Xmx1000m
 % ant
 % python -m jcc --jar ./bin/ModelicaCompiler.jar --jar ./bin/util.jar 
--include ../../ThirdParty/Beaver/beaver-0.9.6.1/lib/beaver.jar --python 
jcc_jmodelica --files 10 --reserved inline --build --install --rename 
java.awt.Component=AWTComponent

It fails on __wrap07__.cpp.  I didn't understand the error.  If I change
the "--jar ./bin/util.jar" to "--include ./bin/util.jar", it works OK.


Thank you for providing the specific steps to reproduce this.
I was able to reproduce and fix the bug which was due to a generic iterator 
returning T[].

The fix is in rev 1407922.

Andi..


Re: odd error; JCC bug?

2012-11-01 Thread Bill Janssen
Andi Vajda  wrote:

> 
>  Hi Bill,

Hi, Andi.

> On Thu, 1 Nov 2012, Bill Janssen wrote:
> 
> > I've installed JCC-2.14 in Python 2.7.3 on OS X Leopard with gcc-4.2,
> > and I'm trying to wrap a library with
> >
> > % python -m jcc --jar ../bin/GoodStuff.jar --jar ../bin/MoreGoodStuff.jar 
> > --include ../bin/Prereqs.jar --python goodstuff --files 10 --reserved 
> > inline --build --install --rename java.awt.Component=AWTComponent
> >
> > [GoodStuff defines another class called "Component", thus the need for the 
> > java.awt rename.]
> >
> > I get the following error:
> 
> It could very well be a bug.
> Does it break with 2.13 ?

Don't know.

> Can you send me some java source to reproduce this ?

I was trying to wrap the Java parts of JModelica.  So, here's a cookbook
to reproduce the problem:

  % svn checkout https://svn.jmodelica.org/tags/1.8 src
  % cd src/Compiler/ModelicaCompiler
  % setenv ANT_OPTS -Xmx1000m
  % ant
  % python -m jcc --jar ./bin/ModelicaCompiler.jar --jar ./bin/util.jar 
--include ../../ThirdParty/Beaver/beaver-0.9.6.1/lib/beaver.jar --python 
jcc_jmodelica --files 10 --reserved inline --build --install --rename 
java.awt.Component=AWTComponent

It fails on __wrap07__.cpp.  I didn't understand the error.  If I change
the "--jar ./bin/util.jar" to "--include ./bin/util.jar", it works OK.

Bill

> 
> Andi..
> 
> >
> > /local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:
> >  In function 'PyObject* get_generic_iterator_next(T*) [with T = 
> > java::util::t_Iterator, U = JArray]':
> > build/_goodstuff/__wrap04__.cpp:31896:   instantiated from here
> > /local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:184:
> >  error: 'wrap_jobject' is not a member of 'JArray'
> > cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
> > C/ObjC but not for C++
> > /local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:
> >  In function 'PyObject* get_generic_iterator_next(T*) [with T = 
> > java::util::t_Iterator, U = JArray]':
> > build/_goodstuff/__wrap04__.cpp:31896:   instantiated from here
> > /local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:184:
> >  error: 'wrap_jobject' is not a member of 'JArray'
> > lipo: can't figure out the architecture type of: /var/tmp//ccWm4vkC.out
> > error: command 'gcc-4.2' failed with exit status 1
> >
> > Looks like a JCC bug.  Any ideas?
> >
> > Bill
> >


Re: odd error; JCC bug?

2012-11-01 Thread Andi Vajda


 Hi Bill,

On Thu, 1 Nov 2012, Bill Janssen wrote:


I've installed JCC-2.14 in Python 2.7.3 on OS X Leopard with gcc-4.2,
and I'm trying to wrap a library with

% python -m jcc --jar ../bin/GoodStuff.jar --jar ../bin/MoreGoodStuff.jar 
--include ../bin/Prereqs.jar --python goodstuff --files 10 --reserved inline 
--build --install --rename java.awt.Component=AWTComponent

[GoodStuff defines another class called "Component", thus the need for the 
java.awt rename.]

I get the following error:


It could very well be a bug.
Does it break with 2.13 ?
Can you send me some java source to reproduce this ?

Andi..



/local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:
 In function 'PyObject* get_generic_iterator_next(T*) [with T = 
java::util::t_Iterator, U = JArray]':
build/_goodstuff/__wrap04__.cpp:31896:   instantiated from here
/local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:184:
 error: 'wrap_jobject' is not a member of 'JArray'
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC 
but not for C++
/local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:
 In function 'PyObject* get_generic_iterator_next(T*) [with T = 
java::util::t_Iterator, U = JArray]':
build/_goodstuff/__wrap04__.cpp:31896:   instantiated from here
/local/python-2.7/lib/python2.7/site-packages/JCC-2.14-py2.7-macosx-10.5-intel.egg/jcc/sources/functions.h:184:
 error: 'wrap_jobject' is not a member of 'JArray'
lipo: can't figure out the architecture type of: /var/tmp//ccWm4vkC.out
error: command 'gcc-4.2' failed with exit status 1

Looks like a JCC bug.  Any ideas?

Bill