unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: Josselin Poiret <dev@jpoiret.xyz>,
	Christopher Baines <mail@cbaines.net>,
	Simon Tournier <zimon.toutoune@gmail.com>,
	Mathieu Othacehe <othacehe@gnu.org>,
	60847@debbugs.gnu.org, Tobias Geerinckx-Rice <me@tobias.gr>,
	Lars-Dominik Braun <lars@6xq.net>,
	Ricardo Wurmus <rekado@elephly.net>, jgart <jgart@dismail.de>
Subject: [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system.
Date: Fri, 10 Mar 2023 09:57:11 +0100	[thread overview]
Message-ID: <87o7p19e6w.fsf@gnu.org> (raw)
In-Reply-To: <87jzzsy7qt.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 07 Mar 2023 09:08:10 -0500")

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello,
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> +++ b/guix/packages.scm
>>> @@ -1864,28 +1864,30 @@ (define* (bag->derivation bag #:optional context)
>>
>> […]
>>
>>> +  (let ((builder-name (procedure-name (bag-build bag))))
>>> +    (if (or (bag-target bag)
>>> +            (eq? 'pyproject-build builder-name))
>>> +        (bag->cross-derivation bag)
>>
>> This one part is a showstopper to me, for two reasons:
>>
>>   1. We cannot rely on ‘procedure-name’ (it’s a debugging aid and it’s
>>      not guaranteed to return something useful).
>>
>>   2. Special-casing build systems here is not okay: the bag and build
>>      system abstractions exist to maintain separation of concerns.
>>
>> I understand there’s an actual bug to fix and the desire to fix a more
>> common issue, but I think this one approach is not the way forward.
>>
>> I hope that makes sense!
>
> I agree this is not "pretty", but it would be a "temporary" kludge until

To make sure there’s no misunderstanding, I think that’s not okay even
as a “temporary kludge” (I’m not against temporary kludges in general,
I’ve done my share of that ;-), but this would be way too brittle.)

> all the build systems can be migrated (and the package adjusted for) the
> "new" way, which is: native-inputs and inputs always co-exist, whether
> the build is a native one or a cross one.

Again, I’m not sure about the “new way”.  I’m sorry I lack the bandwidth
to review this quickly, especially a wide-ranging change like
inputs/native-inputs.

(Just yesterday I was fixing cross-compilation issues on ‘core-updates’;
that gives a lot of insight as to how native-inputs/inputs play out in
practice.)

[...]

> Otherwise, could you offer a concrete suggestion as the way forward?  I
> appreciate the "that's not the way", but stopping short of suggesting a
> better alternative leaves me wanting more :-).

Yup, I’m sorry I don’t have any suggestions!  Perhaps one suggestion
would be: start the native-inputs/inputs change on a new branch, for all
the build systems (or at least the main ones), and then try to build the
‘core’ subset (which includes cross-compilation) to get an idea of the
kind of code simplification opportunities as well as issues that arise.
I feel like it’s hard to anticipate the impact of such a change without
actually trying.

Thanks,
Ludo’.




  parent reply	other threads:[~2023-03-10  8:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16  4:04 [bug#60847] [PATCH 0/5] Enable cross-compilation for the pyproject-build-system Maxim Cournoyer
2023-01-16  5:01 ` [bug#60847] [PATCH 0/1] " Maxim Cournoyer
2023-01-16  5:01   ` [bug#60847] [PATCH 1/1] build: Enable cross-compilation for pyproject-build-system Maxim Cournoyer
2023-01-23 13:32 ` [bug#60847] [PATCH v2 0/1] Enable cross-compilation for the pyproject-build-system Maxim Cournoyer
2023-01-23 13:32   ` [bug#60847] [PATCH v2 1/1] build: Enable cross-compilation for pyproject-build-system Maxim Cournoyer
2023-03-06 17:04     ` [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system Ludovic Courtès
2023-03-07 14:08       ` Maxim Cournoyer
2023-03-07 15:05         ` Christopher Baines
2023-03-07 19:03           ` Maxim Cournoyer
2023-03-07 19:26             ` Christopher Baines
2023-03-10 14:13               ` Maxim Cournoyer
2023-03-10  8:57         ` Ludovic Courtès [this message]
2023-03-10 14:21           ` Maxim Cournoyer
2023-03-10 17:00             ` Ludovic Courtès
2023-03-12  4:05               ` Maxim Cournoyer
2023-03-12  4:05               ` Maxim Cournoyer
2023-03-06 22:56     ` jgart via Guix-patches via
2023-03-07  0:25     ` jgart via Guix-patches via
2023-01-24  2:05   ` [bug#60847] [PATCH v2 1/1] build: Enable cross-compilation for pyproject-build-system jgart via Guix-patches via

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87o7p19e6w.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=60847@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=mail@cbaines.net \
    --cc=maxim.cournoyer@gmail.com \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).