Gentoo Archives: gentoo-dev

From: "C. Bergström" <cbergstrom@×××××××××.com>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, Kent Fredric <kentfredric@×××××.com>
Subject: Re: [gentoo-dev] How to support C++11 in libraries?
Date: Thu, 19 Dec 2013 08:46:09
Message-Id: 52B2B1F6.5070206@pathscale.com
In Reply to: Re: [gentoo-dev] How to support C++11 in libraries? by "Michał Górny"
1 On 12/19/13 03:35 PM, Michał Górny wrote:
2 > Dnia 2013-12-19, o godz. 15:28:46
3 > "C. Bergström" <cbergstrom@×××××××××.com> napisał(a):
4 >
5 >> On 12/19/13 03:20 PM, Michał Górny wrote:
6 >>> Dnia 2013-12-19, o godz. 00:56:31
7 >>> "C. Bergström" <cbergstrom@×××××××××.com> napisał(a):
8 >>>
9 >>>> On 12/19/13 12:47 AM, Kent Fredric wrote:
10 >>>>> On 19 December 2013 06:33, Jan Kundrát <jkt@g.o> wrote:
11 >>>>>> I'm worried by the cost of such a policy, though, because we would suddenly
12 >>>>>> have to patch some unknown amount of software
13 >>>>> Given the nature that changing that CXX Flag globally for all users
14 >>>>> could cause many packages to spontaneously fail to build, wouldn't
15 >>>>> that imply that changing that flag would essentially be de-stabilizing
16 >>>>> the whole tree, and a package being (arch) would no longer be an
17 >>>>> indication of sane, tested behaviour?
18 >>>>>
19 >>>>> This is really the perk of the USE driven process, the granular
20 >>>>> piecemeal approach that does only as much as necessary, without
21 >>>>> changing things that are already stable.
22 >>>> In practice wouldn't that mean you'd have to add c++11 USE flag to every
23 >>>> C++11 application and lib?
24 >>> No. Only the libs that change their ABI in C++11.
25 >>>
26 >>>> "Best case" both build and you end up with a linker problem (can be
27 >>>> worked around with compiler patches)
28 >>>> /usr/lib64/libboost.so
29 >>>> /usr/lib64-c++11/libboost.so
30 >>> What's wrong with this solution:
31 >>>
32 >>> 1. distro-specific compiler patching is wrong,
33 >> Pragmatically, this needs to be upstream and should have been there
34 >> already. Get some feedback to see if gcc people are receptive to the
35 >> idea before testing a gentoo-only patch. If they accept it upstream -
36 >> backport it. If they tell you f* off - get their feedback on how to deal
37 >> with it - more belo
38 >>
39 >> (this is not a gentoo only problem - this discussion should happen on a
40 >> more global level...)
41 > And how is this an issue to the major distributions? Binary distros can
42 > do a simple switch with standard all-package upgrade and forget about
43 > it. Like they usually do. Only people who built from sources have to
44 > think about it.
45 Umm.. no? Lets use a hypothetical example...
46
47 libboost.so (or any really popular lib.. Qt..) built with -std=c++11
48 breaks abi
49
50 If they don't do some sort of multilib approach - they are only going to
51 build it once and then any consumer of that outside the distro is stuck
52 with their decision. That's probably fine in the predominately C++03
53 world we have today, but for how long? I expect users on the binary
54 distro just do what they have to work around the problem (go build their
55 whole dependency chain from source). It didn't solve the problem - just
56 made it work for distro packages and pushed it off to the user.
57
58 My -L rant would depend on the above being used - that's all

Replies

Subject Author
Re: [gentoo-dev] How to support C++11 in libraries? "Jan Kundrát" <jkt@g.o>