Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Relinking fun with libtool
Date: Wed, 17 Aug 2011 07:26:29
Message-Id: pan.2011.08.17.07.25.22@cox.net
In Reply to: [gentoo-dev] Relinking fun with libtool by Matti Bickel
1 Matti Bickel posted on Wed, 17 Aug 2011 00:30:43 +0200 as excerpted:
2
3 > Hi folks,
4 >
5 > coming back from an extended vacation I found bug #351266[1] still open.
6 > The root cause of this install failure seems to be libtool trying to
7 > relink php's apache module.
8
9 > So that leaves me with either:
10 > a) remove the relink_command from libphp5.la before calling emake
11 > install-sapi
12 > b) modifying the libdir in libphp5.la before calling emake
13 > install-sapi to point to $D/usr/lib/...
14 > c) finding out why libtool decides it needs to relink at all.
15 >
16 > Clearly, requiring users to edit the la file by hand is no solution.
17
18 > I'd be glad if somebody with more libtool knowledge can shed some light
19 > (or point me to some docs) on why relinking is necessary here at all
20 > and how to fix this breakage.
21 >
22 > [1]https://bugs.gentoo.org/show_bug.cgi?id=351266
23
24 I see flameeyes commented (once) on the bug. What I know about libtool
25 is from a user-perspective, but nearly 100% based on what flameeyes has
26 written on the topic in various blog posts, etc, obviously from a
27 developer perspective in most cases. He has blogged about libtool and
28 *.la files numerous times and I believe has a developer-focused libtool
29 guide up.
30
31 So I'd definitely recommend that direction. Whether you read the blogs
32 first and then ping him if necessary, or ping him for more directed help
33 first is up to you, but that's definitely where I'd start looking, for
34 sure.
35
36 ...
37
38 Meanwhile, purely from my gentoo user aka gentoo-based system sysadmin
39 perspective, I've noted more and more gentoo packages with the USE=static-
40 libs flag controlling both the generation of the *.a libs and their *.la
41 file counterparts, thus gradually reducing the *.la file pain-points for
42 many users, tho if removal order isn't maintained, it can cause more pain
43 temporarily, as *.la files from other packages may well reference those
44 removed. Two other related factors are worth noting in this regard:
45
46 1) Portage's FEATURES=fixlafiles (and the lafilefixer package/script, tho
47 without FEATURES=unmerge-orphans set it can be problematic if run
48 manually due to the fact that it alters files behind portage's back) can
49 be VERY helpful in this regard. Again, user perspective so I don't know
50 if that might be the difference you're seeing between the behavior on
51 your systems and that of the bug reporter's, but the general idea is to
52 fix *.la files to point to the libraries directly, instead of to other
53 *.la files, thus avoiding issues when lower level depencencies remove
54 their *.la files in the first place (with the feature) or fixing the
55 problem once it occurs (with the script run manually).
56
57 2) It remains a bit of a bold step, suitable mainly for advanced users
58 who can trace resulting issues and revert the policy for individual
59 packages (using /etc/portage/env/*/* files, for instance), but for many
60 of the users who aren't aware of any specific reason to have static
61 libraries available on their system at all, setting INSTALL_MASK (and
62 PKG_INSTALL_MASK if appropriate) to include *.la, thus eliminating the
63 problem files entirely, can be a viable option,
64 *WITH*ONE*MAJOR*EXCEPTION, the libtool package itself. Here, I have the
65 general (PKG_)INSTALL_MASK="*.la" , but empty the variable(s) in
66 /etc/portage/env/sys-devel/libtool , so the libtool package's own *.la
67 files aren't touched. (Certain build systems' config step fails if they
68 can't find libtool's own *.la files so those must remain, but they are
69 the only ones left on my system! =:^)
70
71 So by all means either read up on flameeyes' libtool blog posts or
72 contact him, but it may well be possible to simply eliminate that problem
73 *.la file, at least for those without USE=static-libs set for its
74 containing package, entirely, at the package level for you as a
75 developer, and/or at the system level for gentoo users aka gentoo-based-
76 system sysadmins, like me, and possibly the user reporting the bug in
77 question, if they aren't aware of any specific reason why the package
78 containing that *.la needs built with static-libs support at all.
79
80 --
81 Duncan - List replies preferred. No HTML msgs.
82 "Every nonfree program has a lord, a master --
83 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-dev] Re: Relinking fun with libtool Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>