From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oNTQBTyhRmBoNAAA0tVLHw (envelope-from ) for ; Mon, 08 Mar 2021 22:12:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gLSNATyhRmA0QgAAB5/wlQ (envelope-from ) for ; Mon, 08 Mar 2021 22:12:12 +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 B4EA3197B0 for ; Mon, 8 Mar 2021 23:12:11 +0100 (CET) Received: from localhost ([::1]:44118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJO6k-00077e-H9 for larch@yhetil.org; Mon, 08 Mar 2021 17:12:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJO6c-00075l-LT for guix-patches@gnu.org; Mon, 08 Mar 2021 17:12:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJO6c-0004FZ-9T for guix-patches@gnu.org; Mon, 08 Mar 2021 17:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJO6c-0006ku-5Z for guix-patches@gnu.org; Mon, 08 Mar 2021 17:12:02 -0500 Subject: bug#46725: [PATCH] gnu: guile-lib: Fix cross compilation. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 08 Mar 2021 22:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46725 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46725-done@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Mail-Followup-To: 46725@debbugs.gnu.org, mail@cbaines.net, mail@cbaines.net Received: via spool by 46725-done@debbugs.gnu.org id=D46725.161524148025914 (code D ref 46725); Mon, 08 Mar 2021 22:12:01 +0000 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 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-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=1615241531; 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:resent-to: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; bh=UJWa7l8OJfJssgygEnkoOQ7dtLQ/IYVjlNfaqDCt/ew=; b=LEy+GDPTvH6DJgQ1Koo2Z/bggzC8B6rhA+ys9UmmMc1UAxkZOcDkdJHzS5QDkXUkJoiiKS 16wgdhYheQF0yvcsu/LltC3ugFGqOn00dzWAdQNukND64Q/al/JnPqgLjmuv3wgQlrSgjr UDZDiunwet2LP2QDYaSLviYkIE/fAOtl46g24RgWntRiqEWXJk3h0z0GWatkr494tkhpZp J8C181aeVAS7IGNZ109IClPAjvdL26L4eW7dQDqg2hvH74D2h6ZluQW7c4+1raJHaHOObS oQRYQTdxunT8zUcNGZ7aJ92vz3FIunpKS/6kQe0Unn2fwZf7GabQRPRR7tW7ZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615241531; a=rsa-sha256; cv=none; b=QKHVQSWHt95AgFggiv0F8hkqh0YLMk76hx1CDvhpUOTMVKhx/cpOpX2sV2EZjyZgeiJ82G Ih5rDs0Tcy+vSq7IDAIsEPnxVSIJfZHzKp7ZVOh7lz5W9iJWTz60rRyc+x6ey1pz7HqitV MIyLH18Z3XTOC+SM4+POezLNJ+vz1cXfuZr2FZpZYbtnEH9pHGDMSfd8Em0FxvvHAw081t RSmef+BmfqkBPrpyg70WF+ouJMPb1IsMuI7C51M/0/XKyIct32f0F8B5XRd/Yla/7AFkOA Uf4sEGYEP9va/MngfPWINwyv7vHn/Abv6nRpTuTtfv8W/z/9bsH+jYYygKm7sA== ARC-Authentication-Results: i=1; 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-Spam-Score: -4.48 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: B4EA3197B0 X-Spam-Score: -4.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: Vr9y9G6Iyzlx --=-=-= 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----- --=-=-=--