libtool
[Top][All Lists]
Advanced

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

Re: Building shared libs as dynamically-loaded perl modules


From: Alexandre Oliva
Subject: Re: Building shared libs as dynamically-loaded perl modules
Date: 15 Feb 2001 15:35:47 -0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

On Feb 15, 2001, Jeremy Slade <address@hidden> wrote:

> As I understand it, a 'convenience' library is intended for two
> things: a static convenience lib is for linking into a program
> (therefore it contains the non-PIC objects, *.o), and a shared convenience
> lib is for linking into another shared lib (therefore it contains the
> PIC objects, *.lo).

Yep.  The latter is precisely what you seem to way.

> So I think I want to install the MiscContrib 'convenience lib' to a
> directory where it is accessible for ShapeUtils to link against.

Yep.  I think it's time for libtool to start supporting the concept of
installable PIC static libraries.  Meanwhile, here's something you can
try: link all the libtool objects that are part of MiscContrib into a
single libtool object file, and install that object file (does libtool
support installing object files?  I don't recall for sure).  Then,
link that libtool object into your libtool library.

> The same thing applies for linking swigShapeUtils.sl
> against libShapeUtils.a and libShapeUtils.sl.

But this is easier, because they're all in the same package.

> Without libtool, this is all very easy to do -- albeit not easy to do
> in a platform-independent way.

And that's the catch.  On some platforms, you just can't link static
libraries into shared ones.  Not even if they're PIC.  Convenience
libraries, with the abstraction of ``aliases to sets of objects'',
should just work.  It's just that they are not currently installable.
I wish they were.  And I wish convenience libraries could still come
in PIC and non-PIC versions, just like object files.  Currently, every
time you create a convenience archive, you don't get the non-PIC
objects, unless the PIC objects aren't available.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

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