Gentoo Archives: gentoo-dev

From: "Gregory M. Turner" <gmt@×××××××.net>
To: gentoo-dev@l.g.o
Cc: "Anthony G. Basile" <blueness@g.o>
Subject: Re: [gentoo-dev] impending c++11 clusterfuck?
Date: Wed, 02 Dec 2015 02:12:29
Message-Id: 1449022337.20516.21.camel@be-evil.net
In Reply to: Re: [gentoo-dev] impending c++11 clusterfuck? by "Anthony G. Basile"
1 On Tue, 2015-12-01 at 07:18 -0500, Anthony G. Basile wrote:
2 > So on that bug we're talking about selectively
3 > adding -std=c++11 (or possibly gnu++11) to packages.
4
5 Yes, this is the biggest real-world problem we face.  It requires an
6 immediate solution in the ~* branches; the affected ebuilds just dump a
7 bunch of gcc gobbldeygook and crash.
8
9 If I understand the generalized problem we are facing there, as a
10 package gets "c++11-ized", all of its reverse-BDEPs find themselves in
11 the following situation:
12
13 Imagine cat/foo is a library.  cat/foo-3.0 is the newest non-c++11-ized
14 version (in its slot, perhaps).  Now cat/foo-3.1 comes along and from
15 then on, anything BDEPENDing on it must be built with -std=c++11 (I'm
16 ignoring the c++11 vs. gnu++11 but presumably we'll eventually need to
17 figure out some kind of game plan about that).
18
19 So, now, "everything" pulling in headers from  cat/foo finds itself in
20 this situation:
21
22  o if it pulls in headers from <cat/foo-3.1, all is as before
23  o if it pulls in headers from >=cat/foo-3.1, we must add a CFLAG
24
25 I guess the reasonable way to achieve that sort of behavior is
26 pkgconfig (which is not really a rock-solid solution.  First, some
27 packages might fail to put it in there (but, OK we just add it
28 ourselves, let's say).  Second, how many of cat/foo's reverse BDEPs
29 side-step pkgconfig?  Sometimes this is pretty common, I'm afraid.  
30
31 So, let's say lots of packages depending on cat/foo have this pkgconfig
32 side-stepping problem, we could theoretically write some eclass to
33 inject it when appropriate, and expect those side-stepping ebuilds to
34 consume it, no?  That seems pretty easy and hopefully wouldn't require
35 any of the scary ideas that have been discussed in this thread.
36
37 -gmt

Replies

Subject Author
Re: [gentoo-dev] impending c++11 clusterfuck? "Michał Górny" <mgorny@g.o>