Kaffe Cannot run in SunOS5.7

John Pierce hawkfan at pyrotechnics.com
Mon May 17 17:35:29 PDT 1999

On 16 May 1999, Alexandre Oliva wrote:

> On May  5, 1999, John Pierce <hawkfan at pyrotechnics.com> wrote:
> > I don't know about 1.0b4 but the current CVS tree builds and runs with a
> > minor libtool fix.
> What libtool fix?

The one you committed today (5/17), wrt -Wl in whole_archive_flag_spec.
I got the feeling that whole_archive_flag_spec isn't quite done right to
begin with, libobjs seems like the wrong place to stick it, but it was the
obvious fix.  You'd know better than me anyway ;)

Trying to rebuild today to check again, I've run into more libtool
problems.  It seems that libtool is converting the paths for the
convenience libraries (jit/libengine.la, gcj/libgcj.la, ...) to absolute
paths for installed libs (/usr/local/lib/libengine.la, ...)

Again, I did the obvious thing and made a small patch to ltmain.sh.  It
appears that the library location was being put into the list of
convenience libs before adjusting the dir for installed/uninstalled

The patches are available at http://www.pyrotechnics.com/~hawkfan/kaffe/

Another ?libtool? problem I ran into today was that dependent libraries
were not getting linked in when linking Kaffe.  It looks like the
convenience libraries were supposed to be linked with them and carry that
over to libkaffevm.so then to Kaffe..  I'm planing on investigating this
after I get some sleep..

On Solaris2.7 libtool didn't link in -lsocket when creating Kaffe.  On
Linux (glibc2) it couldn't find dlopen/dlclose/dlsym.. I don't know if
those are supposed to be supplied by -ldl or libltdl..

For the test results below I worked around it by passing -lsocket to the
libtool line by hand..

> > I was unable to get it to pass the test suite with any level of
> > optimization enabled w/gcc 2.8.1 or egcs-1.1.2.  W/o -O everything
> > seems to work fine.
> Weird...  Last time I tried (maybe 1 or 2 weeks ago), it passed all
> tests on Solaris 7, both /sparc and /x86, with egcs 1.1.2.

SunOS islander 5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-5_10

Built the current cvs tree as of about 5/17 21:00 UTC.
CFLAGS="-O -Vegcs-2.91.66"
MAKE=gmake         (GNU Make version 3.76.1)
LD=/usr/ccs/bin/ld (Software Generation Utilities - Solaris/ELF (3.0))
AS=/usr/ccs/bin/as (WorkShop Compilers 5.0 Alpha 03/27/98 Build)
NM="/usr/ccs/bin/nm -p"
                   (Software Generation Utilities (SGU) Solaris/ELF (3.0))

9 of 80 tests failed

The .fail files are available at

Removing the -O from CFLAGS causes all the tests to pass.

Using gcc 2.8.1 Kaffe passes all the tests with and w/o -O.

I'm assuming that the failures are a result of egcs/gcc generating bad
code when optimizing integer shifts.  I couldn't find anything obvious in
kaffe itself and I wouldn't know where to start w/egcs.

The javac used to compile the test classes doesn't seem to matter either.
The tests pass with sun's vm.


PS. Apologies if this is unclear, its been an extremely long days [sic].

John Pierce              | Finger for PGP key or see:
hawkfan at pyrotechnics.com | http://www.pyrotechnics.com/~hawkfan/
Fingerprint: 5F FC 0A 2D D6 FD B9 3E  57 34 E5 96 AB FC 9D 13

More information about the kaffe mailing list