public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: peter@stuge.se
Subject: Re: [gentoo-dev] Re: Re: Re: crossdev and multilib interference
Date: Thu, 19 Jun 2014 09:58:28 +0200	[thread overview]
Message-ID: <20140619095828.05cb4ef7@pomiot.lan> (raw)
In-Reply-To: <20140618152403.28347.qmail@stuge.se>

[-- Attachment #1: Type: text/plain, Size: 4764 bytes --]

Dnia 2014-06-18, o godz. 17:24:03
Peter Stuge <peter@stuge.se> napisał(a):

> Alexandre Rostovtsev wrote:
> > current crossdev versions blindly install their
> > /usr/bin/i686-pc-linux-gnu-pkg-config wrapper script, overwriting
> > the binary belonging to pkgconfig[abi_x86_32].
> 
> Thanks for getting to the point.
> 
> It seems silly for two toolchains (abi_x86_32 and a crossdev i686 toolchain)
> to compete for one and the same name.
> 
> Is that really desirable?

No. But the user specifies prefix for crossdev. As far as I'm
concerned, crossdev could refuse prefixes that are already used
in Gentoo profiles.

> Both toolchains integrate with emerge; either one can be used to emerge
> packages, right? (Where the packages are emerged to doesn't matter.)

No, 'integrating with emerge' is a bad word. Crossdev wraps emerge
and runs on top of it. Multilib runs 'below' emerge as run by eclass.

> If Gentoo would like to support different toolchains for one CHOST
> then there obviously needs to be some abstraction, and creating it
> should take into account that things like autoconf, cmake, waf and
> friends may not support any such abstraction for a long time to come.
> 
> An obvious low-finesse solution is to only allow one toolchain per CHOST.

Obviously.

> That would formalize the current situation where only one toolchain or
> the other works correctly, and would be fine as a first step.
> 
> If long-term Gentoo does indeed want to support both an abi_x86_32
> and a crossdev-built i686-pc-linux-gnu toolchain, then obviously
> someone interested in that will have to come up with how it will
> work.

I'd rather see multilib gcc installing 'i686-pc-linux-gnu' wrappers
that call the native gcc with proper '-m' option. As far as I know,
there's no real difference between the code emitted by native compiler
with -m32 and cross-compiler for i686. This would remove some need for
crossdev (and therefore some breakages) and allow our users to avoid
rebuilding the same thing twice.

> > The initial multilib code didn't use prefixed pkg-config binaries
> > but simple PKG_CONFIG_PATH override.
> 
> Do you mean PKG_CONFIG_LIBDIR?

Both.

> > However, crossdev installing i686-pc-linux-gnu-pkg-config caused
> > configure scripts to find and use it instead of plain 'pkg-config',
> 
> That sounds to me like autoconf's pkg-config support might also be
> involved in the problem?

The autoconf's AC_PROG_TOOL macros are proper and very useful. What's
the real problem is that crossdev installs some custom wrapper that
clobbers PKG_CONFIG_* where real pkg-config is expected.

> > and since the wrapper dumbly overrides PKG_CONFIG_PATH it broke our
> > original solution.
> > 
> > We specifically made pkg-config packages install the prefixed binaries
> > to trigger collisions with crossdev
> 
> That strikes me as really unhelpful. You spent time on creating something
> you were sure would cause a problem, instead of on something to *avoid*
> the problem. Oh well.

This was hitting our users and crossdev team didn't care. I did what I
could from our side to fix this, though this probably wasn't good
enough.

Do you prefer if I add some logic to detect i686 crossdev and bail out
completely, telling users to remove it? That wouldn't be very friendly
but at least they wouldn't hit random build failures anymore.

> > -- so that people who have systems broken with crossdev's
> > i686-pc-linux-gnu-pkg-config would be more likely informed there's
> > something wrong with their systems.
> 
> You seem to have made an arbitrary decision that crossdev's
> pkg-config is at fault. I think we need to look at this in a larger
> perspective as outlined above; take a step back.

Because it is at fault. Build systems expect *-pkg-config to be
a binary compatible with pkg-config. When crossdev installs something
that does not respect PKG_CONFIG_{LIBDIR,PATH} and instead uses some
fancy directories, it is inevitable that it will break something.

And just to be clear, we didn't invent anything new. The breakage was
there for years, we were just first ones to mix all the ingredients.

The CHOSTs used by our stuff come from profiles, we didn't invent them.
The multilib_toolchain_setup that sets the build environment comes from
multilib.eclass and was already used for multilib in the past. The code
that causes tc-getBUILD_CC to return incorrect (crossdev) compiler
comes from toolchain-funcs.eclass.

If you look at it all, you'd notice that all code that results in those
failures is maintained by toolchain team, and so is crossdev. So what
can small gx86-multilib team to do to fix it?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

  reply	other threads:[~2014-06-19  7:58 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 15:46 [gentoo-dev] crossdev and multilib interference hasufell
2014-03-12 16:06 ` Alexandre Rostovtsev
2014-03-12 18:56   ` Alexis Ballier
2014-03-16 11:50   ` Greg Turner
2014-03-26  6:07     ` Mike Frysinger
2014-03-26 12:25       ` [gentoo-dev] " Steven J. Long
2014-03-26 16:12         ` Mike Frysinger
2014-03-26 16:23           ` Ian Stakenvicius
2014-03-27  2:41             ` Mike Frysinger
2014-03-27  4:41               ` Alexandre Rostovtsev
2014-03-27  6:07                 ` Mike Frysinger
2014-03-27  6:31                   ` Alexandre Rostovtsev
2014-03-27  6:41                     ` Mike Frysinger
2014-03-27  6:51                       ` Michał Górny
2014-03-27  7:23                         ` Mike Frysinger
2014-03-27  6:58                       ` Samuli Suominen
2014-03-27  8:41           ` [gentoo-dev] " Steven J. Long
2014-03-28  6:36             ` Mike Frysinger
2014-03-30  9:53               ` [gentoo-dev] " Steven J. Long
2014-06-15 20:35                 ` hasufell
2014-06-15 20:43                   ` Chí-Thanh Christopher Nguyễn
2014-06-16 13:37                     ` hasufell
2014-06-16 18:42                       ` Steev Klimaszewski
2014-06-16 19:31                         ` hasufell
2014-06-16 19:42                           ` Jeroen Roovers
2014-06-16 19:47                             ` hasufell
2014-06-16 20:05                               ` Joshua Kinard
2014-06-16 20:24                                 ` hasufell
2014-06-16 20:59                                   ` Joshua Kinard
2014-06-16 22:10                                     ` hasufell
2014-06-16 23:38                                       ` Joshua Kinard
2014-06-17  1:47                                         ` hasufell
2014-06-17  2:17                                           ` Joshua Kinard
2014-06-17 12:30                                             ` hasufell
2014-06-17 12:49                                               ` Rich Freeman
2014-06-17 13:53                                                 ` hasufell
2014-06-17 14:17                                                 ` Joshua Kinard
2014-06-17 14:56                                                   ` Alexandre Rostovtsev
2014-06-17 15:10                                                     ` Michał Górny
2014-06-18 15:24                                                       ` Peter Stuge
2014-06-19  7:58                                                         ` Michał Górny [this message]
2014-06-17 15:20                                                     ` Joshua Kinard
2014-06-18  5:08                                                       ` Alexandre Rostovtsev
2014-06-18  6:24                                                         ` Joshua Kinard
2014-06-18 14:18                                                           ` Ian Stakenvicius
2014-06-19 21:20                                                     ` [gentoo-dev] " Steven J. Long
2014-06-20 20:10                                                       ` [gentoo-dev] " Ian Stakenvicius
2014-06-21 10:31                                                         ` Greg Turner
2014-06-21 20:47                                                           ` Michał Górny
2014-08-01  9:05                                                         ` Steven J. Long
2014-08-01 14:36                                                           ` Ian Stakenvicius
2014-08-01 18:17                                                             ` [gentoo-dev] " Steven J. Long
2014-06-18  4:29                                                   ` [gentoo-dev] " Ryan Hill
2014-06-17 14:04                                               ` [gentoo-dev] Re: " Joshua Kinard
2014-06-17 14:38                                                 ` hasufell
2014-06-17 15:02                                                   ` Joshua Kinard
2014-06-17 15:18                                                     ` hasufell
2014-06-17 15:37                                                     ` hasufell
2014-06-17 12:48                                             ` hasufell
2014-06-17 14:31                                               ` Joshua Kinard
2014-06-17 13:25                                         ` Ian Stakenvicius
2014-06-17 14:22                                           ` Michał Górny
2014-06-17 14:34                                             ` Joshua Kinard
2014-06-16 23:25                                   ` Patrick Lauer
2014-06-16 20:27                                 ` Ian Stakenvicius
2014-06-16 21:42                                   ` [gentoo-dev] " Jeroen Roovers
2014-06-17  0:03                                     ` Joshua Kinard
2014-06-16 20:25                         ` [gentoo-dev] Re: Re: " hasufell
2014-06-16  2:24                   ` [gentoo-dev] " Ryan Hill
2014-06-16 13:27                     ` hasufell
2014-06-17  4:52                       ` Ryan Hill
2014-06-17 12:29                         ` hasufell
2014-03-29  1:21       ` [gentoo-dev] " Maciej Mrozowski
2014-03-16 12:01   ` Greg Turner
2014-03-13  8:55 ` Michał Górny
2014-03-13 12:20   ` Alexandre Rostovtsev
2014-03-26  5:17   ` Mike Frysinger
2014-03-27  6:13     ` Mike Frysinger
2014-03-27  6:51       ` Michał Górny
2014-03-27  7:18         ` Mike Frysinger
2014-03-27  9:10           ` Michał Górny
2014-03-27 14:23             ` Mike Frysinger
2014-03-27 14:31               ` Michał Górny
2014-03-28  6:33                 ` Mike Frysinger
2014-03-29 21:39                   ` Michał Górny

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=20140619095828.05cb4ef7@pomiot.lan \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=peter@stuge.se \
    /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