To all port maintainers: libtool

Tijl Coosemans tijl at FreeBSD.org
Thu Jun 5 16:54:16 UTC 2014


On Thu, 05 Jun 2014 09:39:21 -0500 Bryan Drewery wrote:
> I don't know what .la files are used for and have no time currently to 
> research it.
> 
> What is the impact to non-ports consumers of removing .la files? Do they 
> also need patches to make them build?

Removing a .la file is somewhat like a library version bump.  Anything
that depends on it needs to be recompiled.

e.g. externProgA links to externLibB which links to portsLibC

The links between files are like this:

progA -> libB.so -> libC.so
      -> libC.so (due to libtool overlinking)

libB.la -> libC.la

Linking progA with libB using libtool goes through libB.la.  If libC.la
disappears the link in libB.la goes stale and linking progA will fail.
externLibB needs to be recompiled first.  libB.la will then contain "-lC"
instead of "libC.la".

> And if there is no impact, I am thoroughly confused on when to keep or 
> not keep them.

Keeping them is a temporary measure.  You can take the previous example
but with A, B and C all in the ports tree.  If you remove libC.la linking
port A may fail unless for all ports B, libB.la does not exist or it
contains no references to libC.la (for instance because port B has
USES=libtool), or you bump PORTREVISION on port B to force recompilation.

If you find you have to bump PORTREVISION on too many ports B then just
keep the .la file for now.


More information about the freebsd-ports mailing list