public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexis Ballier <aballier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: mgorny@gentoo.org, tommy@gentoo.org
Subject: Re: [gentoo-dev] Re: [RFC] multilib-build.eclass and restricting unsupported ABIs
Date: Mon, 4 Mar 2013 11:02:40 +0100	[thread overview]
Message-ID: <20130304110240.75f9d12e@portable> (raw)
In-Reply-To: <20130303232503.3ad202e5@pomiocik.lan>

On Sun, 3 Mar 2013 23:25:03 +0100
Michał Górny <mgorny@gentoo.org> wrote:

> On Sun, 3 Mar 2013 18:18:12 +0100
> Alexis Ballier <aballier@gentoo.org> wrote:
> 
> > On Sun, 3 Mar 2013 17:58:26 +0100
> > Michał Górny <mgorny@gentoo.org> wrote:
> > 
> > > What do we need that wrapper for? What does the wrapper do? Does
> > > it just rely on custom 'ABI' variable?
> > 
> > yes -- it must perform some checks though.
> 
> What kind of checks?

you are called with ABI=sth argv[0] = your name
if argv[0] = abiwrapper -> print some information and exit
getenv ABI -> if nothing then set ABI=$DEFAULT_ABI (hardcoded at
buildtime of the wrapper)
execvp(argv[0]_$ABI, argv)
if execvp returns: print a warning, execvp argv[0]_$DEFAULT_ABI


python-wrapper.c is very likely to have such a logic already.

btw, IMHO ABI is a too common name for such a variable, I'd better name
it something like _GENTOO_MULTILIB_ABI so that collisions are much less
likely.

> > > Or maybe should it try to detect
> > > whether it was called by a 64- or 32-bit app?
> > 
> > this wont work: think about a build system, your shell/make will
> > likely be your default abi's but may call abi-specific tools
> > depending on what you build _for_ not what you build _with_
> 
> That's one side of it. The other is that if it worked, it may be
> something really unexpected. Do you expect things to work differently
> when called by a 32-bit program?

That's why I asked for examples :)
qmake may do it, I don't think its sane, but that's life for now.
having glxinfo for each abi is useful from a user perspective (it does
not need the wrapper a priori though)


> > > What for?
> > 
> > in order to be transparent from the ebuild perspective.
> 
> That depends on what kind of transparency do we want. I prefer being
> explicit here rather than assuming something you can't know for sure.

See it something like python-wrapper. EPYTHON=python3.2 python -> runs
python3.2 :)

> I think we're starting to miss the point of multilib. Multilib was
> intended as a cheap way of getting things working. I believe that we
> should still consider it so, and keep it in cages rather than
> believing that the world is more fun with tigers jumping around.
> 
> That said, I wouldn't say that making random executables in system
> work differently on ${ABI} is a way to go. That leaves the tricky
> imprint of multilib visible to users who shouldn't care about it. If
> they do, they're looking for multilib-portage.

To some extent that's what happened to python too :) As a python
maintainer, you could share your thoughts on the topic. python slotting
was intended to make switching between python versions easy but has
been needing wrappers for the python binary.

> The whole 'switching' part of multilib should be kept part of our
> build system -- eclasses, ebuilds or just some specificities like
> libdir or pkg-config path switching.

Maybe, but that would involve perfectly working setups being "broken".
It's like packages not respecting CC being broken for cross-compiling,
those not respecting CFLAGS being broken for multilib, etc. packages
calling directly binaries having ABI specific output will be broken for
multilib too (and I don't know of anyone checking for this while the
other two have been long standing issues we tried to fix). We can fix
this, but the fact is that we need multi-binary support for users, then
the only choice to make is if we want to provide a wrapper so that we
do not need to fix build systems or if we want to fix them. The latter
is likely preferred but I do not know what kind of work it will involve.
It'd help if tommy could provide a list of binaries he needed to wrap
through the abiwrapper.

Alexis.


  reply	other threads:[~2013-03-04 10:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 23:02 [gentoo-dev] [RFC] multilib-build.eclass and restricting unsupported ABIs Michał Górny
2013-03-03 11:41 ` Alexis Ballier
2013-03-03 12:37   ` Michał Górny
2013-03-03 13:02 ` [gentoo-dev] " Thomas Sachau
2013-03-03 15:24   ` Alexis Ballier
2013-03-03 15:47     ` Thomas Sachau
2013-03-03 16:10       ` Alexis Ballier
2013-03-03 16:27         ` Thomas Sachau
2013-03-03 16:35           ` Alexis Ballier
2013-03-03 21:39             ` Thomas Sachau
2013-03-04  9:42               ` Alexis Ballier
2013-03-03 16:58           ` Michał Górny
2013-03-03 17:18             ` Alexis Ballier
2013-03-03 22:25               ` Michał Górny
2013-03-04 10:02                 ` Alexis Ballier [this message]
2013-03-04 20:17                   ` Thomas Sachau
2013-03-07 16:29                     ` Alexis Ballier
2013-03-07 18:59                       ` Thomas Sachau
2013-03-08  3:17                         ` Davide Pesavento
2013-03-08 14:33                           ` Thomas Sachau
2013-03-08  4:47                         ` Michał Górny
2013-03-08 11:13                           ` Alexis Ballier
2013-03-08 11:10                         ` Alexis Ballier
2013-03-08 14:44                           ` Thomas Sachau
2013-03-09 10:45                             ` Alexis Ballier
2013-03-04 20:49                   ` Michał Górny
2013-03-04 22:21                     ` Thomas Sachau
2013-03-04 22:49                       ` Michał Górny
2013-03-08 18:25                       ` [gentoo-dev] " Steven J. Long
2013-03-07 16:25                     ` [gentoo-dev] " Alexis Ballier
2013-03-08 16:30                       ` Michał Górny
2013-03-09 10:10                         ` Alexis Ballier
2013-03-10 13:42                           ` Michał Górny
2013-03-15 10:32                             ` Alexis Ballier
2013-03-15 14:25                               ` Michał Górny
2013-03-03 16:00     ` Chí-Thanh Christopher Nguyễn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130304110240.75f9d12e@portable \
    --to=aballier@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    --cc=tommy@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox