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