Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o, Michael Orlitzky <mjo@g.o>
Subject: Re: [gentoo-dev] Deps on slotted executables (implicit @system tangent)
Date: Fri, 14 Nov 2014 18:12:27
Message-Id: 546645F7.5020905@gentoo.org
In Reply to: Re: [gentoo-dev] Deps on slotted executables (implicit @system tangent) by "Michał Górny"
1 On 11/14/2014 06:58 AM, Micha³ Górny wrote:
2 > Dnia 2014-11-14, o godz. 09:08:17
3 > Michael Orlitzky <mjo@g.o> napisa³(a):
4 >
5 >> On 11/13/2014 10:17 AM, Ian Stakenvicius wrote:
6 >>
7 >>>> Isn't it possible to disable C++ in GCC with USE="-cxx"?
8 >>>
9 >>> It is.. but unfortunately there's no way in DEPEND to ensure it's
10 >>> satisfied, as you can have a gcc installed with that flag enabled but
11 >>> have a second one (that's actually selected in gcc-config) with it
12 >>> disabled. A pkg_pretend check or a pkg_setup check (if you don't want
13 >>> it to just fail in src_configure) is probably the best way to enforce
14 >>> that one at this time. Unless there are other ways I'm not aware of??
15 >>
16 >> Is this a case (as was recently suggested) where we're doing something
17 >> stupid rather than asking for help from the PMS? This problem shows up
18 >> in a few places -- off the top of my head:
19 >>
20 >> * GCC (see sys-apps/systemd-217.ebuild)
21 >> * PHP (see comment in app-text/XML-Schema-learner-1.0.0.ebuild)
22 >> * Python (all over the place)
23 >> * Ruby (all over the place)
24 >>
25 >> Since all of the above are slotted, we can DEPEND on them, but we can't
26 >> actually be sure that we're using the right slot at build time. The
27 >> package manager knows that the right version is there, but it's not at
28 >> the moment prepared to find and use it.
29 >>
30 >> Question 1: is it desirable to e.g. switch compilers, compile systemd,
31 >> and then switch back? At first I thought the PM should respect my
32 >> selected compiler, but after thinking about it for a few minutes, I've
33 >> changed my mind. The compiler deps are just like anything else: if I ask
34 >> portage to install systemd, it should do what it takes to install
35 >> systemd assuming I approve the build plan.
36 >
37 > Relying on stuff that can be switched outside the PM scope is always
38 > a bad idea. Think of eselect-opengl -- for a long time, people had to
39 > switch the OpenGL implementation to xorg to build xorg server, and then
40 > back to be able to use anything using OpenGL. Then we fixed xorg-server
41 > to use the underlying headers directly.
42
43 Yeah, having ebuilds switch the global compiler configuration would be
44 completely insane. If they need to select a different local compiler via
45 a mechanism like CC and CXX, as you suggest below, then that's fine.
46
47 > I think we should use the same solution for the gcc issues. We already
48 > expect packages to respect CC & CXX -- why not set them then? I'm
49 > keeping my CC & CXX at a specific gcc version for a long time now.
50 >
51
52
53 --
54 Thanks,
55 Zac