[kaffe] Adding a class to the library?

Benja Fallenstein b.fallenstein@gmx.de
Mon May 12 11:26:01 2003


This is a multi-part message in MIME format.
--------------010202070709090006010801
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


Hiya,

I've had a problem with Kaffe's MessageDigest, which assumes that all 
engines will subclass MessageDigest rather than MessageDigestSpi (I'm 
using the Cryptix JCE, which subclasses MessageDigestSpi as is proper). 
I've tried to fix this problem (as seen in attached patch) and it 
compiled fine, but running gave the following error:

> /usr/local/kaffe/bin/java  -Dpython.path=.:../storm-depends/jythonlib.jar:../storm-depends/pythonlib.jar org.python.util.jython test.py org/
> *sys-package-mgr*: processing modified jar, '/usr/local/kaffe/jre/lib/microsoft.jar'
> java.lang.NoClassDefFoundError: java/util/zip/ZipInputStream
>         at org.python.core.CachedJarsPackageManager.getZipPackages(CachedJarsPackageManager.java:line unknown, pc 0x8366084)
>         at org.python.core.CachedJarsPackageManager.addJarToPackages(CachedJarsPackageManager.java:line unknown, pc 0x82dbed1)
>         at org.python.core.CachedJarsPackageManager.addJarToPackages(CachedJarsPackageManager.java:line unknown, pc 0x829aa1f)
>         at org.python.core.PathPackageManager.addClassPath(PathPackageManager.java:line unknown, pc 0x82c4dbe)
>         at org.python.core.SysPackageManager.findAllPackages(SysPackageManager.java:line unknown, pc 0x82c4991)
>         at org.python.core.SysPackageManager.<init>(SysPackageManager.java:line unknown, pc 0x82b64ca)
>         at org.python.core.PySystemState.initPackages(PySystemState.java:line unknown, pc 0x829eebc)
>         at org.python.core.PySystemState.initialize(PySystemState.java:line unknown, pc 0x822ad0b)
>         at org.python.core.PySystemState.initialize(PySystemState.java:line unknown, pc 0x81c22ed)
>         at org.python.util.jython.main(jython.java:line unknown, pc 0x823f286

This seems to happen exactly if there is a dependency on a new class in 
the classlib (in this case inner class, but same thing with adding a new 
file).

So I read the FAQs and noted the

     $ sh developers/autogen.sh

I've tried this; with automake1.4 and automake1.5 it gives warnings or 
errors about Wall; with automake1.7 it gives a lot more printout (e.g. 
"`INCLUDES' is the old name for `AM_CPPFLAGS'"), but in both cases it 
returns to the shell successfully. "./configure" also runs well.

However, 'make' then gives me

> /bin/sh ../../libtool --mode=link gcc  -g -O2 -Wall -Wstrict-prototypes   -o kaffe-bin  -export-dynamic main.o version.o -dlopen ../../libraries/clib/native/libnative.la -dlopen ../../libraries/clib/net/libnet.la -dlopen ../../libraries/clib/io/libio.la -dlopen ../../libraries/clib/zip/libzip.la -dlopen ../../libraries/clib/math/libmath.la -dlopen ../../libraries/clib/management/libmanagement.la -dlopen ../../libraries/clib/security/libsecurity.la -dlopen ../../libraries/extensions/microsoft/clib/libmicrosoft.la -dlopen ../../libraries/clib/awt/X/libawt.la ../kaffevm/libkaffevm.la   ../../libltdl/libltdlc.la
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libnative.so is not portable!
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libnet.so is not portable!
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libio.so is not portable!
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libzip.so is not portable!
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libmath.so is not portable!
> 
> *** Warning: Linking the executable kaffe-bin against the loadable module
> *** libmanagement.so is not portable!

and so on.

automake is 1.7.4 now, autoconf 2.13 and libtool is 1.4.3. I'm using 
Debian unstable.

I'm feeling a bit lost. :-( Any suggestions?

Thank you,
- Benja

--------------010202070709090006010801
Content-Type: text/plain;
 name="digest.diff"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="digest.diff"

SW5kZXg6IGxpYnJhcmllcy9qYXZhbGliL2phdmEvc2VjdXJpdHkvTWVzc2FnZURpZ2VzdC5q
YXZhCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnMva2FmZmUva2FmZmUvbGlicmFyaWVz
L2phdmFsaWI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