From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oIbDM1EHNmCqWwAA0tVLHw (envelope-from ) for ; Wed, 24 Feb 2021 07:59:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kMN3L1EHNmAxPgAAbx9fmQ (envelope-from ) for ; Wed, 24 Feb 2021 07:59:13 +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 130121F9A3 for ; Wed, 24 Feb 2021 08:59:12 +0100 (CET) Received: from localhost ([::1]:57348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEp4h-0000xG-I7 for larch@yhetil.org; Wed, 24 Feb 2021 02:59:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEp4Y-0000wp-FA for guix-patches@gnu.org; Wed, 24 Feb 2021 02:59:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEp4Y-00035D-1n for guix-patches@gnu.org; Wed, 24 Feb 2021 02:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lEp4Y-00082u-0w for guix-patches@gnu.org; Wed, 24 Feb 2021 02:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46725] [PATCH] gnu: guile-lib: Fix cross compilation. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Feb 2021 07:59: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: Christopher Baines , 46725@debbugs.gnu.org Received: via spool by 46725-submit@debbugs.gnu.org id=B46725.161415351830897 (code B ref 46725); Wed, 24 Feb 2021 07:59:01 +0000 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: From: Leo Prikler 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-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.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=M4hsXdOV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (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-Migadu-Queue-Id: 130121F9A3 X-Spam-Score: -1.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: WHd/FAt4KVBo 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