Gentoo Archives: gentoo-dev

From: Thomas Sachau <tommy@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [RFC] multilib-build.eclass and restricting unsupported ABIs
Date: Mon, 04 Mar 2013 20:18:05
Message-Id: 5135016E.20903@gentoo.org
In Reply to: Re: [gentoo-dev] Re: [RFC] multilib-build.eclass and restricting unsupported ABIs by Alexis Ballier
1 Alexis Ballier schrieb:
2 > On Sun, 3 Mar 2013 23:25:03 +0100
3 > Michał Górny <mgorny@g.o> wrote:
4 >
5 >> On Sun, 3 Mar 2013 18:18:12 +0100
6 >> Alexis Ballier <aballier@g.o> wrote:
7 >>
8 >>> On Sun, 3 Mar 2013 17:58:26 +0100
9 >>> Michał Górny <mgorny@g.o> wrote:
10 >>>
11 >>>> What do we need that wrapper for? What does the wrapper do? Does
12 >>>> it just rely on custom 'ABI' variable?
13 >>>
14 >>> yes -- it must perform some checks though.
15 >>
16 >> What kind of checks?
17 >
18 > you are called with ABI=sth argv[0] = your name
19 > if argv[0] = abiwrapper -> print some information and exit
20 > getenv ABI -> if nothing then set ABI=$DEFAULT_ABI (hardcoded at
21 > buildtime of the wrapper)
22 > execvp(argv[0]_$ABI, argv)
23 > if execvp returns: print a warning, execvp argv[0]_$DEFAULT_ABI
24 >
25 >
26 > python-wrapper.c is very likely to have such a logic already.
27 >
28 > btw, IMHO ABI is a too common name for such a variable, I'd better name
29 > it something like _GENTOO_MULTILIB_ABI so that collisions are much less
30 > likely.
31 >
32 >>>> Or maybe should it try to detect
33 >>>> whether it was called by a 64- or 32-bit app?
34 >>>
35 >>> this wont work: think about a build system, your shell/make will
36 >>> likely be your default abi's but may call abi-specific tools
37 >>> depending on what you build _for_ not what you build _with_
38 >>
39 >> That's one side of it. The other is that if it worked, it may be
40 >> something really unexpected. Do you expect things to work differently
41 >> when called by a 32-bit program?
42 >
43 > That's why I asked for examples :)
44 > qmake may do it, I don't think its sane, but that's life for now.
45 > having glxinfo for each abi is useful from a user perspective (it does
46 > not need the wrapper a priori though)
47 >
48 >
49 >>>> What for?
50 >>>
51 >>> in order to be transparent from the ebuild perspective.
52 >>
53 >> That depends on what kind of transparency do we want. I prefer being
54 >> explicit here rather than assuming something you can't know for sure.
55 >
56 > See it something like python-wrapper. EPYTHON=python3.2 python -> runs
57 > python3.2 :)
58 >
59 >> I think we're starting to miss the point of multilib. Multilib was
60 >> intended as a cheap way of getting things working. I believe that we
61 >> should still consider it so, and keep it in cages rather than
62 >> believing that the world is more fun with tigers jumping around.
63 >>
64 >> That said, I wouldn't say that making random executables in system
65 >> work differently on ${ABI} is a way to go. That leaves the tricky
66 >> imprint of multilib visible to users who shouldn't care about it. If
67 >> they do, they're looking for multilib-portage.
68 >
69 > To some extent that's what happened to python too :) As a python
70 > maintainer, you could share your thoughts on the topic. python slotting
71 > was intended to make switching between python versions easy but has
72 > been needing wrappers for the python binary.
73 >
74 >> The whole 'switching' part of multilib should be kept part of our
75 >> build system -- eclasses, ebuilds or just some specificities like
76 >> libdir or pkg-config path switching.
77 >
78 > Maybe, but that would involve perfectly working setups being "broken".
79 > It's like packages not respecting CC being broken for cross-compiling,
80 > those not respecting CFLAGS being broken for multilib, etc. packages
81 > calling directly binaries having ABI specific output will be broken for
82 > multilib too (and I don't know of anyone checking for this while the
83 > other two have been long standing issues we tried to fix). We can fix
84 > this, but the fact is that we need multi-binary support for users, then
85 > the only choice to make is if we want to provide a wrapper so that we
86 > do not need to fix build systems or if we want to fix them. The latter
87 > is likely preferred but I do not know what kind of work it will involve.
88 > It'd help if tommy could provide a list of binaries he needed to wrap
89 > through the abiwrapper.
90 >
91 > Alexis.
92 >
93
94 The actual list of packages with wrapped binaries is in the profiles dir
95 of the multilib-portage overlay (expect this to be a minimal list, there
96 are probably more out there we did not yet catch):
97
98 dev-db/mysql abiwrapper
99 dev-lang/perl abiwrapper
100 dev-lang/python abiwrapper
101 dev-lang/ruby abiwrapper
102 dev-libs/gobject-introspection abiwrapper
103 dev-libs/libIDL abiwrapper
104 dev-scheme/guile abiwrapper
105 net-libs/courier-authlib abiwrapper
106 dev-qt/qtcore abiwrapper
107 dev-qt/qtgui abiwrapper
108 media-libs/fontconfig abiwrapper
109 www-servers/apache abiwrapper
110 x11-libs/pango abiwrapper
111 x11-libs/gtk+ abiwrapper
112
113 Keep in mind, that multilib-portage does always and unconditionally wrap
114 *-config binaries. If you dont want to add that logic to the eclass, you
115 need to add all packages providing such files to the list.
116
117 --
118
119 Thomas Sachau
120 Gentoo Linux Developer

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies