FW: [dev-crypto] Hello, I am currently trying to compile down to native with gcj 3.2.2

Mark Wielaard mark@klomp.org
Sat Mar 1 10:46:00 GMT 2003


Hi,

On Fri, 2003-02-28 at 23:07, Julia Smith wrote:
> OK, I get the same problem with the version of log4j that the GCJ site
> *claims* works ( ie compiles and runs). It seems a number of methods
> are missing or some other compile/link problem is showing its ugly
> head.
> 
> I _am_ using a freshly built 3.2.2 release.
> 
> I'm at a loss to know what's broken.

gcj doesn't handle abstract classes that implement an interface but
don't redeclare the methods of the interface explicitly in the abstract
class. (sometimes known as Miranda method/bug).
I cannot find the bug number now, or has this been fixed in 3.3?

The workaround in this case is to cast the X509CRL and X509Certificate
objects to X509Extension in the bouncy castle source to tell the gcj
compiler to look for those interface methods. Or to add the methods from
the X509Extension interface as abstract methods to the X509CRL and
X509Certificate classes in libgcj and recompile the libgcj.jar.

If you just want a bouncycastle that works with gcj see the RHug
project: <http://sources.redhat.com/rhug/>.

If you just want a crypto library (plus provider) that works with gcj
out of the box (and contains explicit optimizations for gcj) I would
recommend GNU Crypto <http://www.gnu.org/software/gnu-crypto/>.

Note that the (non-released) gcj 3.3 version (from CVS) contains a lot
of bug fixes for making security providers actually work.

Cheers,

Mark



More information about the Java mailing list