[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use circular dependencies

From: Ralf Wildenhues
Subject: Re: how to use circular dependencies
Date: Mon, 11 Jul 2005 15:49:05 +0200
User-agent: Mutt/1.4.1i

Hi Tom,

* tom fogal wrote on Fri, Jul 08, 2005 at 08:14:51PM CEST:
> Hi all, I'm trying to get libtool to link a program that depends on a
> circular list of static (libtool) libraries.
> I'm using a command line like:
> ../../libtool --mode=link --preserve-dup-deps g77 -Wall -I../include
> -O0 -o partrj -static *.o ../ui/ ../models/
> ../share/ ../models/ ../grid/
> ../fields/ ../share/
> ../menus/ ../strings/src/
> ../hash/ ../dbg/ ../t89files/
> unfortunately this ends up not working because libtool is
> removing/reordering some of the libraries:

I presume this is because the libraries have interdependencies listed in
the respective .la files.

> g77 -Wall -I../include -O0 -o partrj <bunch of .o files>
> ../ui/.libs/libParTrjUI.a ../models/.libs/libSPPModels.a
> ../grid/.libs/libSPPgrid.a ../fields/.libs/libSPPFields.a
> ../share/.libs/libSPPShare.a ../menus/.libs/libParTrjMenu.a
> ../strings/src/.libs/libSPPStrings.a ../hash/.libs/libHash.a
> ../dbg/.libs/libSPPdbg.a ../t89files/.libs/libSPPt89.a
> "--preserve-dup-deps" doesn't seem to have an effect. I also tried
> remaking the command line using -L and -l options instead of explicitly
> specifying the .la file, with the same effect of libtool stripping out
> libraries from the link line.

Hmm.  Is the package that contains these libraries freely available
online?  If not: could you show the corresponding link lines for the
libraries?  (Either the snippets, or whatever `make' makes
of it as libtool command line; plus libtool's output.)

> I found a post on libtool-patches from 2002, where someone else had run
> into this issue. They expected linker flags of -Wl,"-(" <libs> -Wl,"-)"
> to fix it. I changed my link line above to use these linker flags in
> the libtool command line, but I still get the same error. It appears as
> if the patch was never applied (why?)?

Are you talking about this?

I can only guess it was not applied because it's a hack..

> I am using libtool version '1.5.18 (1.1220.2.246 2005/05/16 10:00:18'.
> What am I doing wrong? How can one link in circular dependencies using
> libtool?

Oh, most likely they are broken, but to be honest, I have no idea.  We
don't have a proper test for them, so we can't expect them to stay
unbroken.  The reason I have asked for details above is that we may be
able to generate a decent test case from your situation, and then work
from that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]