Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2014 19:59:19 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        gtodd@bellanet.org
Cc:        cary@SDF.ORG, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.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: <alpine.BSF.2.11.1409081252100.65468@ninga.iciti.internal>
References:  <20140907013546.GA10438@SDF.ORG> <alpine.BSF.2.11.1409081252100.65468@ninga.iciti.internal>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140908195919.262177f2>