Hello again. I ran into a problem with libtool when compiling for shared
libs with cc on solaris. Here is what the error looked like.
(in the directory lib/libruntime)
/bin/sh ../../libtool --mode=link cc -g -xs -o libruntime.la -rpath
/tmp/mo/install_japhar/lib -version-info 1:0:0 ../../lib/zlib/libzlib.la abort.lo
alloc.lo arrays.lo array-class.lo class-repository.lo classpath.lo clparse.lo
exceptions.lo gc.lo getopt.lo getopt1.lo interploop.lo log.lo method.lo nativeglue.lo
objects.lo primitive-class.lo printf.lo resolve.lo sig.lo stubgc.lo thread.lo
zextract.lo -ldl -lposix4 -lpthread -lm
libtool: link: libtool library `libruntime.la' may not depend on uninstalled
libraries: ../../lib/zlib/libzlib.la
make: *** [libruntime.la] Error 1
The fix for this problem was to not include ../../lib/zlib/libzlib.la in the command
line to libtool (see lower comments because this might not be the correct fix).
(this patch was to the file lib/libruntime/Makefile but you will actually want to
patch lib/libruntime/Makefile.in to fix this)
*** lib/libruntime/copy_Makefile Fri Oct 30 15:29:10 1998
--- lib/libruntime/Makefile Fri Oct 30 15:30:03 1998
***************
*** 115,119 ****
EXTRA_DIST= interpfunc.c
! libruntime_la_LDFLAGS = -version-info 1:0:0 $(ZLIB)
noinst_PROGRAMS= opstack_test
--- 115,119 ----
EXTRA_DIST= interpfunc.c
! libruntime_la_LDFLAGS = -version-info 1:0:0
noinst_PROGRAMS= opstack_test
The really strange part about this problem is that the libtool docs seem
to indicate that this type of argument should be allowed by libtool.
(from libtool docs)
(1) However, you should never use `-L' or `-l' flags to link against
an uninstalled libtool library. Just specify the relative path to the
`.la' file, such as `../intl/libintl.la'. This is a design decision to
eliminate any ambiguity when linking against uninstalled shared
libraries.
So this kind of sounds like a bug in libtool. Does anyone with more
libtool experience (I just started looking at it yesterday) know
if this is a bug or a feature.
Mo DeJong
dejong at cs.umn.edu