Gentoo Archives: gentoo-user

From: "Diego Elio Pettenò" <flameeyes@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Notice: possible past, present and future breakage related to .la files
Date: Wed, 29 Sep 2010 22:41:20
Message-Id: 1285800006.6591.313.camel@yamato.local
1 Hi all users,
2
3 Some of you might have noticed, others might notice, a few would
4 probably not notice at all, that some Gentoo developers have started
5 removing the libtool archive files from packages that they maintain;
6 these changes have some times been applied to stable ebuilds as well,
7 but in all cases they won't be applied unless the package is re-emerged.
8
9 The reasoning behind this removal is too long to explain in this mail,
10 but you can find the start of it in [1], [2], and you can find some more
11 details in [3], [4] (yes these are all posts from my blog that I wrote
12 in the past few years). What matters to you (users) is that removing .la
13 files makes it less likely that unexpected libraries get linked in your
14 executables, even without --as-needed, or where --as-needed is not
15 working correctly.
16
17 If it sounds familiar as a situation, you might have gone through the
18 now-infamous libpng14 upgrade earlier this year [5], [6].
19
20 Removing .la files can cause, though, temporary disruption in the build
21 processes of libraries depending on those involved, because of the
22 transitive nature of .la files. For instance you could experiences
23 something like this:
24
25 libtool: link: `/usr/lib/libdbus-1.la' is not a valid libtool archive
26
27 with libdbus-1.la being replaced by other library names. If this is the
28 case, _do not panic_! Nothing is irremediably broken and nothing will
29 have to be rebuilt!
30
31 First of all, you should install lafilefixer and let it pass through the
32 currently-installed system:
33
34 # emerge lafilefixer
35 # lafilefixer --justfixit
36
37 This will convert the references to libtool archives to the -llibname
38 form, which works both with and without them.
39
40 Secondly, you can avoid any future requirement for this by sanitising
41 the newly installed .la files; this can be done either by using the
42 (currently testing) Portage 2.1.9 series, or by adding the following
43 snippet to your /etc/portage/bashrc:
44
45 post_src_install() {
46 lafilefixer "${D}"
47 }
48
49 (Users of the bashrcng feature can install a specific plugin to do the
50 job, I don't remember the name of it though, sorry!)
51
52 It's a one time process that _will_ save you from more breakage and work
53 to do in the future, so please bear with us.
54
55 Note: removal of .la files altogether from the system is _not_ possible
56 and _is_ going to break your system. This is why we've got to handle
57 this process with care and can't simply nuke them entirely. A few
58 packages (imagemagick, mpg123) actually use the .la files to load their
59 plugins; the libtool macros to detect libltld also rely on the presence
60 of $libdir/libltdl.la (even though it's not really necessary). Plus I
61 know of at least one package that installs data files with .la extension
62 even though they are not libtool archives.
63
64 Note #2: if you run revdep-rebuild before the above process, it _will_
65 find you a lot of packages to rebuild, and you'll waste a huge amount of
66 time running in circles.
67
68 At this time it is unclear what the path forward will be, if we either
69 keep removing .la files from packages, caring about the fact they are
70 not needed, and causing these disruption for who hasn't gone through the
71 above-noted process yet, or if we'll be doing a mass-removal and deal
72 separately with eventual breakage on packages that use them, like those
73 noted above. Both approaches have advantages and disadvantages and it's
74 mostly a matter of opinion and taste which one is "better".
75
76 We'll be looking forward to make this more widely available knowledge
77 and we hope to be able to provide a better experience for all of you at
78 the end of this (bumpy) journey.
79
80 Thanks!
81
82 [1] http://blog.flameeyes.eu/2008/04/14/what-about-those-la-files
83 [2] http://blog.flameeyes.eu/s/lafiles-2
84 [3] http://blog.flameeyes.eu/s/lafiles-plugins
85 [4] http://blog.flameeyes.eu/s/lafiles-chart
86 [5] http://blog.flameeyes.eu/2010/05/12/gentoo-failed-us-again
87 [6] http://blog.flameeyes.eu/2010/06/29/stable-users-libpng-update
88
89 --
90 Diego Elio Pettenò — “Flameeyes”
91 http://blog.flameeyes.eu/
92
93 If you found a .asc file in this mail and know not what it is,
94 it's a GnuPG digital signature: http://www.gnupg.org/

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies