[Kaffe] problem with bad libgif link in CVS code

Alexandre Oliva oliva at dcc.unicamp.br
Wed Jan 27 00:02:51 PST 1999

On Jan 27, 1999, Moses DeJong <dejong at cs.umn.edu> wrote:

> I was hoping that the configure script could do it so I
> would not have to set the LDFLAGS varaible. This really seems
> like a problem with automake or gcc and not kaffe but I think
> lots of people are going to be bitten by this oh so strange bug.

This has nothing to do with automake.  The problem is that shared
libraries installed in non-standard platforms can't be found at
run-time unless they've got their run-time path hardcoded within them,
you set LD_RUN_PATH or add -rpath /dir at program link time or you set
LD_LIBRARY_PATH at program run time.

The problem is that -rpath/-R is not supported by gcc on all
platforms.  libtool, OTOH, does support -R portably (-rpath has a
special meaning when creating shared libraries).  So we can't just
tack it on LDFLAGS in the beginning of configure.in.

However, Since we don't have to run programs when we test for the
existence of the libraries, we could safely add -R/usr/local/lib to
LDFLAGS just after the last set of CPPFLAGS.  However, this is not
always desirable.  Maybe we should add yet another configure option,
--with-rtlibraries, that would behave mostly like --with-libraries,
but would add -R switches to LDFLAGS instead of -L, and only after
performing the tests.  Does this sound reasonable?

Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
Universidade Estadual de Campinas, SP, Brasil

More information about the kaffe mailing list