From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MyruS-0002BP-Dg for garchives@archives.gentoo.org; Fri, 16 Oct 2009 18:52:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6C60EE073C; Fri, 16 Oct 2009 18:52:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 28C39E073C for ; Fri, 16 Oct 2009 18:52:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B2E5A676DC for ; Fri, 16 Oct 2009 18:52:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -3.21 X-Spam-Level: X-Spam-Status: No, score=-3.21 required=5.5 tests=[AWL=-0.611, BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W-8v+ifsWmFe for ; Fri, 16 Oct 2009 18:52:08 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 8D9AA676B6 for ; Fri, 16 Oct 2009 18:52:06 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1MyruA-0004zZ-W9 for gentoo-user@gentoo.org; Fri, 16 Oct 2009 20:51:58 +0200 Received: from adsl-69-234-187-231.dsl.irvnca.pacbell.net ([69.234.187.231]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Oct 2009 20:51:58 +0200 Received: from w41ter by adsl-69-234-187-231.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Oct 2009 20:51:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: walt Subject: [gentoo-user] Re: Library file formats Date: Fri, 16 Oct 2009 11:51:32 -0700 Message-ID: References: <200910161220.30636.peter@humphrey.ukfsn.org> <20091016123704.26723242@majikthise> <4AD8B618.5030901@kutulu.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-187-231.dsl.irvnca.pacbell.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5pre) Gecko/20091016 Shredder/3.0pre In-Reply-To: <4AD8B618.5030901@kutulu.org> Sender: news X-Archives-Salt: 237f1a64-2f6e-4d1c-8824-fb385b318d40 X-Archives-Hash: 47fe042923598680e4764cdb7ec937f5 On 10/16/2009 11:06 AM, Mike Edenfield wrote: > On 10/16/2009 12:54 PM, walt wrote: >> On 10/16/2009 04:37 AM, Neil Bothwick wrote: >>> On Fri, 16 Oct 2009 12:20:30 +0100, Peter Humphrey wrote: >>> >>>> I thought I'd have a play with swami, but the emerge fails with >>>> "/bin/sed: can't read /usr/lib64/libogg.la: No such file or directory", >>>> and indeed there is none such. >>> >>> The elog message from the last libogg install explains this. Run >>> lafilefixer --justfixit. >> >> There is no manpage for lafilefixer, but the --help flag prints: >> >> --justfixit Choose some reasonable dirs, such as >> /usr/lib*, etc. , >> find all .la files and fix them to not use >> .la files >> for linking >> >> I can't make sense out of that -- one of the major uses of libtool (I >> thought) >> is for linking. Can anyone 'splain that to me? > > One of the major problems with .la files (besides being mostly useless > on Linux/FreeBSD/any other ELF-based OS) is when they refer to other .la > files instead of linking directly to the binaries. This breaks things > when they get removed from a ebuild for a library that other libraries > depend on. > > The only time that libtool archives provide a real benefit is when > there's a need to link in static libraries that have external > dependencies -- the libtool archive defines the dependency information > that can't be stored in the static archive format. If you don't have > any publicly-consumed static libraries, .la files are just pointless > clutter, so package maintainers very often remove them. Any build > system depending on libtool for its linking then breaks because the > dependency chain is broken. > > Take, for example, this very real example from my system. I have both > hal and dbus installed; hal depends on dbus, and both packages install > libtool archives. In /usr/lib/libhal.la, there is the following: > > # Libraries that this one depends upon. > dependency_libs=' /usr/lib/libdbus-1.la -lcap -lpthread -lrt' > > Thus, whenever a package that uses hal tells libtool to link to > libhal.la, libtool recursively links to libdbus-1.la as well. > > Now, say the dbus maintainer suddenly doesn't like .la files (perhaps a > bad break-up in Los Angeles), and removes them from the ebuild. I think .la files are an adequate reason to dislike .la files :o) They have certainly wasted many frustrated hours for me. > The > next time I true to use libtool to link in hal, it will fail because the > latest dbus does not include /usr/lib/libdbus-1.la. > > The fix is to run lafilefixer, which changes the above line to say: > > # Libraries that this one depends upon. > dependency_libs=' -L/usr/lib -ldbus-1 -lcap -lpthread -lrt' > > So that hal no longer cares whether or not the dbus package installed > its libtool archive, and all is well. An excellent 'splain, thank you very much :o) Thanks also to Volker for the links to Diego's blogs. I'm about halfway through them now.