1 |
Marius Mauch <genone@g.o> writes: |
2 |
|
3 |
> Also it is not going to be a perfect solution against all runtime link |
4 |
> errors, but if enabled it should eliminate the need for revdep-rebuild |
5 |
> in most cases. |
6 |
|
7 |
I'm afraid that it will turn, for complex libraries like libexpat and |
8 |
users not using --as-needed, the message telling you the program cannot |
9 |
be started with subtle crashes for symbol collision. |
10 |
|
11 |
preserve-libs would be quite perfect if all libraries out there used |
12 |
versioned symbol, but this is far from true (and some systems Gentoo |
13 |
runs on don't even consider versioned symbol to begin with). |
14 |
|
15 |
Example at hand? When the libexpat transition started, the choice of |
16 |
keeling .so.0 around with .so.1 was discarded right away because: |
17 |
|
18 |
- library libfoo links to libexpat; |
19 |
- program bar links to libfoo; |
20 |
- user is not using --as-needed, so bar has a NEEDED against both libfoo |
21 |
and libexpat; |
22 |
- user rebuilds libfoo, but not bar; or bar and not libfoo, the result |
23 |
is the same; |
24 |
- KABOOM! symbol collision and bar crashes. |
25 |
|
26 |
As much as we want preserve-libs to be an all-curing magic, it's |
27 |
not. When you need to replace a library you need to do so _for all its |
28 |
users at once_, if you allow it to be gradually you're opening the |
29 |
hellgate of symbol collision. |
30 |
|
31 |
My solution would be to disallow _building_ anything that is or depends |
32 |
directly or indirectly on a package on the set until it is removed, or |
33 |
at the request of merging "mickeymouse", depending on "bar", re-emerging |
34 |
libfoo first, and bar if the user is not using --as-needed (checking the |
35 |
NEEDED lines). |
36 |
|
37 |
With all due respect to everybody, the right course of action here has |
38 |
to be selected by people who knows how the runtime linker works, symbol |
39 |
collision and all the rest, as that's what's at stake here. |
40 |
|
41 |
-- |
42 |
Diego "Flameeyes" Pettenò |
43 |
http://blog.flameeyes.eu/ |