From unknown Sat Jun 14 03:47:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46725 <46725@debbugs.gnu.org> To: bug#46725 <46725@debbugs.gnu.org> Subject: Status: [PATCH] gnu: guile-lib: Fix cross compilation. Reply-To: bug#46725 <46725@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:47:18 +0000 retitle 46725 [PATCH] gnu: guile-lib: Fix cross compilation. reassign 46725 guix-patches submitter 46725 Christopher Baines severity 46725 normal tag 46725 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 23 15:08:29 2021 Received: (at submit) by debbugs.gnu.org; 23 Feb 2021 20:08:29 +0000 Received: from localhost ([127.0.0.1]:60615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEdyu-000598-Ms for submit@debbugs.gnu.org; Tue, 23 Feb 2021 15:08:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:49884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEdyp-00058x-1M for submit@debbugs.gnu.org; Tue, 23 Feb 2021 15:08:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEdyf-0000tG-S1 for guix-patches@gnu.org; Tue, 23 Feb 2021 15:08:14 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:42835) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEdyS-0002Yx-9z for guix-patches@gnu.org; Tue, 23 Feb 2021 15:08:12 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id AE48327BC4A for ; Tue, 23 Feb 2021 20:07:55 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 94372b90 for ; Tue, 23 Feb 2021 20:07:55 +0000 (UTC) From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH] gnu: guile-lib: Fix cross compilation. Date: Tue, 23 Feb 2021 20:07:55 +0000 Message-Id: <20210223200755.29532-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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 (--) These changes were sent upstream as https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html Without this change, the .go files are built for the host architecture, rather than the target. I noticed this when cross building the guix-build-coordinator (for which guile-lib is an input) to the Hurd. * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add 'patch-for-cross-compilation phase. [native-inputs]: Add autoconf, automake and gettext. --- gnu/packages/guile-xyz.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index ce5aad8ec7..e9dfc6cc8d 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2194,6 +2194,20 @@ library.") '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-for-cross-compilation + (lambda _ + (substitute* "configure.ac" + (("GUILE_FLAGS") + "GUILE_FLAGS +if test \"$cross_compiling\" != no; then + GUILE_TARGET=\"--target=$host_alias\" + AC_SUBST([GUILE_TARGET]) +fi +")) + (substitute* "am/guile.mk" + (("guild compile") "guild compile $(GUILE_TARGET)")) + (invoke "autoreconf" "-vif") + #t)) (add-before 'configure 'patch-module-dir (lambda _ (substitute* "src/Makefile.in" @@ -2204,7 +2218,10 @@ library.") $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) #t))))) (native-inputs - `(("guile" ,guile-3.0) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gettext-minimal) + ("guile" ,guile-3.0) ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-3.0))) -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 24 02:58:38 2021 Received: (at 46725) by debbugs.gnu.org; 24 Feb 2021 07:58:38 +0000 Received: from localhost ([127.0.0.1]:33210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEp46-00082E-OW for submit@debbugs.gnu.org; Wed, 24 Feb 2021 02:58:38 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:52271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEp42-000820-0G for 46725@debbugs.gnu.org; Wed, 24 Feb 2021 02:58:33 -0500 Received: from nijino.local (217-149-164-20.nat.highway.telekom.at [217.149.164.20]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4DlpFY5Gyxz1LLyW; Wed, 24 Feb 2021 08:58:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4DlpFY5Gyxz1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1614153505; bh=vE5AVRBXhlUYPdexsnqd9SrH6PA+N9KVWuPqNwq5yQY=; h=Subject:From:To:Date:In-Reply-To:References:From; b=M4hsXdOVJ0QZLr0lK9XogcGmfoaFzI+ZcWKDRIX86gbFn8kcAbAegZ6Wvd8naF59a +s8BkWTY/g7pubvADQOZeTuE8izRRPAzoAxZyDyw7G037RrVVd8ooE8QLeI4xoHMAz R/z+Vcts0YEzf4NBotteLnfz6a/vo6peI92GcS4o= Message-ID: Subject: Re: [bug#46725] [PATCH] gnu: guile-lib: Fix cross compilation. From: Leo Prikler To: Christopher Baines , 46725@debbugs.gnu.org Date: Wed, 24 Feb 2021 08:58:24 +0100 In-Reply-To: <20210223200755.29532-1-mail@cbaines.net> References: <20210223200755.29532-1-mail@cbaines.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46725 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 (-) Hello, Am Dienstag, den 23.02.2021, 20:07 +0000 schrieb Christopher Baines: > These changes were sent upstream as > https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html > > Without this change, the .go files are built for the host > architecture, rather > than the target. I noticed this when cross building the > guix-build-coordinator (for which guile-lib is an input) to the Hurd. > > * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add > 'patch-for-cross-compilation phase. > [native-inputs]: Add autoconf, automake and gettext. > --- > gnu/packages/guile-xyz.scm | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm > index ce5aad8ec7..e9dfc6cc8d 100644 > --- a/gnu/packages/guile-xyz.scm > +++ b/gnu/packages/guile-xyz.scm > @@ -2194,6 +2194,20 @@ library.") > '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors > #:phases > (modify-phases %standard-phases > + (add-after 'unpack 'patch-for-cross-compilation > + (lambda _ > + (substitute* "configure.ac" > + (("GUILE_FLAGS") > + "GUILE_FLAGS > +if test \"$cross_compiling\" != no; then > + GUILE_TARGET=\"--target=$host_alias\" > + AC_SUBST([GUILE_TARGET]) > +fi > +")) > + (substitute* "am/guile.mk" > + (("guild compile") "guild compile $(GUILE_TARGET)")) > + (invoke "autoreconf" "-vif") Invoking autoreconf seems a bit overkill for a "patch-" phase. Wouldn't it be regenerated in bootstrap if you (delete-file "configure")? > + #t)) > (add-before 'configure 'patch-module-dir > (lambda _ > (substitute* "src/Makefile.in" > @@ -2204,7 +2218,10 @@ library.") > $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) > #t))))) > (native-inputs > - `(("guile" ,guile-3.0) > + `(("autoconf" ,autoconf) > + ("automake" ,automake) > + ("gettext" ,gettext-minimal) > + ("guile" ,guile-3.0) > ("pkg-config" ,pkg-config))) > (inputs > `(("guile" ,guile-3.0))) Otherwise LGTM, but I haven't checked cross-compiling. From your message I'll assume you did. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 24 03:37:17 2021 Received: (at 46725) by debbugs.gnu.org; 24 Feb 2021 08:37:17 +0000 Received: from localhost ([127.0.0.1]:33257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEpfY-0000ZY-EV for submit@debbugs.gnu.org; Wed, 24 Feb 2021 03:37:17 -0500 Received: from mira.cbaines.net ([212.71.252.8]:37736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEpfT-0000ZJ-SM for 46725@debbugs.gnu.org; Wed, 24 Feb 2021 03:37:15 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id C45DC27BC4A for <46725@debbugs.gnu.org>; Wed, 24 Feb 2021 08:37:10 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 457b148e for <46725@debbugs.gnu.org>; Wed, 24 Feb 2021 08:37:09 +0000 (UTC) From: Christopher Baines To: 46725@debbugs.gnu.org Subject: [PATCH] gnu: guile-lib: Fix cross compilation. Date: Wed, 24 Feb 2021 08:37:09 +0000 Message-Id: <20210224083709.9342-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46725 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 (-) These changes were sent upstream as https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html Without this change, the .go files are built for the host architecture, rather than the target. I noticed this when cross building the guix-build-coordinator (for which guile-lib is an input) to the Hurd. * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add 'patch-for-cross-compilation phase. [native-inputs]: Add autoconf, automake and gettext. (guile2.0-lib): Adjust to use alist-replace. (guile2.2-lib): Adjust to use alist-replace. --- gnu/packages/guile-xyz.scm | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index ce5aad8ec7..07f81bcc1b 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -116,6 +116,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system guile) #:use-module (guix utils) + #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (ice-9 match) #:use-module ((srfi srfi-1) #:select (alist-delete))) @@ -2194,6 +2195,21 @@ library.") '("GUILE_AUTO_COMPILE=0") ; to prevent guild errors #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-for-cross-compilation + (lambda _ + (substitute* "configure.ac" + (("GUILE_FLAGS") + "GUILE_FLAGS +if test \"$cross_compiling\" != no; then + GUILE_TARGET=\"--target=$host_alias\" + AC_SUBST([GUILE_TARGET]) +fi +")) + (substitute* "am/guile.mk" + (("guild compile") "guild compile $(GUILE_TARGET)")) + (delete-file "configure") ; trigger the bootstrap phase to run + ; autoreconf + #t)) (add-before 'configure 'patch-module-dir (lambda _ (substitute* "src/Makefile.in" @@ -2204,7 +2220,10 @@ library.") $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) #t))))) (native-inputs - `(("guile" ,guile-3.0) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("gettext" ,gettext-minimal) + ("guile" ,guile-3.0) ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-3.0))) @@ -2225,15 +2244,23 @@ for Guile\".") (package (inherit guile-lib) (name "guile2.0-lib") - (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.0))))) + (native-inputs + (alist-replace "guile" (list guile-2.0) + (package-native-inputs guile-lib))) + (inputs + (alist-replace "guile" (list guile-2.0) + (package-inputs guile-lib))))) (define-public guile2.2-lib (package (inherit guile-lib) (name "guile2.2-lib") - (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.2))))) + (native-inputs + (alist-replace "guile" (list guile-2.2) + (package-native-inputs guile-lib))) + (inputs + (alist-replace "guile" (list guile-2.2) + (package-inputs guile-lib))))) (define-public guile3.0-lib (deprecated-package "guile3.0-lib" guile-lib)) -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 24 03:45:54 2021 Received: (at 46725) by debbugs.gnu.org; 24 Feb 2021 08:45:54 +0000 Received: from localhost ([127.0.0.1]:33265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEpnq-0000np-LF for submit@debbugs.gnu.org; Wed, 24 Feb 2021 03:45:54 -0500 Received: from mira.cbaines.net ([212.71.252.8]:37962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lEpnp-0000nh-2l for 46725@debbugs.gnu.org; Wed, 24 Feb 2021 03:45:49 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 9216C27BC4A; Wed, 24 Feb 2021 08:45:48 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bf560a0f; Wed, 24 Feb 2021 08:45:48 +0000 (UTC) References: <20210223200755.29532-1-mail@cbaines.net> User-agent: mu4e 1.4.14; emacs 27.1 From: Christopher Baines To: Leo Prikler Subject: Re: [bug#46725] [PATCH] gnu: guile-lib: Fix cross compilation. In-reply-to: Date: Wed, 24 Feb 2021 08:45:48 +0000 Message-ID: <87czwplupv.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46725 Cc: 46725@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: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Leo Prikler writes: > Am Dienstag, den 23.02.2021, 20:07 +0000 schrieb Christopher Baines: >> These changes were sent upstream as >> https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html >>=20 >> Without this change, the .go files are built for the host >> architecture, rather >> than the target. I noticed this when cross building the >> guix-build-coordinator (for which guile-lib is an input) to the Hurd. >>=20 >> * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add >> 'patch-for-cross-compilation phase. >> [native-inputs]: Add autoconf, automake and gettext. >> --- >> gnu/packages/guile-xyz.scm | 19 ++++++++++++++++++- >> 1 file changed, 18 insertions(+), 1 deletion(-) >>=20 >> diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm >> index ce5aad8ec7..e9dfc6cc8d 100644 >> --- a/gnu/packages/guile-xyz.scm >> +++ b/gnu/packages/guile-xyz.scm >> @@ -2194,6 +2194,20 @@ library.") >> '("GUILE_AUTO_COMPILE=3D0") ; to prevent guild errors >> #:phases >> (modify-phases %standard-phases >> + (add-after 'unpack 'patch-for-cross-compilation >> + (lambda _ >> + (substitute* "configure.ac" >> + (("GUILE_FLAGS") >> + "GUILE_FLAGS >> +if test \"$cross_compiling\" !=3D no; then >> + GUILE_TARGET=3D\"--target=3D$host_alias\" >> + AC_SUBST([GUILE_TARGET]) >> +fi >> +")) >> + (substitute* "am/guile.mk" >> + (("guild compile") "guild compile $(GUILE_TARGET)")) >> + (invoke "autoreconf" "-vif") > > Invoking autoreconf seems a bit overkill for a "patch-" > phase. Wouldn't it be regenerated in bootstrap if you (delete-file > "configure")? Yeah, this works as well. I've changed this phase to delete the configure file instead. >> + #t)) >> (add-before 'configure 'patch-module-dir >> (lambda _ >> (substitute* "src/Makefile.in" >> @@ -2204,7 +2218,10 @@ library.") >> $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) >> #t))))) >> (native-inputs >> - `(("guile" ,guile-3.0) >> + `(("autoconf" ,autoconf) >> + ("automake" ,automake) >> + ("gettext" ,gettext-minimal) >> + ("guile" ,guile-3.0) >> ("pkg-config" ,pkg-config))) >> (inputs >> `(("guile" ,guile-3.0))) > > Otherwise LGTM, but I haven't checked cross-compiling. From your > message I'll assume you did. Turns out I broke guile2.0-lib and guile2.2-lib, so I've sent another patch which fixes that. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmA2EjxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xd9kw//W39lz1VavsgfbgwDJjo+kvCVJaRoQFIc LAUwb9qo0WeBymz4dii67jCk6Xmm+6TjbBVQzv6p8oace5us6dcLlB0RFG6AgV+u d26KFh5OpOggDGlksH4jPDFpHSVli/km/oolHss4MX2YhTPHD9yy8C3sS+NK6/9e KHFvZBktVFSQzucgbhYJxrEhkf7cDXVi+R97GwyKG8HBbUGrOuyg+TzjEd3Rxm4S FxvHABBWMwoi5yk8zJHnmgifcJKpK7+4ePW7LJREGOyKXWHq2qnZi7p4ekPvoobG 079kafkxhd9zjpiELWf66GGFpDfsJab5LiiSmotdekWyQV5+bUI0UQ91SJQqVurI d4Xru4RbDenUoIFP95oH+zEU389wmvNOXkC84psINFXk+KIB81WxnY4CJ0IXrps/ kdtuQD563Z5KEWPzJEWdp3OxBHphf5n1zzoSLpkl9SLXBJV+x64Dbb9uzQZU8hPO TuNlQQ0o450a3IGu+SFgb4jf5g0c+JgYIOa8UHi/vb1NkR8bOHg2LyKUY584RuCZ xZQFMMVwX9JgjV133O3oLJ/+bIOhf2kIHRUWpPLq0TbURa7lBeGgWuXRvscuVwka zZJMkEZOKtWcbnveqVS28N/WtfDp52H55EoxqyXHTBrBiaE7TwqaKcB6F5quTtc9 OTj+Mbjaxlw= =0ICu -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 14:20:58 2021 Received: (at 46725) by debbugs.gnu.org; 2 Mar 2021 19:20:58 +0000 Received: from localhost ([127.0.0.1]:54187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAZm-0002er-4n for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:20:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAZh-0002ea-7P for 46725@debbugs.gnu.org; Tue, 02 Mar 2021 14:20:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46248) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHAZb-00038L-4H; Tue, 02 Mar 2021 14:20:47 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59424 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lHAZa-0007LT-KR; Tue, 02 Mar 2021 14:20:46 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. References: <20210223200755.29532-1-mail@cbaines.net> <20210224083709.9342-1-mail@cbaines.net> Date: Tue, 02 Mar 2021 20:20:44 +0100 In-Reply-To: <20210224083709.9342-1-mail@cbaines.net> (Christopher Baines's message of "Wed, 24 Feb 2021 08:37:09 +0000") Message-ID: <87v9a9uzub.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46725 Cc: 46725@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: -1.7 (-) Hi! Christopher Baines skribis: > These changes were sent upstream as > https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html > > Without this change, the .go files are built for the host architecture, r= ather > than the target. I noticed this when cross building the > guix-build-coordinator (for which guile-lib is an input) to the Hurd. > > * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add > 'patch-for-cross-compilation phase. > [native-inputs]: Add autoconf, automake and gettext. > (guile2.0-lib): Adjust to use alist-replace. > (guile2.2-lib): Adjust to use alist-replace. [...] > + (substitute* "configure.ac" > + (("GUILE_FLAGS") > + "GUILE_FLAGS > +if test \"$cross_compiling\" !=3D no; then > + GUILE_TARGET=3D\"--target=3D$host_alias\" > + AC_SUBST([GUILE_TARGET]) > +fi You could even set =E2=80=98GUILE_TARGET=E2=80=99 unconditionally. Otherwise LGTM. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 04 08:17:02 2021 Received: (at 46725) by debbugs.gnu.org; 4 Mar 2021 13:17:02 +0000 Received: from localhost ([127.0.0.1]:58095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHnqg-0001yO-5K for submit@debbugs.gnu.org; Thu, 04 Mar 2021 08:17:02 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:40493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHnqa-0001pL-J5 for 46725@debbugs.gnu.org; Thu, 04 Mar 2021 08:17:00 -0500 Received: by mail-qv1-f53.google.com with SMTP id x13so7543531qvj.7 for <46725@debbugs.gnu.org>; Thu, 04 Mar 2021 05:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=4qflj3N4fNPWo53AZmoGiCpsgpYouCfGWuBcvxR6D7Q=; b=u6lGyyA13WDR/univuxnC2DAukT4c3sfONoSuv3vEuiRX9QDTkJQrGNdnx09UH2pwe 4oGtiBdR8SaQUSHtIvz84qYgDEqGqOCJZA/5nmiucNkZ/v1/7WZjurcH4nf7lYctUrbl OOxWceXyZvuQOzD+yi28J3DJeFSDbZPgwg3s0OmUrX5ak+x0HSlhVKBtOSvo7KjSeVRI t00dj3VCS2QNV6U+HolQygvsB35Pqna7WLeKPzU0MUaFWcfgoz+mD/Z19zVipf7jId0G CVa6aQm3DeV3Fi+0L7wJAM6ply3Em0rnIyQIvZk97PnHN6K4LiQ51k6fyx7xoSKP6th9 vvaw== 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:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=4qflj3N4fNPWo53AZmoGiCpsgpYouCfGWuBcvxR6D7Q=; b=YEegTREde+RHbgGgC9mTpZFFZYg9ESUft4uxwbM4yG06/y8PtV/mX3Yf26R9ydmP3K KX8Zg7ydzQ53ZZF1JhQK8CuRddvNYbQex2XocP2+WDB0txVKTkaQd73mEjEGJjfpNpGS jAI3D8EK9McJsdOUFNRkksKueCHpgpaf0EoKzHz+bHUhfEl+1QEXuCZN460YvWA3ksP9 vJsn0iv+HDfQ0BkLws70VhwTDrvXl+lt1z37J/iqFZfJ2zMUT5gPPVRkxNW32IrRnOis QNbc2Xycp+0JnsU7EBhHBUSmvOQG+7I9WgPuh+sUxC74ZSH/vP62t8Ix27EdCo6n+9ii 3YgA== X-Gm-Message-State: AOAM533NgHRjfoAW+e+Fz/hvqdXQXvcp6OE/htG3z+rlWiOtgSzUtm7J dr/517Nlr3NdhtxsgxU0IlY1mT+5ny0H1Q== X-Google-Smtp-Source: ABdhPJxGFdEnq9+p66MwDeIzawtvgoupMdabO6x07PKAd4U0PoIiffjxLS0bhHRSCZUvpngAkXxduQ== X-Received: by 2002:a0c:83a4:: with SMTP id k33mr3827677qva.1.1614863810888; Thu, 04 Mar 2021 05:16:50 -0800 (PST) Received: from hurd (dsl-10-132-106.b2b2c.ca. [72.10.132.106]) by smtp.gmail.com with ESMTPSA id l6sm9415659qke.34.2021.03.04.05.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 05:16:50 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. References: <20210223200755.29532-1-mail@cbaines.net> <20210224083709.9342-1-mail@cbaines.net> <87v9a9uzub.fsf_-_@gnu.org> Date: Thu, 04 Mar 2021 08:16:49 -0500 In-Reply-To: <87v9a9uzub.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 02 Mar 2021 20:20:44 +0100") Message-ID: <87zgzjoy7y.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46725 Cc: 46725@debbugs.gnu.org, Christopher Baines 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 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi! > > Christopher Baines skribis: > >> These changes were sent upstream as >> https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html >> >> Without this change, the .go files are built for the host architecture, = rather >> than the target. I noticed this when cross building the >> guix-build-coordinator (for which guile-lib is an input) to the Hurd. >> >> * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add >> 'patch-for-cross-compilation phase. >> [native-inputs]: Add autoconf, automake and gettext. >> (guile2.0-lib): Adjust to use alist-replace. >> (guile2.2-lib): Adjust to use alist-replace. > > [...] > >> + (substitute* "configure.ac" >> + (("GUILE_FLAGS") >> + "GUILE_FLAGS >> +if test \"$cross_compiling\" !=3D no; then >> + GUILE_TARGET=3D\"--target=3D$host_alias\" >> + AC_SUBST([GUILE_TARGET]) >> +fi > > You could even set =E2=80=98GUILE_TARGET=E2=80=99 unconditionally. It seems a conditional is needed, because info '(autoconf)Canonicalizing' says: The variables =E2=80=98build_alias=E2=80=99, =E2=80=98host_alias=E2=80= =99, and =E2=80=98target_alias=E2=80=99 are always exactly the arguments of =E2=80=98--build=E2=80=99, =E2=80=98--h= ost=E2=80=99, and =E2=80=98--target=E2=80=99; in particular, they are left empty if the user did not use them, even if the corresponding =E2=80=98AC_CANONICAL=E2=80=99 macro was run. I.e. without the condition '--target=3D' could be passed to guild, which probably wouldn't work. But in another part of the autoconf manual (Hosts and Cross-Compilation), it says: The relationship between build, host, and target have been cleaned up: the chain of default is now simply: target defaults to host, host to build, and build to the result of =E2=80=98config.guess=E2=80=99. Neve= rtheless, in order to ease the transition from 2.13 to 2.50, the following transition scheme is implemented. _Do not rely on it_, as it will be completely disabled in a couple of releases (we cannot keep it, as it proves to cause more problems than it cures). They all default to the result of running =E2=80=98config.guess=E2= =80=99, unless you specify either =E2=80=98--build=E2=80=99 or =E2=80=98--host=E2=80=99. = In this case, the default becomes the system type you specified. If you specify both, and they=E2=80=99re different, =E2=80=98configure=E2=80=99 enters cross compilation mode, s= o it doesn=E2=80=99t run any tests that require execution. Hint: if you mean to override the result of =E2=80=98config.guess=E2= =80=99, prefer =E2=80=98--build=E2=80=99 over =E2=80=98--host=E2=80=99. So it seems that nowadays the build, host, and target would take default values as guessed by config.guess, and that the earlier section of the manual should be updated? Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 09:22:31 2021 Received: (at 46725) by debbugs.gnu.org; 8 Mar 2021 14:22:31 +0000 Received: from localhost ([127.0.0.1]:42467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJGmE-0002zb-Rz for submit@debbugs.gnu.org; Mon, 08 Mar 2021 09:22:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJGm9-0002zL-Gg for 46725@debbugs.gnu.org; Mon, 08 Mar 2021 09:22:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48395) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGm4-0006A8-4X; Mon, 08 Mar 2021 09:22:20 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41034 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lJGlw-0002oB-MU; Mon, 08 Mar 2021 09:22:14 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. References: <20210223200755.29532-1-mail@cbaines.net> <20210224083709.9342-1-mail@cbaines.net> <87v9a9uzub.fsf_-_@gnu.org> <87zgzjoy7y.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?utf-8?Q?Vent=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 08 Mar 2021 15:22:11 +0100 In-Reply-To: <87zgzjoy7y.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Thu, 04 Mar 2021 08:16:49 -0500") Message-ID: <874khld8to.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46725 Cc: 46725@debbugs.gnu.org, Christopher Baines 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.7 (-) Hi, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > >> Hi! >> >> Christopher Baines skribis: >> >>> These changes were sent upstream as >>> https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html >>> >>> Without this change, the .go files are built for the host architecture,= rather >>> than the target. I noticed this when cross building the >>> guix-build-coordinator (for which guile-lib is an input) to the Hurd. >>> >>> * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add >>> 'patch-for-cross-compilation phase. >>> [native-inputs]: Add autoconf, automake and gettext. >>> (guile2.0-lib): Adjust to use alist-replace. >>> (guile2.2-lib): Adjust to use alist-replace. >> >> [...] >> >>> + (substitute* "configure.ac" >>> + (("GUILE_FLAGS") >>> + "GUILE_FLAGS >>> +if test \"$cross_compiling\" !=3D no; then >>> + GUILE_TARGET=3D\"--target=3D$host_alias\" >>> + AC_SUBST([GUILE_TARGET]) >>> +fi >> >> You could even set =E2=80=98GUILE_TARGET=E2=80=99 unconditionally. > > It seems a conditional is needed, because info > '(autoconf)Canonicalizing' says: > > The variables =E2=80=98build_alias=E2=80=99, =E2=80=98host_alias=E2= =80=99, and =E2=80=98target_alias=E2=80=99 are > always exactly the arguments of =E2=80=98--build=E2=80=99, =E2=80=98-= -host=E2=80=99, and =E2=80=98--target=E2=80=99; in > particular, they are left empty if the user did not use them, even if > the corresponding =E2=80=98AC_CANONICAL=E2=80=99 macro was run. > > I.e. without the condition '--target=3D' could be passed to guild, which > probably wouldn't work. Ah true. In Guile-{Gcrypt,zlib,=E2=80=A6}, =E2=80=98--target=E2=80=99 is p= assed conditionally. Apologies for the confusion! > So it seems that nowadays the build, host, and target would take default > values as guessed by config.guess, and that the earlier section of the > manual should be updated? Dunno; but in hindsight, what Chris did seemed right. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 17:11:20 2021 Received: (at 46725-done) by debbugs.gnu.org; 8 Mar 2021 22:11:20 +0000 Received: from localhost ([127.0.0.1]:45122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJO5m-0006jk-UG for submit@debbugs.gnu.org; Mon, 08 Mar 2021 17:11:20 -0500 Received: from mira.cbaines.net ([212.71.252.8]:54502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJO5i-0006jY-08 for 46725-done@debbugs.gnu.org; Mon, 08 Mar 2021 17:11:10 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 3CB9C27BC50; Mon, 8 Mar 2021 22:11:05 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 9258c271; Mon, 8 Mar 2021 22:11:05 +0000 (UTC) References: <20210223200755.29532-1-mail@cbaines.net> <20210224083709.9342-1-mail@cbaines.net> <87v9a9uzub.fsf_-_@gnu.org> <87zgzjoy7y.fsf_-_@gmail.com> <874khld8to.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines To: 46725-done@debbugs.gnu.org Subject: Re: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. In-reply-to: <874khld8to.fsf@gnu.org> Date: Mon, 08 Mar 2021 22:11:02 +0000 Message-ID: <87k0qhb8jt.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46725-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , Maxim Cournoyer 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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Hi! >>> >>> Christopher Baines skribis: >>> >>>> These changes were sent upstream as >>>> https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html >>>> >>>> Without this change, the .go files are built for the host architecture= , rather >>>> than the target. I noticed this when cross building the >>>> guix-build-coordinator (for which guile-lib is an input) to the Hurd. >>>> >>>> * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add >>>> 'patch-for-cross-compilation phase. >>>> [native-inputs]: Add autoconf, automake and gettext. >>>> (guile2.0-lib): Adjust to use alist-replace. >>>> (guile2.2-lib): Adjust to use alist-replace. >>> >>> [...] >>> >>>> + (substitute* "configure.ac" >>>> + (("GUILE_FLAGS") >>>> + "GUILE_FLAGS >>>> +if test \"$cross_compiling\" !=3D no; then >>>> + GUILE_TARGET=3D\"--target=3D$host_alias\" >>>> + AC_SUBST([GUILE_TARGET]) >>>> +fi >>> >>> You could even set =E2=80=98GUILE_TARGET=E2=80=99 unconditionally. >> >> It seems a conditional is needed, because info >> '(autoconf)Canonicalizing' says: >> >> The variables =E2=80=98build_alias=E2=80=99, =E2=80=98host_alias=E2= =80=99, and =E2=80=98target_alias=E2=80=99 are >> always exactly the arguments of =E2=80=98--build=E2=80=99, =E2=80=98= --host=E2=80=99, and =E2=80=98--target=E2=80=99; in >> particular, they are left empty if the user did not use them, even if >> the corresponding =E2=80=98AC_CANONICAL=E2=80=99 macro was run. >> >> I.e. without the condition '--target=3D' could be passed to guild, which >> probably wouldn't work. > > Ah true. In Guile-{Gcrypt,zlib,=E2=80=A6}, =E2=80=98--target=E2=80=99 is= passed conditionally. > Apologies for the confusion! > >> So it seems that nowadays the build, host, and target would take default >> values as guessed by config.guess, and that the earlier section of the >> manual should be updated? > > Dunno; but in hindsight, what Chris did seemed right. I don't really get the change I'm making, but I'm confident it has the desired effect, I just copied it other Guile libraries. Anyway, I think this is still useful, so I've gone ahead and pushed as a0b24d5f8c5813329986b1bd690ed50b5308cc78. If there are better ways to get the cross compiling to work, then that can be put in place upstream, and then these changes removed. Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmBGoPZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcTgxAAjASYFcHjqa87R5RGSif/4hTYct+/wekh VnUSLa/UEXT4T+4i33HXm3PIix9xrFUSetYNpwqq3s64oP0A8CbBYs0irqOWYb3h vY+MkhA/H1hpicaDmkTJ5vKazUz1z9PaB2b/nCqxJs9KDG6opvhcAXyRTrkjixUq 45BqpdK6wl8WY7KJgQa5HGvQY68Demx2k9cQw7fgPlekuv/IeDamrQzrBp6Oafpw +zrwxXaZcBVfwnN7Rv5/L96tugesvXXkcOqvfCtuUDTgaf95m+am09TRIoVj8PD9 ePEGGuAaFjv1szvPsP+lj1eedpaLUyDZyUatjtu6FRhAWSDZTU/9Xy4XvQ+nN6FC OO+YbHN6pA+1Ko0xsQA0Kq3GkBACHHqDxjPe68UfvSRPIIxyvGhZZrBKVPDyA77+ FzGstVv5ByXPh36NykkXrVuFAKl0tislbbIR8oda6bgOazNbFvw5V2q6MekyuMZf P46KR/O5yrTMIdaqGJCzOk0wbBOiqMoEZtQQuC870cMWB4w7RgjaaEkEla9vLPLL iUP03lKIY0oyFFioXoOOlf4bFNVixgvANBCHkvEfRaKF5rKIN32GEgiuJXMw4pTL v6o7d/XwIZ4lL9XfqsgtdzlYXoelAUD2kyv6x9d1wb0D0k4M4VkVj495B8Pgbp8o X7kLNehtsHg= =AiNU -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 11 16:02:01 2021 Received: (at 46725-done) by debbugs.gnu.org; 11 Mar 2021 21:02:01 +0000 Received: from localhost ([127.0.0.1]:55018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKSRU-00042T-KP for submit@debbugs.gnu.org; Thu, 11 Mar 2021 16:02:00 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:42940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKSRQ-000422-HE for 46725-done@debbugs.gnu.org; Thu, 11 Mar 2021 16:01:59 -0500 Received: by mail-qv1-f49.google.com with SMTP id 30so3243994qva.9 for <46725-done@debbugs.gnu.org>; Thu, 11 Mar 2021 13:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=omSOh8DusFMymk7CdEur2mLi4vHIoCq6DZ+DXuuN/FA=; b=eAgnGzxAJ7QDixDAKJyhltSTN1zTdmZk7EuGttB6WkwTJm28i8naWrw/YmIn3jXXoR mQctCKg3YgUl9hTfQ/5GoZ0lG7YYLwbZXFLOtqd1xeTs8lOCzrBb0vS1+dtbuo/AjAoZ KszjLGh+DonkWArrIUmva30/nzPFhxKrwleRwjE82cjRjSMaoLUOwYmXxuv2NHaAfiOa 7gkS00j2JSW6QaFKnhOZ32GU0BQQhmMW+RLF7AIiMJVV0i11bfjXJy1slUVM6v72jL8z u8cpRhFBPqvxSyB2f19L6ywdYe9SiQ4LlsvUEBM0GNp5SUQwN8z3grtMKd/b5AMYP1Nm chnQ== 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:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=omSOh8DusFMymk7CdEur2mLi4vHIoCq6DZ+DXuuN/FA=; b=WceFr0MhVz7HvhpfClg45eHmK1sCBIcmw4k6d6q7OUjlT+R7sfin/Lu5YhelhRcKN6 e897LZCgtYykyqn5TCaeFas2TEyU59iZNlAXZFaFQG4/k9FjbPHvaDk5VQcDGpg7WWG3 xOFqQgSgcqeE1d00yPYu0iX3Tq+UP3j0cKAitpmR1YlsJwEPxNWk8BQZMHjZlu3Ph7Ej Zl7gk2SCnbyEm5TWoQVezTsAACfxzGg1YGBceGwAbQO11yVSf8dWa4fbp0XRR4lWz6D0 jsZXq5tiE/eSLz3DirYSCzpvWObNwJCmqk5Avj+ODAVihoKggkVsi2ZDq/RkP96mAepb cnEg== X-Gm-Message-State: AOAM530AwLuNlCwDL4GKNe1zkmgswvu1J0Ht0mG8b58PwlkbRLM7qfEf olBnYBAmil6l0KekZX0gIJGyCkWDZrzlCQ== X-Google-Smtp-Source: ABdhPJzbpR6L+KbKar1rsLVpgU2vxxg8Ip+QWioM/4Hz3MtINXRcBUZ880CF6Whts0Bpqg5VOiulsQ== X-Received: by 2002:a0c:a404:: with SMTP id w4mr9468119qvw.45.1615496510857; Thu, 11 Mar 2021 13:01:50 -0800 (PST) Received: from hurd (dsl-10-135-21.b2b2c.ca. [72.10.135.21]) by smtp.gmail.com with ESMTPSA id b17sm1243526qtp.73.2021.03.11.13.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 13:01:50 -0800 (PST) From: Maxim Cournoyer To: Christopher Baines Subject: Re: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. References: <20210223200755.29532-1-mail@cbaines.net> <20210224083709.9342-1-mail@cbaines.net> <87v9a9uzub.fsf_-_@gnu.org> <87zgzjoy7y.fsf_-_@gmail.com> <874khld8to.fsf@gnu.org> <87k0qhb8jt.fsf@cbaines.net> Date: Thu, 11 Mar 2021 16:01:49 -0500 In-Reply-To: <87k0qhb8jt.fsf@cbaines.net> (Christopher Baines's message of "Mon, 08 Mar 2021 22:11:02 +0000") Message-ID: <87wnudtneq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46725-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 46725-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: -1.0 (-) Hi Chris, Christopher Baines writes: > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Maxim Cournoyer skribis: >> >>> Ludovic Court=C3=A8s writes: >>> >>>> Hi! >>>> >>>> Christopher Baines skribis: >>>> >>>>> These changes were sent upstream as >>>>> https://lists.gnu.org/archive/html/guile-devel/2021-02/msg00004.html >>>>> >>>>> Without this change, the .go files are built for the host architectur= e, rather >>>>> than the target. I noticed this when cross building the >>>>> guix-build-coordinator (for which guile-lib is an input) to the Hurd. >>>>> >>>>> * gnu/packages/guile-xyz.scm (guile-lib)[arguments]: Add >>>>> 'patch-for-cross-compilation phase. >>>>> [native-inputs]: Add autoconf, automake and gettext. >>>>> (guile2.0-lib): Adjust to use alist-replace. >>>>> (guile2.2-lib): Adjust to use alist-replace. >>>> >>>> [...] >>>> >>>>> + (substitute* "configure.ac" >>>>> + (("GUILE_FLAGS") >>>>> + "GUILE_FLAGS >>>>> +if test \"$cross_compiling\" !=3D no; then >>>>> + GUILE_TARGET=3D\"--target=3D$host_alias\" >>>>> + AC_SUBST([GUILE_TARGET]) >>>>> +fi >>>> >>>> You could even set =E2=80=98GUILE_TARGET=E2=80=99 unconditionally. >>> >>> It seems a conditional is needed, because info >>> '(autoconf)Canonicalizing' says: >>> >>> The variables =E2=80=98build_alias=E2=80=99, =E2=80=98host_alias=E2= =80=99, and =E2=80=98target_alias=E2=80=99 are >>> always exactly the arguments of =E2=80=98--build=E2=80=99, =E2=80= =98--host=E2=80=99, and =E2=80=98--target=E2=80=99; in >>> particular, they are left empty if the user did not use them, even = if >>> the corresponding =E2=80=98AC_CANONICAL=E2=80=99 macro was run. >>> >>> I.e. without the condition '--target=3D' could be passed to guild, which >>> probably wouldn't work. >> >> Ah true. In Guile-{Gcrypt,zlib,=E2=80=A6}, =E2=80=98--target=E2=80=99 i= s passed conditionally. >> Apologies for the confusion! >> >>> So it seems that nowadays the build, host, and target would take default >>> values as guessed by config.guess, and that the earlier section of the >>> manual should be updated? >> >> Dunno; but in hindsight, what Chris did seemed right. > > I don't really get the change I'm making, but I'm confident it has the > desired effect, I just copied it other Guile libraries. Anyway, I think > this is still useful, so I've gone ahead and pushed as > a0b24d5f8c5813329986b1bd690ed50b5308cc78. > > If there are better ways to get the cross compiling to work, then that > can be put in place upstream, and then these changes removed. > > Thanks, > > Chris FYI, I have sent to the Guile patches tracker commits (keeping original authorship) of all the Guix-specific changes to guile-lib; the version of your patch is slightly modified to test the value about to be used, but otherwise it behaves the same. Maxim From unknown Sat Jun 14 03:47:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 09 Apr 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator