1 |
On 11/30/15 1:42 AM, Michał Górny wrote: |
2 |
> On Sun, 29 Nov 2015 19:56:04 -0800 |
3 |
> "Gregory M. Turner" <gmt@×××××××.net> wrote: |
4 |
> |
5 |
>> I'm quoting myself from bug #566328 here. These were off-the-cuff |
6 |
>> remarks that got away from me and became a call-to-arms... |
7 |
>> |
8 |
>> (In reply to Michał Górny from comment #7) |
9 |
>>> This is never this simple. C++11 can change the ABI. So the point kinda is, |
10 |
>>> we need to ensure that all C++ libraries in a depgraph use the same C++ |
11 |
>>> version. |
12 |
>> This is pretty awful when you really think about it. I feel like I'm |
13 |
>> watching a train-wreck in super slow motion. |
14 |
> Well, it's not that bad actually. After some thinking, I figured out |
15 |
> they fixed most 98/11 incompatibilities around gcc 4.8/4.9, and left |
16 |
> only a few 'unlikely' to cause issues. |
17 |
> |
18 |
> However, if one dep switches to C++11, it is quite likely to require |
19 |
> C++11 in its revdeps, and that's what happening with libsigc++ |
20 |
> and other gtkmm libraries. |
21 |
When building a package, you can't just switch between -std=gnu++98 or |
22 |
c++99 or gnu++11 or c++11 since there are syntactic difference. |
23 |
> |
24 |
> Plus, there's of course the classical issue of ABI incompatibility |
25 |
> between libstdc++ bundled with 4.9 and 5.1, and 5.2... so along with |
26 |
> switching g++ version, you soon start to have to rebuild random C++ |
27 |
> libraries. |
28 |
> |
29 |
> And the issue of supporting alternative C++ standard library |
30 |
> implementations -- like using libcxx with clang. They are of course |
31 |
> incompatible with GNU's ever-changing ABI. |
32 |
> |
33 |
>> I'm not sure we're taking this seriously enough -- sooner or later it |
34 |
>> seems destined to become a major clusterfuck if we don't do something |
35 |
>> proactive about it now while the drawing-board is relatively |
36 |
>> uncluttered. |
37 |
>> |
38 |
>> The only thing I can think of that has this kind of two-way depgraph |
39 |
>> magic property are the major "abi" USE_EXPAND values (multilib-build |
40 |
>> and python-r1, in other words). |
41 |
>> |
42 |
>> But those rely on fancy framework-generated USE-flag deps, which seem |
43 |
>> like overkill and likely to incur unjustifiable user-experience-costs. |
44 |
> Yes, it is terrible. You end up introducing a lot of USE flags that |
45 |
> need to be manually switched along with gcc versions. If we start |
46 |
> splitting them between c++98 and c++11, we're quite likely to hit USE |
47 |
> flag conflicts between packages/developers which prefer one over |
48 |
> another. |
49 |
|
50 |
This would be a nightmare. |
51 |
|
52 |
> |
53 |
>> Perhaps a solution to this cxx11 clusterfuck can be found that works |
54 |
>> more like perl? By that I mean, pick your poison (respectively, your |
55 |
>> cxx11 ABI of preference or your major perl version of choice), rely on |
56 |
>> inbuilt portage features do the trick most of the time, and, when it |
57 |
>> breaks, run "magically-fix-everything.sh," grab a caffeinated beverage |
58 |
>> or three and fire up your favorite VOD client while the mess gets |
59 |
>> magically cleaned up by robots somehow. |
60 |
> Sadly := can't help here since gcc switches occur independently of |
61 |
> package installs. And AFAIK revdep-rebuild doesn't help either. |
62 |
You can run `revdep-rebuild -L 'libstdc\+\+\.so\.6'` to rebuild |
63 |
everything that links against libstdc++.so.6. This will rebuild a lot |
64 |
of packages but will fix everything. |
65 |
|
66 |
If we record enough information at build time (eg. gcc version or |
67 |
libcxx/clang) then we can build tools that intelligently predict if |
68 |
there's an abi incompatibility. Unfortunately gcc doesn't bump soname |
69 |
and/or version-info when it changes c++11 abi. (since c++11 is |
70 |
experimental and c++03/98 have stable abi, they don't want to force |
71 |
rebuilds). So we have to record the equivalent of an soname. If we put |
72 |
that information in a file like NEEDED.ELF.2 in vdb, it could be read by |
73 |
utilities like magically-fix-everything.sh (a revddep-rebuild.sh for |
74 |
libstdc++). |
75 |
|
76 |
-- |
77 |
Anthony G. Basile, Ph.D. |
78 |
Gentoo Linux Developer [Hardened] |
79 |
E-Mail : blueness@g.o |
80 |
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA |
81 |
GnuPG ID : F52D4BBA |