From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kIbGJzIRc1+/GAAA0tVLHw (envelope-from ) for ; Tue, 29 Sep 2020 10:49:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2DWrIzIRc19ILgAAB5/wlQ (envelope-from ) for ; Tue, 29 Sep 2020 10:49:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 098529402A3 for ; Tue, 29 Sep 2020 10:49:22 +0000 (UTC) Received: from localhost ([::1]:42342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNDCC-00021S-KL for larch@yhetil.org; Tue, 29 Sep 2020 06:49:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kND90-0000hL-MG for guix-patches@gnu.org; Tue, 29 Sep 2020 06:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kND90-0000FQ-B4 for guix-patches@gnu.org; Tue, 29 Sep 2020 06:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kND90-0001Qt-AE for guix-patches@gnu.org; Tue, 29 Sep 2020 06:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43679] [PATCH 0/5] Add '--with-toolchain' package transformation option Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Sep 2020 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43679 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 43679@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43679-submit@debbugs.gnu.org id=B43679.16013763075436 (code B ref 43679); Tue, 29 Sep 2020 10:46:02 +0000 Received: (at 43679) by debbugs.gnu.org; 29 Sep 2020 10:45:07 +0000 Received: from localhost ([127.0.0.1]:55014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kND86-0001Pc-TG for submit@debbugs.gnu.org; Tue, 29 Sep 2020 06:45:07 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kND83-0001Ol-P2 for 43679@debbugs.gnu.org; Tue, 29 Sep 2020 06:45:05 -0400 Received: by mail-wr1-f67.google.com with SMTP id k10so4819046wru.6 for <43679@debbugs.gnu.org>; Tue, 29 Sep 2020 03:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=djqWYKtce7hZd0JhSpNqV4zTJ0qwEc5ua4ck8PDIWfA=; b=S/5pDw/h642Nj9PIxbz4zi853tgbAsIBrmON/NnEg/evAvMlK/+wPSXOR2u8/wF/2Q +IwxF35oup4j9lJcMLuJGwxhYxMyqRfpgJ7JTK7een1azMm8LSp3sKzJY7V35bhFTch0 c9SEXJP7yhJZzL1DENDdWgp1N6VmZvMGhzjZCKW/ErAbNn98dSDXJciiVJmUExX2GHOG LRFgTxatO8flUrXSHgaojhbCQ8Nd4Y99WzVYa+K2RADlETHgGs7bV8NeVB9uwymO4voN lNtYQ4X2W2AM1Px+nR/FXOhVjCSymH5ZgHTalD4DP1ExAXznibWU/F12/4vXxHm95tAT /pUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=djqWYKtce7hZd0JhSpNqV4zTJ0qwEc5ua4ck8PDIWfA=; b=hGV0+Sy6TSuz9owccn0Seuim/PQvr4xo5s5zkhf8yL2bVm/CFYPP/hn3LJRY7fENjW 2w0YUsbrOaY+pftbqjigUcGCB5dT2EgVIs0xsiBP/AWfwA1Yh0zDZcq/gknWWy0GWxRm aePWijBw4T8CG+6NXOBYFoZgH+69JKtEvRo2S6TnvyidUehhhSredzd2tu+JBdUGSvXZ J/1rSAZUJjs769XjqK6fjITQyl1GsopL76AOVQKDAQsNAMg/lcUkiJbs6endriIxTRUV AKiHPT5skqChJliqJXiF1epHaUjuZQzyg0ee8dx9q7KwRSBvu70OYjymPEq5jLe5s6vR GUcQ== X-Gm-Message-State: AOAM533I5HrcYHWA+/obqGS4xv06TzDh+92RKA7H9ToKeO7sox5dk2HB WJAf2BHdAU6GLy83stLZXLE= X-Google-Smtp-Source: ABdhPJwo/saJtw1alp5feSo03+h24unnrztZbz9Vf+P5s5qZfY67baPhKGcOAkSYB/Kgx4ATusI0Dg== X-Received: by 2002:adf:ec45:: with SMTP id w5mr3734254wrn.357.1601376297777; Tue, 29 Sep 2020 03:44:57 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id i33sm6035815wri.79.2020.09.29.03.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 03:44:57 -0700 (PDT) From: zimoun In-Reply-To: <20200928195305.30096-1-ludo@gnu.org> References: <20200928195305.30096-1-ludo@gnu.org> Date: Tue, 29 Sep 2020 12:44:55 +0200 Message-ID: <865z7wuajc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.6 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=S/5pDw/h; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: SHa53yKhRMy2 Hi, On Mon, 28 Sep 2020 at 21:53, Ludovic Court=C3=A8s wrote: > From: Ludovic Court=C3=A8s > One thing I wasn=E2=80=99t entirely sure about: =E2=80=98--with-toolchain= =E2=80=99 changes > the toolchain of the specified package, not that of its dependents. > This assumes that the toolchains all follow the same ABI. This is > the case for C, apparently, maybe not for C++. Should it instead > change to toolchain of the package=E2=80=99s dependents as well? > > Something like: > > guix build guile --with-toolchain=3Dguile@3.0.4=3Dclang-toolchain=20 > > generates working code. Really cool! Playing yesterday with the new =E2=80=99package-mapping=E2=80= =99 & co. (checking =E2=80=99package-with-explicit-ocaml=E2=80=99), a kind of new =E2=80=99=E2=80=93with-toolchain=E2=80=99 option was my conclusion. :-) However, =E2=80=99=E2=80=93with-toolchain=E2=80=99 can be misleading since = it is =E2=80=99gnu-build-system=E2=80=99 and C/C++ software specific. I mean, th= e patch #4 adding =E2=80=99build-system-with-toolchain=E2=80=99 contains: --8<---------------cut here---------------start------------->8--- + (define toolchain-packages + ;; These are the GNU toolchain packages pulled in by GNU-BUILD-SYSTEM = and + ;; all the build systems that inherit from it. Keep the list in sync = with + ;; 'standard-packages' in (guix build-system gnu). + '("gcc" "binutils" "libc" "libc:static" "ld-wrapper")) + + (define (lower* . args) + (let ((lowered (apply lower args))) + (bag + (inherit lowered) + (build-inputs + (append (fold alist-delete + (bag-build-inputs lowered) + toolchain-packages) + toolchain))))) --8<---------------cut here---------------end--------------->8--- And for example, it will not remove =E2=80=99default-ocaml=E2=80=99 and =E2=80=99default-findlib=E2=80=99 in the =E2=80=99ocaml-build-system=E2=80= =99. Even if it would be easy to specify the options =E2=80=9C=E2=80=93with-input=3Docaml=3Docaml-variant =E2=80=93with-input=3Dfindlib=3Dfindlib-variant=E2=80=9D. But for the =E2=80=99clojure-build-system=E2=80=99 it is 3 packages. Another example a bit out-of-scope is to rebuild all the Emacs stack using the package =E2=80=99emacs-next=E2=80=99 instead of =E2=80=99emacs=E2= =80=99. The =E2=80=99emacs-build-system=E2=80=99 depends on =E2=80=99emacs-minimal=E2= =80=99 but some packages (see =E2=80=99emacs-magit=E2=80=99) rewrite that using instead =E2=80=99emacs-no= -x=E2=80=99. It could be nice to be able to write: guix build -m manifest.m --with-toolchain=3Demacs-next-toolchain In summary, does it make sense, either: - change the =E2=80=99=E2=80=93with-toolchain=E2=80=99 to =E2=80=99=E2=80= =93with-gcc-toolchain=E2=80=99 or - tweak =E2=80=99build-system-with-toolchain=E2=80=99 to pass =E2=80=99to= olchain-packages=E2=80=99 as parameter somehow and be able to run: =20=20 guix build coq --with-toolchain=3Dcoq=3Docaml-toolchain4.07 =20=20=20=20=20 ?=20=20=20=20=20 > Another issue is that since we use =E2=80=98package-input-rewriting/spec= =E2=80=99, > we can=E2=80=99t change the toolchain of core packages like Guile or Perl > without rebuilding the world. For example, if we omit =E2=80=9C@3.0.4=E2= =80=9D > in the example above, we rebuild a =E2=80=9Cguile=E2=80=9D package deep d= own and > everything that follows (aka. =E2=80=9Cthe world=E2=80=9D). Yeah but that=E2=80=99s maybe what people want: rebuild the world with anot= her toolchain, probably optimized for some specific machine (HPC cluster). > Another option I considered was to graft the package that > =E2=80=98--with-toolchain=E2=80=99 targets instead of rebuilding its depe= ndents. > Again that=E2=80=99d only work if the resulting binaries are ABI-compatib= le, > but maybe that=E2=80=99s a reasonable assumption. It would definitely sa= ve > build time. Should it be grafted, or should there be a separate > option to do that? Thoughts? >From my perspective, it should be another option. For example, I imagine people want to rebuild all the stack with Name-It=C2=A9 compiler. = Or the Name-It=C2=A9 compiler could be not-ABI compatible. All the best, simon