[Top][All Lists]

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

Re: Question regarding interdependent convenience libraries

From: Bob Friesenhahn
Subject: Re: Question regarding interdependent convenience libraries
Date: Wed, 2 May 2007 23:00:22 -0500 (CDT)

On Wed, 2 May 2007, Scott D. Fleming wrote:

Is libtool or the underlying linker smart enough to recognize and
ignore the duplicate libraries?

I think that the content of convenience libraries is extracted into individual .o files prior to being used for linkage. They are not used for linking like traditional archive libraries. This means that any duplicates would result in individual .o files being overwritten prior to use. In other words non-fatal for building applications. However, if you build installed libraries based on these convenience libraries, you could run into trouble if two installed libraries included some of the same objects.

Or, do I have a problem with my setup? If so, can anyone suggest a
better one? (I am familiar with the technique that uses a top-level
convenience library that aggregates the sub-libraries; documented

A radically-different solution is to use a non-recursive Makefile scheme. This eliminates the need for convenience libraries entirely and speeds up the build. Automake does support this reasonably well and you can use Makefile includes to still keep Makefile fragments alongside the sources. However, the Makefile fragments require "namespacing" as if everything is referenced from the top level Makefile (which they will be).

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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