To all port maintainers: libtool

Matthias Andree mandree at
Mon May 12 04:58:10 UTC 2014

Am 08.05.2014 00:24, schrieb Tijl Coosemans:
> Hi,
> I've been asked to write something about USES=libtool to clarify a few
> things about what it does and why.


thanks for the effort.

I have two findings I do not currently fully understand, perhaps someone
who has done more digging into either of these items can help me with them:

Issue #1: .la files

I just received PR 189491 (which proposes USES=libtool:keepla) and
looked at it, and thought it good to kill the .la files, so I have tried
USES=libtool, without keepla or stuff.

The port also has a patch to flip from -avoid-version to -version-info
0:0:0, and I tried to build with or without.
(It should not matter much because libdb does not have non-system
requisites, i. e. the port has no LIB_DEPENDS - it only uses libpthreads.)

Now, with USES=libtool added, I either have both the and files, with the SONAME being the, or if I
leave the original upstream -avoid-version setting, I get
as SONAME and see files missing.

With USES=libtool:keepla, this does not happen.

It is utterly unclear to me how that fits together, so my first question
is: can you reproduce this behaviour, or is my system goofing up?

What concerns me about that is (1) that the file matching the SONAME of
the library is merely a symlink, and (2) that the USES=libtool:keepla
option apparently might have more effects than documented, namely,
adding more library_names with the .0.0.0 and .0 suffix.

Issue #2: libpthread.  An .la file might look like this:

> # Linker flags that can not go in dependency_libs.
> inherited_linker_flags=' -pthread'
> # Libraries that this one depends upon.
> dependency_libs=' -lpthread'

Now, if I remove the .la file, and a slave port that uses libtool to
link will then have to list -pthread explicitly on the newer FreeBSD
releases (because those fail linking if indirect .so requisites are

:keepla causes the inherited_linker_flags=-pthread to remain set, so I
presume it is safe in this case.
  However, it does not appear to me that keepla is a temporary measure
here, but it looks like it needs to stay forever.

Any insights, from anyone?


More information about the freebsd-ports mailing list