From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yFzgGGISNmCeMQAA0tVLHw (envelope-from ) for ; Wed, 24 Feb 2021 08:46:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EJvCFGISNmACRwAA1q6Kng (envelope-from ) for ; Wed, 24 Feb 2021 08:46:26 +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 8016D15EF2 for ; Wed, 24 Feb 2021 09:46:25 +0100 (CET) Received: from localhost ([::1]:52798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEpoO-0005kU-4P for larch@yhetil.org; Wed, 24 Feb 2021 03:46:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEpo3-0005ib-Eu for guix-patches@gnu.org; Wed, 24 Feb 2021 03:46:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEpo1-0006ZP-WA for guix-patches@gnu.org; Wed, 24 Feb 2021 03:46:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lEpo1-0000oF-V3 for guix-patches@gnu.org; Wed, 24 Feb 2021 03:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46725] [PATCH] gnu: guile-lib: Fix cross compilation. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Feb 2021 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46725 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Prikler Cc: 46725@debbugs.gnu.org Received: via spool by 46725-submit@debbugs.gnu.org id=B46725.16141563543097 (code B ref 46725); Wed, 24 Feb 2021 08:46:01 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.97 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Migadu-Queue-Id: 8016D15EF2 X-Spam-Score: -1.97 X-Migadu-Scanner: scn0.migadu.com X-TUID: q9FWQlwNb2Wx --=-=-= 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----- --=-=-=--