Fix NOSHAREDLIBS in configure.in, and check for -1 from sbrk.

Matt Birkholz birkholz at a.crl.com
Thu Nov 13 17:31:50 PST 1997


I configured kaffe-0.9.2 with --enable-staticlib but the build died looking
for kaffe_native:
	gcc -g -O2  -I. -I./../kaffevm -I../../config -I./../../config -I../../include -I./../../include -o kaffe main.o -L../kaffevm -lkaffevm  -L../../packages/tjwassoc.co.uk/APIcore/lib -lkaffe_native -L../../packages/tjwassoc.co.uk/APInet/lib -lkaffe_net -L../../packages/tjwassoc.co.uk/APIzip/lib -lkaffe_zip  -L/usr/X11R6/lib -lX11 -lkaffevm -lm -lc 
	ld: cannot open -lkaffe_native: No such file or directory
I had to fix configure.  A similar patch for configure.in might be:

	*** configure.in.~1~	Sat Oct  4 03:26:53 1997
	--- configure.in	Thu Nov 13 02:02:56 1997
	***************
	*** 942,950 ****
	  changequote([, ])dnl
	  AC_DEFINE(HAVE_PACKAGE_TJWASSOC_CO_UK)
	  NOSHAREDLIBS=" \
	! -L../../packages/tjwassoc.co.uk/APIcore/lib -lkaffe_native \
	! -L../../packages/tjwassoc.co.uk/APInet/lib -lkaffe_net \
	! -L../../packages/tjwassoc.co.uk/APIzip/lib -lkaffe_zip \
	  "

	  changequote(<<, >>)dnl
	--- 942,950 ----
	  changequote([, ])dnl
	  AC_DEFINE(HAVE_PACKAGE_TJWASSOC_CO_UK)
	  NOSHAREDLIBS=" \
	! -L../../packages/tjwassoc.co.uk/APIcore/lib -lnative \
	! -L../../packages/tjwassoc.co.uk/APInet/lib -lnet \
	! -L../../packages/tjwassoc.co.uk/APIzip/lib -lzip \
	  "

	  changequote(<<, >>)dnl

A somewhat static kaffe allowed me to see why I was getting this:

    Cannot find essential class 'Object' in class library ... aborting.

In the debugger, kaffe goes comatose.  An interrupt finds it in pagealloc
getting -1 from sbrk.  (My wife was running Netscape too.) Do not ask me
how that leads to "Cannot find essential..." and I will not ask why
gc-mem.c contains a call to sbrk but does not check for the exceptional
return value -1.

The reason I say my kaffe is "somewhat static" is because of this:

	ldd kaffe
		libX11.so.6 => /usr/X11R6/lib/libX11.so.6
		libm.so.5 => /lib/libm.so.5
		libc.so.5 => /lib/libc.so.5

-- not exactly what I expected.

Matt Birkholz <birkholz at alum.mit.edu>  Send mail for PGP 2.6.2 public key.
Key Fingerprint = B3 34 FB 3E 3C FE E8 57  AA B4 B2 95 A7 C0 1E AF



More information about the kaffe mailing list