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: Casey Marshall
Subject: Re: [GNU Crypto] building a GCJ-friendly version
Date: Mon, 8 Sep 2003 15:03:21 -0700
User-agent: Mutt/1.4i

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/tool/CipherSpeed.java:106)
   at gnu.crypto.tool.CipherSpeed.main(java.lang.String[])
(/home/rsdio/src/gnu-crypto/gnu-crypto/build-gcj/source/gnu/crypto/tool/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. 

- -- 
Casey Marshall || address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/XPyZgAuWMgRGsWsRAvxbAJ9vOrdqCuLk74g9k3CXHtXlTIGkuACgi8Ha
ecHUwbhEvf51WskrzA9rLE0=
=M8aZ
-----END PGP SIGNATURE-----




reply via email to

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