Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Please review: function epunt_la_files for eutils.eclass
Date: Wed, 12 Nov 2008 13:41:57
Message-Id: 1226497311.29028.15.camel@localhost
In Reply to: Re: [gentoo-dev] Please review: function epunt_la_files for eutils.eclass by Peter Alfredsen
1 On P, 2008-11-09 at 18:34 +0200, Peter Alfredsen wrote:
2 > On Sunday 09 November 2008, Fabian Groffen wrote:
3 > > On 09-11-2008 18:04:05 +0200, Peter Alfredsen wrote:
4 > > > + # If this is a non-ELF system, chances are good that the .la
5 > > > files will be needed. + if type -P scanelf &> /dev/null
6 > >
7 > > I think this is a not so cool way to check for an ELF system.
8 >
9 > Indeed, I think it's a horrid way. Please find a better one.
10 >
11 > > > + then
12 > > > + debug-print "Scanelf found, proceeding..."
13 > > > + ebegin "Removing useless .la files"
14 > > > + find "${TARGET}" -name '*.la' '(' -type l -o -type f ')' -exec
15 > > > rm -f '{}' '+' + eend 0
16 > > > + else
17 > > > + debug-print "scanelf not found, this appears to be a non-ELF
18 > > > system." + debug-print "non-ELF systems are likely to need .la
19 > > > files." + debug-print ".la files not removed from ${TARGET}"
20 > >
21 > > rationale?
22 >
23 > "I've been told" that .la files are really only needed on non-ELF
24 > systems and with plugin systems that use dlopen. I actually have no way
25 > of knowing that the .la files are needed on those arches, but I had
26 > your archs in mind when doing the patch.
27
28 I heavily object to having any such function introduced or used or
29 equivalent .la removals conducted without a good rationale and
30 explanation of why this is the approach taken. I see no such explanation
31 anywhere, you are just blatantly removing .la files that the package
32 itself installs, with no good way to ensure they aren't actually needed
33 by libltdl and breaking revdep-rebuild heavily when used unwisely.
34
35 If such a function is introduced, I'm quite sure it will get used by
36 some maintainers in revbumps or version bumps, when the library soname
37 has not changed at all compared to the previous version. What that means
38 is that the user will get absolutely all packages suggested to
39 revdep-rebuild that directly OR _indirectly_ rdepend on the library in
40 question. Therefore to have any relatively safe way to add this, you can
41 only add the call when the library introduced ABI breaks. Some libraries
42 are backwards compatible forever, in effect you can't ever add
43 epunt_la_files to those without causing some serious one-time pain for
44 users. Therefore this is not a proper solution, and I don't see why this
45 should be used for just a small set of packages that do have an unstable
46 ABI while not having a solution for all the rest.
47
48 Additionally, I am quite unconvinced on the coverage of the removal or
49 non-removal of the files. Not removing it on all platforms (because you
50 can't) also doesn't solve the problem for those non-ELF platforms - you
51 still will get all the pain you are trying to solve here on those
52 platforms.
53
54 Also, this would be a local Gentoo specific hack to reduce pain on ELF
55 systems, while I'm sure there are upstream or better solutions available
56 that have not been explored. Here are two different ideas of mine for
57 libtool upstream work to perhaps solve this:
58
59 * Get libtool to not include indirectly linked libraries as dependencies
60 in the .la files if it is running on an ELF system (additionally I think
61 libtool should have a much better idea if a platform is ELF or not)
62
63 * Make libtool not install .la files on ELF platform if it doesn't see
64 libltdl used
65
66 These are just two different ideas, that might not work out, but one of
67 them might (they are mutually exclusive though).
68 Ideas like these should be investigated and pursued instead of distro
69 specific hacks, such as epunt_la_files.
70
71 I do however think that it would be a good idea to tweak revdep-rebuild
72 to not take indirect dependencies listed in .la files too seriously, and
73 mostly just go by DT_NEEDED entries in ELF files on ELF systems instead
74 of all of the listed ones in .la ones, as even if a solution for
75 upstream libtool is figured out, we'd still have old installed .la files
76 around that include indirect libraries.
77
78 --
79 Mart Raudsepp
80 Gentoo Developer
81 Mail: leio@g.o
82 Weblog: http://planet.gentoo.org/developers/leio

Attachments

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

Replies