This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Trying to compile Xerces's jar
- From: Andrew Haley <aph at redhat dot com>
- To: Andrew Cowie <andrew at operationaldynamics dot com>
- Cc: "java at gcc dot gnu dot org" <java at gcc dot gnu dot org>
- Date: Tue, 22 Feb 2005 11:21:17 +0000
- Subject: Re: Trying to compile Xerces's jar
- References: <1109037313.11370.20.camel@sirius.syd.operationaldynamics.com>
Andrew Cowie writes:
> I'm trying to build a project which depends on jars from Apache's Xerces
> XML DOM library, http://xml.apache.org/xerces2-j/ , but it errors out on
> me in funny ways.
>
> [These jars run fine in gij, btw]
>
>
> $ gcj -classpth xml-apis.jar:resolver.jar:xercesImpl.jar -shared \
> -g -o xerces.so -c xml-apis.jar resolver.jar xercesImpl.jar
>
> errors out with:
>
> java/io/OutputStream.java: In class `java.io.OutputStream':
> java/io/OutputStream.java: In constructor `()':
> java/io/OutputStream.java:0: internal compiler error: Segmentation fault
>
>
> But,
>
> $ gcj -shared -g -o xml-apis.so -c xml-apis.jar resolver.jar
>
> works fine, but then
>
> $ gcj -classpth xml-apis.jar:resolver.jar:xercesImpl.jar -shared \
> -g -o xerces.so -c xercesImpl.jar
>
> bails out with:
>
> org/apache/xerces/util/XMLCatalogResolver.java: In class `org.apache.xerces.util.XMLCatalogResolver':
> org/apache/xerces/util/XMLCatalogResolver.java: In method `org.apache.xerces.util.XMLCatalogResolver.setPreferPublic(boolean)':
> org/apache/xerces/util/XMLCatalogResolver.java:0: error: class 'org.apache.xml.resolver.CatalogManager' has no method named 'setPreferPublic' matching signature '(Z)V'
>
> Is this just a case of "must be built from the ground up with gcj", or
> am I doing something wrong, or...
Use -findirect-dispatch -Bsymbolic when compiling your jarfiles. Use
gcj 4.0 prerelease.
Andrew.