gnu-crypto-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Crypto] building a GCJ-friendly version


From: Raif S. Naffah
Subject: Re: [GNU Crypto] building a GCJ-friendly version
Date: Tue, 9 Sep 2003 19:34:45 +1000
User-agent: KMail/1.5.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

hello Casey,

thanks for taking the time to try this.

indeed it is looking to be a compiler problem, especially that i didnt 
touch the Anubis class.

i'll forward this message to some gurus on the javac list and see what 
they suggest in terms of trying to reproduce the problem with a 
manageable codebase.

i'll keep the list informed with any outcome.  in the meantime i'll 
continue trying building a daily GCC and using it for a gcj-friendly 
gnu crypto library, until this problem is solved and i can then checkin 
my stuff.


On Tue, 9 Sep 2003 08:03 am, Casey Marshall wrote:
> On Mon, Sep 08, 2003 at 10:15:22PM +1000, Raif S. Naffah wrote:
> > hello there,
> >
> > i'm trying to test the changes i've made with the latest GCJ; ie.
> >
> > address@hidden build-gcj]$ gcj -v
> > Reading specs from
> > /usr/local/gcc/lib/gcc/i686-pc-linux-gnu/3.4/specs Reading specs
> > from
> > /usr/local/gcc/lib/gcc/i686-pc-linux-gnu/3.4/../../../libgcj.spec
> > rename spec lib to liborig
> > Configured with: '../gcc/configure' '--enable-shared
> > '--enable-threads=posix '--prefix=/usr/local/gcc
> > '--enable-languages=c,c++,java : (reconfigured)
> > Thread model: posix
> > gcc version 3.4 20030908 (experimental)
> >
> > but i keep getting an error during a gcj-friendly build:
> >
> > ...
> > gcc -shared  gnu/crypto/Registry.lo gnu/crypto/assembly/Assembly.lo
> > gnu/crypto/assembly/Cascade.lo
> > gnu/crypto/assembly/CascadeStage.lo...
> >
> > gnu/crypto/cipher/Anubis.lo: In function
> > `gnu::crypto::cipher::Anubis::<clinit>()':
> > /data/work/build-gcj/source/gnu/crypto/cipher/Anubis.java:1:
> > multiple definition of `gnu::crypto::cipher::Anubis::<clinit>()'
> > gnu/crypto/cipher/Anubis.lo:/data/work/build-gcj/source/gnu/crypto/
> >cipher/Anubis.java:1: first defined here
> > gnu/crypto/cipher/Anubis.lo:/data/work/build-gcj/source/gnu/crypto/
> >cipher/Anubis.java:123: multiple definition of
> > `gnu::crypto::cipher::Anubis::Sd'
> > ...
> >
> > and the make process stops with:
> >
> > collect2: ld returned 1 exit status
> > make[2]: *** [lib-gnu-crypto.la] Error 1
> > make[2]: Leaving directory `/data/work/build-gcj/source'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/data/work/build-gcj/source'
> > make: *** [all-recursive] Error 1
> >
> >
> > can somebody confirm that
> >
> > a. they're getting same/similar error with the latest GCJ in their
> > environment, or
> >
> > b. they're not getting that error, in which case, which version of
> > GCJ is being used.
>
> dexter:~$ gcj -v
> Reading specs from /opt/gcc-3.4/lib/gcc/i686-pc-linux-gnu/3.4/specs
> Reading specs from
> /opt/gcc-3.4/lib/gcc/i686-pc-linux-gnu/3.4/../../../libgcj.spec
> rename spec lib to liborig
> Configured with: '../gcc/configure'
> '--enable-languages=c,c++,java,f77 '--prefix=/opt/gcc-3.4 :
> (reconfigured) '../gcc/configure'
> '--enable-languages=c,c++,java,f77 '--prefix=/opt/gcc-3.4
> Thread model: posix
> gcc version 3.4 20030904 (experimental)
>
> I don't get the error you describe (it builds fine) but I
> consistently get the following error with any program that uses
> TripleDES.
>
> dexter:~$ cipherSpeed tripledes
> Exercising tripledes...
> java.lang.NullPointerException
>    at _Jv_CheckCast (/opt/gcc-3.4/lib/libgcj.so.4.0.0)
>    at gnu.crypto.cipher.TripleDES.decrypt(byte[], int, byte[], int,
> java.lang.Object, int) (/opt/gcc-3.4/lib/lib-gnu-crypto.so.2.0.0)
>    at gnu.crypto.cipher.BaseCipher.testSymmetry(int, int)
> (/opt/gcc-3.4/lib/lib-gnu-crypto.so.2.0.0)
>    at gnu.crypto.cipher.BaseCipher.selfTest()
> (/opt/gcc-3.4/lib/lib-gnu-crypto.so.2.0.0)
>    at gnu.crypto.cipher.CipherFactory.getInstance(java.lang.String)
> (/opt/gcc-3.4/lib/lib-gnu-crypto.so.2.0.0)
>    at gnu.crypto.tool.CipherSpeed.speed(java.lang.String)
> (/home/rsdio/src/gnu-crypto/gnu-crypto/build-gcj/source/gnu/crypto/to
>ol/CipherSpeed.java:106) at
> gnu.crypto.tool.CipherSpeed.main(java.lang.String[])
> (/home/rsdio/src/gnu-crypto/gnu-crypto/build-gcj/source/gnu/crypto/to
>ol/CipherSpeed.java:100) Failed self-test...
>
> ...which is bizarre, and the error changes depending upon the
> optimization flags -- with -02 -march=athlon-mp, it fails at the same
> point, but from a ClassCastException because the TripleDES.Context
> object is (inexplicibly) an Integer.
>
> This looks very much like a compiler error.

- -- 
cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE/XZ63+e1AKnsTRiERA+J1AJ9uVgmJvbzHJsKHtOGAKmlBBSjlMQCgtEfs
FD4DmA0aV07XGSWO+z85XbQ=
=JVCF
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]