From unknown Sat Jun 21 10:46:46 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#59843] [PATCH] shell: Enable --target for guix shell (--development) Resent-From: Yarl Baudig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Dec 2022 20:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59843 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59843@debbugs.gnu.org Cc: Yarl Baudig X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16702722784894 (code B ref -1); Mon, 05 Dec 2022 20:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Dec 2022 20:31:18 +0000 Received: from localhost ([127.0.0.1]:38230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2I7R-0001Gs-NU for submit@debbugs.gnu.org; Mon, 05 Dec 2022 15:31:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:41966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2I7P-0001Gm-SW for submit@debbugs.gnu.org; Mon, 05 Dec 2022 15:31:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2I7P-0006rN-An for guix-patches@gnu.org; Mon, 05 Dec 2022 15:31:15 -0500 Received: from msg-4.mailo.com ([213.182.54.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2I7N-00030d-15 for guix-patches@gnu.org; Mon, 05 Dec 2022 15:31:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670272268; bh=w+zXkn/ROg8ekXl8E+gZ9p0O0Q7+GHWUoxMZr14dZLU=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding; b=bPcjL+JnohGM0NX9+v3fVjCiuqzf6vG5l9Is6BxO2SVspmt8OSrtcdUB+y1tNrZoT EaAdU9EidmGEEnZ1xWzHm4EVPSdegB9IORpExiz/G27+lBVPvY1N4egxDVzVG1BoUf Qu+hU0VqYoRS8LajMVXR/J7+VcMN8NCRPVQT7rZ4= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 21:31:08 +0100 (CET) X-EA-Auth: hxS2cCCSdcuhrCYgP/q1oabSK0pxHsJEg4YfbQ3N2LyyA1EmRJyI0W2Pai0L1hsh0Sz56B2xpRkKY304uZCfrtY6owrpQ9AeDDFQ6VMXY/k= From: Yarl Baudig Date: Mon, 5 Dec 2022 21:30:51 +0100 Message-Id: <20221205203051.22898-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.15; envelope-from=yarl-baudig@mailoo.org; helo=msg-4.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This enable the use of --target for development inputs, that is: with `guix shell`, includes the dependencies for cross-building packages given with --development * guix/scripts/environment.scm: Enable --target. * guix/scripts/shell.scm: Enable --target. * doc/guix.texi: Document it. --- doc/guix.texi | 5 +++++ guix/scripts/environment.scm | 14 +++++++++++--- guix/scripts/shell.scm | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a79b777826..f1da3a4865 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6176,6 +6176,11 @@ environment. @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}. +@item --target=@var{target} +Attempt to build the environment dependencies (see @option{--development}) +for @var{target}--e.g., @code{aarch64-linux-gnu}. Useful to debug cross-build +failures (@pxref{Debugging Build Failures}). + @item --container @itemx -C @cindex container diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 64597f6e9f..b269be828e 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -127,7 +127,9 @@ (define (show-environment-options-help) (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) (display (G_ " - --bootstrap use bootstrap binaries to build the environment"))) + --bootstrap use bootstrap binaries to build the environment")) + (display (G_ " + --list-targets list available targets"))) (define (show-help) (display (G_ "Usage: guix environment [OPTION]... PACKAGE... [-- COMMAND...] @@ -144,6 +146,10 @@ (define (show-help) --ad-hoc include all specified packages in the environment instead of only their inputs")) + (display (G_ " + --target=TRIPLET cross-build inputs for non-adhoc packages for + TRIPLET--e.g., \"aarch64-linux-gnu\"")) + (show-environment-options-help) (newline) (show-build-options-help) @@ -277,7 +283,8 @@ (define %options (append %transformation-options %standard-build-options - %standard-native-build-options))) + %standard-native-build-options + %standard-cross-build-options))) (define (pick-all alist key) "Return a list of values in ALIST associated with KEY." @@ -332,7 +339,8 @@ (define (packages->outputs packages mode) (('package 'package (? string? spec)) (manifest-entries (package->development-manifest - (transform (specification->package+output spec))))) + (transform (specification->package+output spec)) + #:target (assoc-ref opts 'target)))) (('expression mode str) ;; Add all the outputs of the package STR evaluates to. (packages->outputs (read/eval str) mode)) diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index 2fc1dc942a..b2ae12cec2 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -62,6 +62,9 @@ (define (show-help) (display (G_ " -f, --file=FILE add to the environment the package FILE evaluates to")) + (display (G_ " + --target=TRIPLET cross-build development inputs packages for + TRIPLET--e.g., \"aarch64-linux-gnu\"")) (display (G_ " -q inhibit loading of 'guix.scm' and 'manifest.scm'")) (display (G_ " base-commit: c3713d53e0bdf1186e08880b9e0ae6dd85f55fc4 -- 2.38.1 From unknown Sat Jun 21 10:46:46 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#59843] [PATCH] shell: Enable --target for guix shell (--development) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 11:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59843 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Yarl Baudig Cc: 59843@debbugs.gnu.org Received: via spool by 59843-submit@debbugs.gnu.org id=B59843.167101558131074 (code B ref 59843); Wed, 14 Dec 2022 11:00:02 +0000 Received: (at 59843) by debbugs.gnu.org; 14 Dec 2022 10:59:41 +0000 Received: from localhost ([127.0.0.1]:38306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5PUC-000858-PS for submit@debbugs.gnu.org; Wed, 14 Dec 2022 05:59:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5PUB-000850-JX for 59843@debbugs.gnu.org; Wed, 14 Dec 2022 05:59:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5PU5-0004pV-QD; Wed, 14 Dec 2022 05:59:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=7ZQ7uuG2UTjDk6noOE5t9OMOWbdVJWQOaY6bEB5G1VY=; b=lym+hnrAN9ldObSwcjvi WD9v1tIkZ63gNyAlAHHfbz/1yc/PdOyE5Zw6KfcV7u4hn43Y86kIjdLeJFs3LmRsmJ0PoH0Wr87sC GSO4cDKOlqBOfKz5SSl8CiO6//8NppcgoRS9buuVxRkhTMyQdsvnTS3bJFqRP9G0WZrlAYZJtCXR6 VfjbTUJNQkoJbHw/CZhNKQPR4u6GJkmRgGdmPE4V6hKsUOqCVcDDMj14p5MhLN/bi0lP1niPd12IZ Nrxjy6gvP0M8IRMo2UJtgO+vJqiQdPZdpRt8mmDFXuLraEoHc3m0rKQtFH0Ek6qsoRmZa23F017kq jn2vbZjCKz2VVw==; Received: from eduroam-111172.grenet.fr ([130.190.111.172] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5PU5-0005i8-Du; Wed, 14 Dec 2022 05:59:33 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20221205203051.22898-1-yarl-baudig@mailoo.org> Date: Wed, 14 Dec 2022 11:59:31 +0100 In-Reply-To: <20221205203051.22898-1-yarl-baudig@mailoo.org> (Yarl Baudig's message of "Mon, 5 Dec 2022 21:30:51 +0100") Message-ID: <87o7s6tfn0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Yarl Baudig skribis: > This enable the use of --target for development inputs, that is: > with `guix shell`, includes the dependencies for cross-building packages > given with --development > > * guix/scripts/environment.scm: Enable --target. > * guix/scripts/shell.scm: Enable --target. > * doc/guix.texi: Document it. This change won=E2=80=99t give something useful per se, because the environ= ment will contain a mixture of =E2=80=9Chost=E2=80=9D and =E2=80=9Cbuild=E2=80= =9D inputs. To make it work, we need two profiles: one for =E2=80=9Cbuild=E2=80=9D inpu= ts, and one for =E2=80=9Chost/target=E2=80=9D inputs. Search path environment variable= s must be evaluated in a way that accounts for these two profiles. For example, target libraries will appear on CROSS_C_INCLUDE_PATH but not on C_INCLUDE_PATH. Does that make sense? IOW, it=E2=80=99s a trickier endeavor that one could hope for. :-) Thanks, Ludo=E2=80=99. From unknown Sat Jun 21 10:46:46 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#59843] [PATCH] shell: Enable --target for guix shell (--development) References: <20221205203051.22898-1-yarl-baudig@mailoo.org> Resent-From: "yarl baudig" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59843 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org Cc: 59843@debbugs.gnu.org Received: via spool by 59843-submit@debbugs.gnu.org id=B59843.167103523718807 (code B ref 59843); Wed, 14 Dec 2022 16:28:01 +0000 Received: (at 59843) by debbugs.gnu.org; 14 Dec 2022 16:27:17 +0000 Received: from localhost ([127.0.0.1]:40185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5UbE-0004tH-Ue for submit@debbugs.gnu.org; Wed, 14 Dec 2022 11:27:17 -0500 Received: from msg-1.mailo.com ([213.182.54.11]:37052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5UbD-0004tB-17 for 59843@debbugs.gnu.org; Wed, 14 Dec 2022 11:27:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1671035214; bh=iwTYe2jKtLQ0QLbA5ltUPJItxnOoxMKlO55PJgvyWXs=; h=X-EA-Auth:From:To:Cc:Date:Subject:MIME-Version:X-Mailer: Message-ID:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=GCf4i8aO9WWWIemZndyG0L7Yv5JJlUrIIaEdrCiwqGrwLqu9qpU3NsfUPH+btB+Rl 6QPSNzP3UiHnWbBEuLu7htP4+PGzriSSgvI9esNw+sZqmwWaj9UHQ3PPOX6YE8UJ6o 9eAv7j6vKBqzhZL5LzQGV3eMdpKYvEBFYUMvfjzs= Received: by www.mailo.com with http webmail; Wed, 14 Dec 2022 17:26:54 +0100 (CET) X-EA-Auth: M/1ZcWS+ZsBbLkXjQ14SijpnQcuIcJ2q87G3XxdvRKMt5BbdDkKz6Ntrd7SYPsmUtgzS1HnhY8jf+s9s1WK8SR8GJbCqIe+1 From: "yarl baudig" Date: Wed, 14 Dec 2022 17:26:54 +0100 (CET) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA22.05/r20221103 Message-ID: In-Reply-To: <87o7s6tfn0.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >=20 > This change won=E2=80=99t give something useful per se, because the envi= ronment > will contain a mixture of =E2=80=9Chost=E2=80=9D and =E2=80=9Cbuild=E2= =80=9D inputs. >=20 > To make it work, we need two profiles: one for =E2=80=9Cbuild=E2=80=9D i= nputs, and one > for =E2=80=9Chost/target=E2=80=9D inputs. Search path environment varia= bles must be > evaluated in a way that accounts for these two profiles. For example, > target libraries will appear on CROSS_C_INCLUDE_PATH but not on > C_INCLUDE_PATH. >=20 > Does that make sense? >=20 > IOW, it=E2=80=99s a trickier endeavor that one could hope for. :-) >=20 > Thanks, > Ludo=E2=80=99. >=20 Obviously, you know a lot more about this than I do. However (please corre= ct me, I probably did not completely understand your point) I think it is u= seful and works for the goal I mentioned in the part of the patch concernin= g the manual. It can help debugging failing (cross-)builds because you sour= ce "environment-variables" and that's the reason why I sent this patch. I t= ried it with texinfo (because the cross-compilation fails and I want to fix= it) and it seem to work (i.e. you have access to paths in CROSS_C_INCLUDE_= PATH, for example). Maybe I missed something and you saw that "debugging cr= oss-builds" is my intent. Please do tell. I take avantage of having reached you to mention https://issues.guix.gnu.o= rg/59839 I was working on this in parallel and I may have made things confu= sing because (in 59839) that's --system I am talking about (see the last ve= rsion, number 3, of the patch please)... Thank you a lot. From unknown Sat Jun 21 10:46:46 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#59843] [PATCH] shell: Enable --target for guix shell (--development) References: <20221205203051.22898-1-yarl-baudig@mailoo.org> Resent-From: "yarl baudig" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 20:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59843 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org Cc: 59843@debbugs.gnu.org Received: via spool by 59843-submit@debbugs.gnu.org id=B59843.167105147516686 (code B ref 59843); Wed, 14 Dec 2022 20:58:01 +0000 Received: (at 59843) by debbugs.gnu.org; 14 Dec 2022 20:57:55 +0000 Received: from localhost ([127.0.0.1]:41833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Yp8-0004L4-Vb for submit@debbugs.gnu.org; Wed, 14 Dec 2022 15:57:55 -0500 Received: from msg-1.mailo.com ([213.182.54.11]:53916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Yp7-0004Ky-5S for 59843@debbugs.gnu.org; Wed, 14 Dec 2022 15:57:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1671051457; bh=6UkktLzgaZvChGShgSIloNcxEkGh+36lMrEUNbrSMUM=; h=X-EA-Auth:From:To:Cc:Date:Subject:MIME-Version:X-Mailer: Message-ID:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ir+PkzktmEsjHA80b+V05/hwzl/f0x1zuKYn3GFGGSydCj5CjVz5tyK0sQ1N3V8ZD Fykjt9fFlz/RhA0wo6I1z00UO3S+Zq711cryS+ecx5BMRkfxlTiTgVctChTZZ1akiE orCgpznFNBS/8AqWZVj4y+O9eL8puA7fQz+UF3ns= Received: by www.mailo.com with http webmail; Wed, 14 Dec 2022 21:57:37 +0100 (CET) X-EA-Auth: CESoipilcqZdqgYer+4HzRj80qu3Wn9z2hIQ041f/xoPScQI2Z9BBdLMUcd4dM8MWDIZIz/iR7GxSw7fS4tQ21SOimPDcTzS From: "yarl baudig" Date: Wed, 14 Dec 2022 21:57:37 +0100 (CET) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA22.05/r20221103 Message-ID: In-Reply-To: <87o7s6tfn0.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I responded too fast. You are right, something is wrong. Not every path is = accessible. I will try to understand when I'll have some time. ---- Message d'origine ---- > De : Ludovic Court=C3=A8s > =C3=80 : Yarl Baudig > Sujet : Re: bug#59843: [PATCH] shell: Enable --target for guix shell (--= development) > Date : 14/12/2022 11:59:31 Europe/Paris > Copie =C3=A0 : 59843@debbugs.gnu.org >=20 > Hi, >=20 > Yarl Baudig skribis: >=20 > > This enable the use of --target for development inputs, that is: > > with `guix shell`, includes the dependencies for cross-building packag= es > > given with --development > > > > * guix/scripts/environment.scm: Enable --target. > > * guix/scripts/shell.scm: Enable --target. > > * doc/guix.texi: Document it. >=20 > This change won=E2=80=99t give something useful per se, because the envi= ronment > will contain a mixture of =E2=80=9Chost=E2=80=9D and =E2=80=9Cbuild=E2= =80=9D inputs. >=20 > To make it work, we need two profiles: one for =E2=80=9Cbuild=E2=80=9D i= nputs, and one > for =E2=80=9Chost/target=E2=80=9D inputs. Search path environment varia= bles must be > evaluated in a way that accounts for these two profiles. For example, > target libraries will appear on CROSS_C_INCLUDE_PATH but not on > C_INCLUDE_PATH. >=20 > Does that make sense? >=20 > IOW, it=E2=80=99s a trickier endeavor that one could hope for. :-) >=20 > Thanks, > Ludo=E2=80=99. > From unknown Sat Jun 21 10:46:46 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Yarl Baudig Subject: bug#59843: closed (Re: bug#59843: [PATCH] shell: Enable --target for guix shell (--development)) Message-ID: References: <87mt7g50vv.fsf_-_@gnu.org> <20221205203051.22898-1-yarl-baudig@mailoo.org> X-Gnu-PR-Message: they-closed 59843 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 59843@debbugs.gnu.org Date: Wed, 21 Dec 2022 13:43:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1671630182-14930-1" This is a multi-part message in MIME format... ------------=_1671630182-14930-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #59843: [PATCH] shell: Enable --target for guix shell (--development) which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 59843@debbugs.gnu.org. --=20 59843: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59843 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1671630182-14930-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 59843-done) by debbugs.gnu.org; 21 Dec 2022 13:42:40 +0000 Received: from localhost ([127.0.0.1]:51984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7zMl-0003sb-Pt for submit@debbugs.gnu.org; Wed, 21 Dec 2022 08:42:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7zMk-0003sV-4X for 59843-done@debbugs.gnu.org; Wed, 21 Dec 2022 08:42:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7zMe-0002hj-NM; Wed, 21 Dec 2022 08:42:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=74YGdac2/BgdiOIb5qDp5p6RvkjN21FaIlFjNesldxg=; b=VcVWSk6qc9DHB3ieWq/3 +lmb/UkkNyG14OvYYhJnZ1HbVY//Ty4JeBxDRqCukxv176zrb8G3PEjZzbX6ppcqAzWVgLTWSfCe2 Fu8kYpERxJevQSnpn69i+TaoJqmP3SUArc1xksLcOJbjhTp//pqHHaEB6yVpdWI8kb/7Q8mWeRNrF QNHE9f2g3ax28dXyxszRog4ITfloaaglkQdiT9b7ltiV7xyVbO2JF1nEkC/+yQ1eCGVjGSQvFbs9m BpwaTrAxsuoRC2cxO1uiGM3+fZl4i+MiL2vdwLH+a1cjXlJawHsTY8j5nA/rsOYC2wEjM72Shh3fN vEbmKksvW6rz6w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7zMb-0000i8-Qe; Wed, 21 Dec 2022 08:42:30 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "yarl baudig" Subject: Re: bug#59843: [PATCH] shell: Enable --target for guix shell (--development) References: <20221205203051.22898-1-yarl-baudig@mailoo.org> Date: Wed, 21 Dec 2022 14:42:28 +0100 In-Reply-To: (yarl baudig's message of "Wed, 14 Dec 2022 21:57:37 +0100 (CET)") Message-ID: <87mt7g50vv.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59843-done Cc: 59843-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, "yarl baudig" skribis: > I responded too fast. You are right, something is wrong. Not every path i= s accessible. I will try to understand when I'll have some time. Alright! I=E2=80=99m closing this bug for now, but do get in touch on IRC = or guix-devel if you=E2=80=99d like to discuss it. Thanks, Ludo=E2=80=99. ------------=_1671630182-14930-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Dec 2022 20:31:18 +0000 Received: from localhost ([127.0.0.1]:38230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2I7R-0001Gs-NU for submit@debbugs.gnu.org; Mon, 05 Dec 2022 15:31:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:41966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2I7P-0001Gm-SW for submit@debbugs.gnu.org; Mon, 05 Dec 2022 15:31:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2I7P-0006rN-An for guix-patches@gnu.org; Mon, 05 Dec 2022 15:31:15 -0500 Received: from msg-4.mailo.com ([213.182.54.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2I7N-00030d-15 for guix-patches@gnu.org; Mon, 05 Dec 2022 15:31:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1670272268; bh=w+zXkn/ROg8ekXl8E+gZ9p0O0Q7+GHWUoxMZr14dZLU=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding; b=bPcjL+JnohGM0NX9+v3fVjCiuqzf6vG5l9Is6BxO2SVspmt8OSrtcdUB+y1tNrZoT EaAdU9EidmGEEnZ1xWzHm4EVPSdegB9IORpExiz/G27+lBVPvY1N4egxDVzVG1BoUf Qu+hU0VqYoRS8LajMVXR/J7+VcMN8NCRPVQT7rZ4= Received: by b-3.in.mailobj.net [192.168.90.13] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 5 Dec 2022 21:31:08 +0100 (CET) X-EA-Auth: hxS2cCCSdcuhrCYgP/q1oabSK0pxHsJEg4YfbQ3N2LyyA1EmRJyI0W2Pai0L1hsh0Sz56B2xpRkKY304uZCfrtY6owrpQ9AeDDFQ6VMXY/k= From: Yarl Baudig To: guix-patches@gnu.org Subject: [PATCH] shell: Enable --target for guix shell (--development) Date: Mon, 5 Dec 2022 21:30:51 +0100 Message-Id: <20221205203051.22898-1-yarl-baudig@mailoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=213.182.54.15; envelope-from=yarl-baudig@mailoo.org; helo=msg-4.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Yarl Baudig X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This enable the use of --target for development inputs, that is: with `guix shell`, includes the dependencies for cross-building packages given with --development * guix/scripts/environment.scm: Enable --target. * guix/scripts/shell.scm: Enable --target. * doc/guix.texi: Document it. --- doc/guix.texi | 5 +++++ guix/scripts/environment.scm | 14 +++++++++++--- guix/scripts/shell.scm | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a79b777826..f1da3a4865 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6176,6 +6176,11 @@ environment. @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}. +@item --target=@var{target} +Attempt to build the environment dependencies (see @option{--development}) +for @var{target}--e.g., @code{aarch64-linux-gnu}. Useful to debug cross-build +failures (@pxref{Debugging Build Failures}). + @item --container @itemx -C @cindex container diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 64597f6e9f..b269be828e 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -127,7 +127,9 @@ (define (show-environment-options-help) (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) (display (G_ " - --bootstrap use bootstrap binaries to build the environment"))) + --bootstrap use bootstrap binaries to build the environment")) + (display (G_ " + --list-targets list available targets"))) (define (show-help) (display (G_ "Usage: guix environment [OPTION]... PACKAGE... [-- COMMAND...] @@ -144,6 +146,10 @@ (define (show-help) --ad-hoc include all specified packages in the environment instead of only their inputs")) + (display (G_ " + --target=TRIPLET cross-build inputs for non-adhoc packages for + TRIPLET--e.g., \"aarch64-linux-gnu\"")) + (show-environment-options-help) (newline) (show-build-options-help) @@ -277,7 +283,8 @@ (define %options (append %transformation-options %standard-build-options - %standard-native-build-options))) + %standard-native-build-options + %standard-cross-build-options))) (define (pick-all alist key) "Return a list of values in ALIST associated with KEY." @@ -332,7 +339,8 @@ (define (packages->outputs packages mode) (('package 'package (? string? spec)) (manifest-entries (package->development-manifest - (transform (specification->package+output spec))))) + (transform (specification->package+output spec)) + #:target (assoc-ref opts 'target)))) (('expression mode str) ;; Add all the outputs of the package STR evaluates to. (packages->outputs (read/eval str) mode)) diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index 2fc1dc942a..b2ae12cec2 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -62,6 +62,9 @@ (define (show-help) (display (G_ " -f, --file=FILE add to the environment the package FILE evaluates to")) + (display (G_ " + --target=TRIPLET cross-build development inputs packages for + TRIPLET--e.g., \"aarch64-linux-gnu\"")) (display (G_ " -q inhibit loading of 'guix.scm' and 'manifest.scm'")) (display (G_ " base-commit: c3713d53e0bdf1186e08880b9e0ae6dd85f55fc4 -- 2.38.1 ------------=_1671630182-14930-1--