From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AG15D/s8qGFZJgAAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 04:26:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WE0JC/s8qGF9LwAAbx9fmQ (envelope-from ) for ; Thu, 02 Dec 2021 03:26:51 +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 E3B4C376DB for ; Thu, 2 Dec 2021 04:26:50 +0100 (CET) Received: from localhost ([::1]:44836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msckD-0000tV-V5 for larch@yhetil.org; Wed, 01 Dec 2021 22:26:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mscju-0000t8-9F for guix-devel@gnu.org; Wed, 01 Dec 2021 22:26:30 -0500 Received: from [2607:f8b0:4864:20::f36] (port=46758 helo=mail-qv1-xf36.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mscjs-0000rC-Li; Wed, 01 Dec 2021 22:26:29 -0500 Received: by mail-qv1-xf36.google.com with SMTP id jo22so23715028qvb.13; Wed, 01 Dec 2021 19:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=9hTkTXHFFqBKwM9gC31mgnX4fiaJ9XFyyJoq9lvQBfg=; b=pdbj+/zUtiiijJBDz3adjcL5KjeVKhzEx63akxYPAOd+/HSCA3vrGU3SVnpoqqKVWU o8AoF+uIdUMyLt31A3/eie4Cnbcb8zTcNihPapaoyj7aA3mzZ1Uc9onJI1HmHgHxFLBo oP2GKxuXkJ/AeesnwOQxZ1rpQ5rOG8OP3XiUFarQBnpfPBWDzEhNtTGgUuOUSLlKbx+K VwnlXoW5dQ0GRiIcFKQ7KbvQQtmPV9LlAM6UajwP+MobrEYR4DQmBpvF7FkS0MPLj0vU VkI1qv3f2DR6lNcP3C9mSDmN4RH30HuJpQbUJyB583xDMDU4+0jLxm+PJBtN6wbH+P7o Nsrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=9hTkTXHFFqBKwM9gC31mgnX4fiaJ9XFyyJoq9lvQBfg=; b=Dtp1Md9/gnXcV9QzkM0G6K3VCfTNXci5bQ3XlGHZjJaOYdJUJ9otJ2OrLYEhAFVl7h xNcKJufaedCayJlf/wocNlxoF9vNuYqt08136SOJjxOgLq/4UF2e8Ox59buT8cGTL650 KkAiZ9YSim8E7aTqwNONB47UzW00KmvD1fcWDhDzLmW77j7D7lfwTvAyfM++teySSNiC wyinKtuFdR6YkFKwI8XEUhg8BnjnMeSmH6OvGysSvCGcr9Aes1EJ0h0ENGYgil1jxTQC y9w6N6XS8ocps0ZuzMW/SktYQjyB7blcqivKIfmqokonESqtYr52UOgNa7By/n7vafP9 PBww== X-Gm-Message-State: AOAM530BaZqALk/yHhbPIuIQRSKQINhqaB9MTK+fJVwLPb2JXszsk5f8 r08OsAN6uCsUQ9tSilRhCy+jgowPPeiYyA== X-Google-Smtp-Source: ABdhPJy3wtRdlLZgmaqJWuT4nAZdjEfwoMEJbHdn3hQpCbhOA+JMRX9Dt1qsIKGQklqdMh2lUl6QSw== X-Received: by 2002:a05:6214:c66:: with SMTP id t6mr11463701qvj.55.1638415586997; Wed, 01 Dec 2021 19:26:26 -0800 (PST) Received: from hurd (dsl-10-146-213.b2b2c.ca. [72.10.146.213]) by smtp.gmail.com with ESMTPSA id w19sm785662qkw.49.2021.12.01.19.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 19:26:26 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Desktops on non-x86_64 systems References: <8735nh8bvw.fsf@inria.fr> <87sfvhnrm2.fsf@elephly.net> <87pmql6kug.fsf@gmail.com> <87lf196jrg.fsf@gmail.com> <874k7w9nm9.fsf@gnu.org> <87pmqghqiy.fsf@gmail.com> <87mtlkz03c.fsf@gnu.org> Date: Wed, 01 Dec 2021 22:26:25 -0500 In-Reply-To: <87mtlkz03c.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 01 Dec 2021 18:49:59 +0100") Message-ID: <87ee6vbsbi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f36 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf36.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638415610; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9hTkTXHFFqBKwM9gC31mgnX4fiaJ9XFyyJoq9lvQBfg=; b=hU9zCFzfHaUwA56RJgK02s6t8/lPcE2OuY4RgPsplDPn900zl6ej8aGuQxFKK2CoC7NJ/0 NqqtSPubiHPQjkMK0HEAFcuu+Ux0sQ76rZHrHFu+pIYwdKH29cHs9o4xXLOaSJlc0KSJaN A75Vsv7kBnsunWw95LIOtbZqFI/8ZdTVzen9nGIKqC52VdHtFJMvwp0977NdGnK5pr4Nmb spfEtrVMzAjqiNv4qHo5CDyTjl8DhpZprjhY/85wVAUn5gHrzjTOkupz+myE69RSSFNibR GkBEdepJtNv4Cli0WN5Za7ulrhF65Kk/QohfX4EXdvTKqoxi7DH4EMBClB9vyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638415610; a=rsa-sha256; cv=none; b=dhcPIIlzLt2t3o0YAjhr6dUDD005gPn/0nFtZ3vYVXHjRdVA+ODiOn9YFNQz22BaMmmLB9 JVfkqmfM/1WB0bXFPv87HAtsuQbgYrnJGQhGy4+L7BqFIjmBQ16W69rg6IE5MbKcp0w/Hc UBVybu9ACZy++fUPVrgEWCJQ1xKs9q+BM1PhQb05a5Ebre47NDViJL00A2g6Xkmqy4sHPA TUJ0QktLC+q75w6uL4cinTKh5th7d7zGDSYJYY1WFTVX2pCQbMqRz00cq+SbI1BfZnRMMl AgN0UL7hirXVdYEKj1VyvLTtaOVOqQsKMSQ6ftGMUUFyU17l4Q5x5B5Dfh/CDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="pdbj+/zU"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="pdbj+/zU"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E3B4C376DB X-Spam-Score: -1.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: SJNQ9olzioTO Hi again, Ludovic et al! I'm trying another direction in my reply here based on recent findings; Ludovic Court=C3=A8s writes: > Hi! > > Maxim Cournoyer skribis: > >> I've updated the branch wip-cross-built-rust; it seems to build and run >> OK (although running the binary produced by compiling hello.rs with the >> cross-built i686-linux rustc in a 32 bit VM took 47 sec (!?)), >> apparently hanging on something before outputting correctly the message >> and exiting with 0. >> >> I'd now like to figure out the top-level plumbing required to get this >> rust-i686-linux x86-64 package accepted in the real of i686-linux >> packages (cross the architecture boundary). Is this even possible in >> Guix? >> >> In other words, I'd like the i686 architecture to be able to use this >> rust-i686-linux cross built from x86_64 as if it was a *native* package. > > It=E2=80=99s not possible as it would imply that i686 is able to run x86_= 64 > code. Does it? Since the package was cross-compiled, the resulting binary is executable on i686 (and dynamically linked to other cross-compiled shared libraries which are executable there as well) -- it seems natural that a cross-compiled binary for architecture X should be allowed to become a part in the dependency graph of a package on that architecture. I understand that an i686-linux machine wouldn't be able to fully bootstrap itself -- it would rely on a x86_64-linux machine (either via offloading or pre-built substitutes) to provide the cross-compiled rustc; inconvenient, but preferable to some arbitrary binary blob fetched from the internet (and not that different from using a bootstrap binary from ftp.gnu.org). > What we=E2=80=99d need to do is =E2=80=9Ccut the dependency graph=E2=80= =9D at the architecture > boundary, similar to what=E2=80=99s described in > . > > Concretely, we=E2=80=99d cross-build Rust for i686 once; we=E2=80=99d put= it in a > tarball, store it at ftp.gnu.org, and make the rust 1.54 package (or > whatever that is) be equal so that tarball, unpacked, when the current > system is i686. (Similar to the =E2=80=98guile-bootstrap=E2=80=99 packag= e.) > > It does mean that the cross-built Rust must be statically linked. The above is a show stopper for rustc, I just learned. Rust has this feature called proc macros (procedural macros) that are implemented as dynamic libraries; and it's a rather core feature, used by the main serialization/deserialization facilities in Rust (and needed by rustc to bootstrap itself). So a statically linked rustc appears near-useless. > To reduce the risks associated with binary blobs, the Rust build should > ideally be reproducible, so that anyone can verify that the thing we put > at ftp.gnu.org is indeed Rust as cross-compiled from x86_64. Reproducibility should not be an issue; our rust bootstrap chain is reproducible, except perhaps for the first mrustc-produced 1.40 rust. Thanks, Maxim