Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: gcc with gcj flag revdep loop
Date: Mon, 26 Jan 2009 06:58:56
Message-Id: pan.2009.01.26.06.58.34@cox.net
In Reply to: Re: [gentoo-amd64] gcc with gcj flag revdep loop by Stan Sander
1 Stan Sander <stsander@×××××.net> posted 497D0FAF.10300@×××××.net,
2 excerpted below, on Sun, 25 Jan 2009 18:19:43 -0700:
3
4 > My guess is that not too many people have this use flag enabled so it
5 > hasn't gotten a lot of attention and thus has mostly been forgotten.
6 > Just by way of additional help, here is the line for
7 > /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/libgij.la on my system that I
8 > have edited:
9 >
10 > # Libraries that this one depends upon.
11 > dependency_libs='/usr/lib64/gcc/x86_64-pc-linux-gnu/4.3.2/libgcj.la
12 > -lpthread -lrt -ldl -lz'
13
14 The following is based on what I've read, backed up by experience on my
15 own system, but I don't claim to be a libtool authority by /any/
16 stretch. YMMV, UAYOR [1], etc.
17
18 Note that *.la (aka libtool), files are and have always been an inelegant
19 solution to one problem that unfortunately comes with a whole host of
20 additional problems.
21
22 In MOST cases, it's actually possible to delete the *.la files entirely.
23 The system in many ways works better without them than with them, as gcc,
24 libtool and ld can usually detect the libraries anyway. The most common
25 exception is "plugins", which on Linux are shared object (*.so) files
26 just like ordinary libraries, only they're linked and loaded differently,
27 such that the application can be used with or without them. Apparently
28 "plugins" (and other similarly loaded libraries) need or often need the
29 *.la files in ordered to function correctly. From what I've read, KDE in
30 particular uses this style of loading relatively frequently, so other
31 than known plugins (as for browsers, or codecs for xine and mplayer), KDE
32 tends to be more likely to break than most stuff if a particular *.la
33 file is missing.
34
35 Thus, one way to potentially solve such *.la issues is to rename the file
36 to something like *.la.remove, or *.la.remove.yyyymmdd (where yyyymmdd is
37 a date string), thus taking it out of normal usage and out of revdep-
38 rebuild's view. If nothing using that library seems to break upon
39 restarting it, you can then go ahead and delete it. (Alternatively for
40 those who had FEATURES=buildpkg set when they merged that package and
41 thus have the binpkg, simply delete the *.la immediately, as it's easy
42 enough to remerge the binpkg if the *.la file turns out to be needed for
43 something.)
44
45 Since I figured that out, I've had much less problems with *.la files.
46 If they start giving me problems, I just delete them, knowing I can grab
47 them from the binpkg (or simply remerge it) if I need 'em.
48
49 Once you know for sure that a particularly troublesome *.la is /not/
50 needed it can be added to INSTALL_MASK in make.conf, thereby keeping it
51 from being reinstalled when the package is remerged or updated. I
52 wouldn't worry about it in most cases, tho, only in cases like this
53 (again, only once you know that killing the *.la isn't going to break
54 something else due to that corner-case) where it's a repeating problem
55 that you're tired of dealing with.
56
57 ---
58 [1] (http://www.acronymfinder.com/Use-At-Your-Own-Risk-(UAYOR).html
59
60 --
61 Duncan - List replies preferred. No HTML msgs.
62 "Every nonfree program has a lord, a master --
63 and if you use the program, he is your master." Richard Stallman