Problem compiling apache libraries

Mohsen Saboorian mohsens@gmail.com
Fri Feb 9 16:22:00 GMT 2007


Too bizzare!

I think it is because I'm using GCJ for windows which comea with
JavaNativeCompiler. I downloaded gcc-119022-win.zip from that project
(since mingw's gcj is too old). Sounds like he changed one of
libraries in his gcc. Anyway, I thought JNC is open source and free
(since hosted on sf.net:
http://sourceforge.net/projects/javacompiler/), but it seems to be
commercial.

Do you know any newer that MinGW's gcc for free?

Regards.

On 2/9/07, Andrew Haley <aph@redhat.com> wrote:
> Mohsen Saboorian top-posts:
>  > Sorry to top-posting.
>  >
>  > Yes, I was was wrong about compiling velocity-tools-generic-1.2.jar.
>  > Now all thing are OK, and I have an exe (win32) file. It gives me the
>  > following message when executing:
>  > No valid licence (1)!
>
> How bizarre.
>
> I don't know what might be causing that.  There's no such message in
> gcj, as far as I know.  Something to do with some other unfree
> software that you have installed, perhaps?
>
> Andrew.
>
>  > On 2/9/07, Andrew Haley <aph@redhat.com> wrote:
>  > > Please don't top-post.
>  > >
>  > > Mohsen Saboorian writes:
>  > >  >
>  > >  > Using -fjni switch fixed almost 4/5 of those undefined reference
>  > >  > errors. Yet I have problems...
>  > >  >
>  > >  > Main class is in a jar file called zekr.jar. I also compiled it into
>  > >  > zekr.o, so I assume there is no need to have -Izekr.jar (or any other
>  > >  > dependency jars, which are already available as .o) in --classpath.
>  > >  > Anyway, again compiling with this command line gives errors:
>  > >  > $gcj --main=ZekrMain -fjni -findirect -dispatch apache-commons.o
>  > >  > log4j-1.2.8.o swt-win32.o velocity-1.4.o velocity-tools-generic-1.2.o
>  > >  > zekr.o
>  > >
>  > > You seem to be using a mailer that is breaking your lines in random
>  > > places.  This makes it impossible to see what your command actually
>  > > was.
>  > >
>  > > I'm guessing it was
>  > >
>  > >   gcj --main=ZekrMain -fjni -findirect-dispatch \
>  > > apache-commons.o log4j-1.2.8.o swt-win32.o \
>  > > velocity-1.4.o velocity-tools-generic-1.2.o zekr.o
>  > >
>  > >
>  > >  > It gives many errors of the form:
>  > >  > velocity-tools-generic-1.2.o: In function
>  > >  > `ZN3org6apache8velocity5tools7generic12IteratorTool12internalWrapEJvPN4java4lang6ObjectE':
>  > >
>  > > I'm guessing this was
>  > > _ZN3org6apache8velocity5tools7generic12IteratorTool12internalWrapEJvPN4java4lang6ObjectE
>  > >
>  > > which is
>  > >
>  > > org.apache.velocity.tools.generic.IteratorTool.internalWrap(java.lang.Object)void
>  > >
>  > >  > .../velocity-tools-generic-1.2.jar:(.text+0x3aa9): undefined reference
>  > >  > to `org::apache::velocity::util::ArrayIterator::class$'
>  > >
>  > > This looks to me like velocity-tools is compiled without -findirect-dispatch.
>  > >
>  > >  > although org.apache.velocity.util.ArrayIterator is available in velocity-1.4.o.
>  > >  > Any idea?
>  > >
>  > > Andrew.
>  > >
>



More information about the Java mailing list