From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qCSmKCDeQGBVDAAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 13:18:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yM6FJCDeQGAxKwAA1q6Kng (envelope-from ) for ; Thu, 04 Mar 2021 13:18:24 +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 3CDA8165D0 for ; Thu, 4 Mar 2021 14:18:24 +0100 (CET) Received: from localhost ([::1]:60040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHnrz-0000Ii-83 for larch@yhetil.org; Thu, 04 Mar 2021 08:18:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHnre-0000Hq-Ra for guix-patches@gnu.org; Thu, 04 Mar 2021 08:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHnre-00005I-LG for guix-patches@gnu.org; Thu, 04 Mar 2021 08:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHnre-0002ED-Gg for guix-patches@gnu.org; Thu, 04 Mar 2021 08:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46725] [PATCH] gnu: guile-lib: Fix cross compilation. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 Mar 2021 13:18:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 46725@debbugs.gnu.org, Christopher Baines Received: via spool by 46725-submit@debbugs.gnu.org id=B46725.16148638227620 (code B ref 46725); Thu, 04 Mar 2021 13:18:02 +0000 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 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?="'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-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614863904; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4qflj3N4fNPWo53AZmoGiCpsgpYouCfGWuBcvxR6D7Q=; b=LWxYn3nM8wg44gQJN5QldDRbaCxv71RWyOb7gR0o2cgWCzl5nLFe/451UP/z29z0sQJJJf n7dINzbtN4mJycFIS3n/k89yBjUdXFS0JRmOZN9BdkWrDHquAxJSPGBj9/2V5APDfgwNrz pjlhTBV1o7GLVwQd9Mdp+cfspX/+SptnWCfmLf9Z4dk+DeB/Ly+S/GOmnp+Krq9S+FScmd pLSEYRkL6PbYE2c31JZ94lPW/AecCZ5gm8wiAycVwYfKbpGBdlDF+TsBEWOfyVq0mTa2p/ iy2axQMfpwqr3HFxegqO49U6/pF5yZZGj0z61gfu2NgGgosvN4hHPm5Ukqj7eQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614863904; a=rsa-sha256; cv=none; b=HDki59pDREA/FT5NWDuNXBoBGg+lNP+s4uWSDVF5/nsZovxjg1NspyOkrj5MGWxo5G0Xtr M/W/WI88DJ9CterXlEk6aJWGgiyiQlU+ZwNNxtMgGtvE6ZArlQmP2Z6GhakB0YnP3yCxlR TNKl7VxQBfUk94toWHfnFI6Ldyfw2RQGdJR9jK4u6edU12fQW0Be5NsbqnLjuxbK2/+gP/ 9Q+iNaEBydJs6ILPq3cGZSGUOstsuEqMx0oEnw9j45xins8mbRjfmDTKu3U8bHNSTTDp2r qOZ/571ZFV3Nz2EUmziuF978EgMPF5UXv0+sYXI3QXcOtUE0OS27jAvicTM0xw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=u6lGyyA1; 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-Migadu-Spam-Score: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=u6lGyyA1; 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-Migadu-Queue-Id: 3CDA8165D0 X-Spam-Score: -1.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: qGJbF0eNn+cx 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