[Kaffe] problem with bad libgif link in CVS code

Moses DeJong dejong at cs.umn.edu
Wed Jan 27 00:14:15 PST 1999

On 27 Jan 1999, Alexandre Oliva wrote:

> 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.

Well, the only place we really "need" the LD_LIBRARY_PATH set is
when kaffe is run. It seems like another way around this is to
create a KAFFE_LD_LIBS var in the configure script that would
store up all the runtime libs needed by kaffe and then the
LD_LIBRARY_PATH could be set inside the kaffe wrapper script
before actually calling the Kaffe executable. That way we
could avoid the -R stuff to the compiler and it should work
on most platforms (I think HPUX uses SHLIB_PATH not LD_LIBRARY_PATH).

> 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}
> oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
> Universidade Estadual de Campinas, SP, Brasil

More information about the kaffe mailing list