Date: Mon, 12 May 2014 06:58:06 +0200 From: Matthias Andree <mandree@FreeBSD.org> To: Tijl Coosemans <tijl@FreeBSD.org>, freebsd-ports@FreeBSD.org Subject: Re: To all port maintainers: libtool Message-ID: <537054DE.70701@FreeBSD.org> In-Reply-To: <20140508002420.5d37e7f6@kalimero.tijl.coosemans.org> References: <20140508002420.5d37e7f6@kalimero.tijl.coosemans.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. Tijl, 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 foo.so.0 and foo.so.0.0.0 files, with the SONAME being the libdb-4.8.so.0, or if I leave the original upstream -avoid-version setting, I get libdb-4.8.so as SONAME and see libdb-4.8.so.0 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 missing). :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? Cheers, Matthias
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?537054DE.70701>