From owner-freebsd-ports@FreeBSD.ORG Mon Sep 8 17:59:34 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A5F7E3A for ; Mon, 8 Sep 2014 17:59:34 +0000 (UTC) Received: from mailrelay011.isp.belgacom.be (mailrelay011.isp.belgacom.be [195.238.6.178]) by mx1.freebsd.org (Postfix) with ESMTP id 36A6011FB for ; Mon, 8 Sep 2014 17:59:34 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8GAFXtDVRR8Z/O/2dsb2JhbABZgw1TV8l3h0oBgRUXeIQEAQUnExwjEAsTBQklDyoeGYhGAQi7dwEXjmJrB4RMAQSVcII8hEWBYJNNg2M7LwGCTgEBAQ Received: from 206.159-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.159.206]) by relay.skynet.be with ESMTP; 08 Sep 2014 19:59:21 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s88HxJZJ016300; Mon, 8 Sep 2014 19:59:20 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Mon, 8 Sep 2014 19:59:19 +0200 From: Tijl Coosemans To: gtodd@bellanet.org Subject: Re: USES = libtool and missing .la files [WAS Re: pkg-plist for devel/glib20] Message-ID: <20140908195919.262177f2@kalimero.tijl.coosemans.org> In-Reply-To: References: <20140907013546.GA10438@SDF.ORG> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: cary@SDF.ORG, "freebsd-ports@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 17:59:34 -0000 On Mon, 8 Sep 2014 13:07:29 -0400 (EDT) gtodd@bellanet.org wrote: > On Sun, 7 Sep 2014, Cary wrote: >> Here it shows a diff for pkg-plist of port devel/glib20: >> >> http://svnweb.freebsd.org/ports/head/devel/glib20/pkg-plist?r1=324037&r2=366944 >> >> Five files which the port is building are not being installed. They are: >> >> lib/libgio-2.0.la >> lib/libglib-2.0.la >> lib/libgmodule-2.0.la >> lib/libgobject-2.0.la >> lib/libgthread-2.0.la >> >> In my directory /usr/ports/devel/glib20: >> >> $ find work/ -type f -name "libg[ilmot]*-2.0.la" >> work/glib-2.36.3/gio/libgio-2.0.la >> work/glib-2.36.3/gthread/libgthread-2.0.la >> work/glib-2.36.3/glib/libglib-2.0.la >> work/glib-2.36.3/gmodule/libgmodule-2.0.la >> work/glib-2.36.3/gobject/libgobject-2.0.la >> >> So far two other builds have failed for me because >> two of the above listed files were not found. >> Ports that failed to build were : >> gnome-desktop-2.32.1_4 x11/gnome-desktop >> xfce4-desktop-4.10.2_2 x11-wm/xfce4-desktop > > For the last few days I have been seeing the same thing scattered around > the ports tree. It seems various libtool archive files (e.g. the above as > well as libiconv.la, liffi.la, probably others ...) are no longer being > installed. When subsequent builds are run they are unable to find libtool > archive "dependencies". e.g. libpurple will fail not finding > libgobject.2.0.la ... copying libgobject.2.0.la from previous package or > backup will allow the build to proceed until another missing *.la file > causes the build to fail. And so on ... > > I have not been continuously building ports so I can't say when the > failures started but a larger number of ports began to include > 'USES=libtool ' about a week ago. Perhaps pkg-plist files are not > including the files due to this change. > > /usr/port/UPDATING doesn not warn of any problems or fallout from > 'USES=libtool'. How best to resolve this? .la files are being removed because they cause overlinking, i.e. in the dependency chain A->B->C they add an extra link from A to C even if A doesn't use C directly. This makes updates to C expensive because then both A and B have to be rebuilt instead of just B. The files have been removed in a specific order such that you should not see build problems if you follow normal update guidelines. That means for instance that before updating a port you must make sure that its dependencies are up to date. A tool like portmaster or portupgrade handles that for you. Now that you are seeing build problems you can figure out which packages need to be rebuilt like this: find /usr/local/lib -name '*.la' | xargs grep -l 'libglib-2\.0\.la' | xargs pkg which This will print a list of .la files that refer to libglib-2.0.la and which package they belong to. Where it says "not found in the database" some update in the past must have gone wrong leaving this file behind. Just remove that file. After removing all such .la files, where it says "installed by package X", rebuild X. The list printed by that command should eventually be empty. Whenever you encounter a build error about a missing .la file you need to repeat this. For instance, if you get an error about libiconv.la the command you have to run is: find /usr/local/lib -name '*.la' | xargs grep -l 'libiconv\.la' | xargs pkg which