Strange things with the current CVS

Pavel Roskin pavel_roskin at geocities.com
Wed Feb 16 07:46:08 PST 2000


Hello, Archie!

I have updated Kaffe to the current version by "cvs update"
I'm compiling it on LinuxPCC with the following configuration:

./configure --disable-shared --enable-debug

(I'm compiling without libffi because I have a very preliminary patch for
native PPC support, but it's not relevant here)

When linking kaffe/kaffe/Kaffe I'm getting unresolved symbols:

../../libraries/clib/native/.libs/libnative.a(ObjectStreamClassImpl.o): In
function `addToSHA':
/home/proskin/src/kaffe/libraries/clib/native/ObjectStreamClassImpl.c:357:
undefined reference to `SHA1Update'

and many other functions with names beginning with SHA.

This is what is printed on stdout (sligthly reformatted):

/bin/sh ../../libtool --mode=link gcc -g -fsigned-char -o Kaffe
-export-dynamic main.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
-L/usr/local/lib -R/usr/local/lib
rm -f .libs/Kaffe.nm .libs/Kaffe.nmS .libs/Kaffe.nmT

creating .libs/KaffeS.c
extracting global C symbols from `../../libraries/clib/native/.libs/libnative.a'
extracting global C symbols from `../../libraries/clib/net/.libs/libnet.a'
extracting global C symbols from `../../libraries/clib/io/.libs/libio.a'
extracting global C symbols from `../../libraries/clib/zip/.libs/libzip.a'
extracting global C symbols from `../../libraries/clib/math/.libs/libmath.a'
extracting global C symbols from `../../libraries/clib/management/.libs/libmanagement.a'
extracting global C symbols from `../../libraries/clib/security/.libs/libsecurity.a'
extracting global C symbols from `../../libraries/extensions/microsoft/clib/.libs/libmicrosoft.a'
extracting global C symbols from `../../libraries/clib/awt/X/.libs/libawt.a'
(cd .libs && gcc -c -fno-builtin -fno-rtti -fno-exceptions "KaffeS.c")
rm -f .libs/KaffeS.c .libs/Kaffe.nm .libs/Kaffe.nmS .libs/Kaffe.nmT

gcc -g -fsigned-char -o Kaffe main.o .libs/KaffeS.o -Wl,--export-dynamic
../kaffevm/.libs/libkaffevm.a -ldl -L/usr/local/lib -L/usr/local/lib -lm
-L/usr/local/lib -L/usr/local/lib
../../libraries/clib/native/.libs/libnative.a -lm -L/usr/local/lib
../../libraries/clib/net/.libs/libnet.a -L/usr/local/lib
../../libraries/clib/io/.libs/libio.a -L/usr/local/lib
../../libraries/clib/zip/.libs/libzip.a -L/usr/local/lib -lz -lz
../../libraries/clib/math/.libs/libmath.a -L/usr/local/lib -lgmp -lm
../../libraries/clib/management/.libs/libmanagement.a -L/usr/local/lib
../../libraries/clib/security/.libs/libsecurity.a -L/usr/local/lib
../../libraries/extensions/microsoft/clib/.libs/libmicrosoft.a
-L/usr/local/lib ../../libraries/clib/awt/X/.libs/libawt.a
-L/usr/local/lib /usr/lib/libjpeg.so -lpng -lz -lz -lm
/usr/lib/libungif.so -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXext -lSM
-lICE -lX11 -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/X11R6/lib

You see that libkaffevm was the last in the libtool command line but
became the first in the gcc command line.

My understanding is that SHA1Update is defined in libkaffevm and used in
libnative. GNU ld like many other linkers doesn't resolve symbols
backwards for ar archives.

I'm quite sure that the problem can be reproduced for other architectures
by using --disable-shared

Pavel Roskin



More information about the kaffe mailing list