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 gIMfLcrjPl8KYAAA0tVLHw (envelope-from ) for ; Thu, 20 Aug 2020 20:57:46 +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 MPnuKMrjPl9PbgAA1q6Kng (envelope-from ) for ; Thu, 20 Aug 2020 20:57:46 +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 33ED694060F for ; Thu, 20 Aug 2020 20:57:46 +0000 (UTC) Received: from localhost ([::1]:38874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8rcy-0001nf-Be for larch@yhetil.org; Thu, 20 Aug 2020 16:57:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8rcN-0001mg-Hx for guix-patches@gnu.org; Thu, 20 Aug 2020 16:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8rcM-0003Aq-4x for guix-patches@gnu.org; Thu, 20 Aug 2020 16:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8rcM-0007uv-2v for guix-patches@gnu.org; Thu, 20 Aug 2020 16:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42888] [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Aug 2020 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42888 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Cc: pierre.langlois@gmx.com, 42888@debbugs.gnu.org X-Debbugs-Original-Cc: Pierre Langlois , 42888@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159795699030374 (code B ref -1); Thu, 20 Aug 2020 20:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Aug 2020 20:56:30 +0000 Received: from localhost ([127.0.0.1]:44291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8rbp-0007to-CT for submit@debbugs.gnu.org; Thu, 20 Aug 2020 16:56:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:46308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8rbn-0007tf-Ck for submit@debbugs.gnu.org; Thu, 20 Aug 2020 16:56:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8rbn-0001af-4V for guix-patches@gnu.org; Thu, 20 Aug 2020 16:56:27 -0400 Received: from mout.gmx.net ([212.227.15.19]:53481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8rbk-00039P-U1 for guix-patches@gnu.org; Thu, 20 Aug 2020 16:56:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1597956951; bh=BOaG84W6GoOVG/IdqgmDMf0WWfZyuFd0/Oxpve4Z9zo=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date; b=gi97SR81+RgXcTxj999gyORfvhznFpjbsPUrKWTRdunfd/WXS/G+NWot2mjY/mkl/ w/POW2nyfXGD6J192BDVlnETTHBwMaDt93j0hxjzycO/oUJJaIAmzsYzdcYCJnFflL FPmtfuMvvO88b/riN0CTUmRQSDRZDFREnLu27sc4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from e119807-lin ([82.69.64.142]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MCsPy-1k01uY3OO8-008p1j; Thu, 20 Aug 2020 22:55:50 +0200 References: <87d03qptmv.fsf@gmx.com> <875z9ips81.fsf@gmx.com> <20200819215552.stnpvcfaj5xpqkn7@gravity> User-agent: mu4e 1.4.12; emacs 26.3 From: Pierre Langlois Message-ID: <874koy47g8.fsf@gmx.com> In-reply-to: <20200819215552.stnpvcfaj5xpqkn7@gravity> Date: Thu, 20 Aug 2020 21:55:49 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:jS3QSovuLBKWGzluka8xe5/dmPwg0Lv+Sjg5iQgn5tI8yo/dq6G yog/56tDmUxD4k+15Z5k5yuYpOxdcDc0PweQl6nNVvJDGF63u9KubDew+PyiJom+JPmhVPw 9NxPPu8XcmLlDMjXmrPCz7btRi0xf2Vp31S8xROhUkeQcJLFzEpMte52rLfhgiRi2giUBJ/ rnUH4LKx/c2mEVaXZH1zQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:w2UzCvUjE9E=:b6XAkiUgedUW6ch1BpVCyi MzTvhvRV0ZysPwzeRCgjzJdr7OX0ZCuQDxmXDJQFQmSujddVUX9NwaIubAv8ubzvbka/9dkXP 0berL4gArKO2OdI5iUKqhGcHt5GQLnj85i/R49O3cNi2fJn4mpJi0yKkWXFktuQD6k+4wm39r F1mJ43IXg7zG+SNopeB/RYJfgL9G8z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caQsLXbnbu3N8oEbTO0Ak3dya9+hhi1uyQ== Received-SPF: pass client-ip=212.227.15.19; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 16:37:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmx.net header.s=badeba3b8450 header.b=gi97SR81; 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-Spam-Score: -0.01 X-TUID: UDqauuBwMFff --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jakub, Jakub K=C4=85dzio=C5=82ka writes: > On Sun, Aug 16, 2020 at 03:42:38PM +0100, Pierre Langlois wrote: >>=20 >> Pierre Langlois writes: >>=20 >> > Hello Guix! >> > >> > In an optimistic attempt to eventually have Icecat on a Pinebook Pro, I >> > thought I'd try and get rust building on aarch64. Here's a fix for the >> > post-install phase that had an x86 triplet hardcoded. With this we're >> > able to start off the bootstrap chain! >> > >> > That being said, each step takes ~5 hours on this machine so this is >> > going to take a while :-), it's currently working on 1.23. >> > >> > So, I suppose this should go into either core-updates or staging? WDYT? >>=20 >> Whoops, I forgot the copyright line on that file. >>=20 > > Pierre, > > thanks for your patch! I was working on a similar change before, but > when I tried it, it failed even earlier in the bootstrap chain. It > might've been QEMU weirdness, though, a la #42448. > >> @@ -612,9 +613,10 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" = "\" >> (cargo-out (assoc-ref outputs "cargo"))) >> (for-each >> (lambda (file) (delete-manifest-file out file)) >> - '("install.log" >> + `("install.log" >> "manifest-rust-docs" >> - "manifest-rust-std-x86_64-unknown-linux-gnu" >> + ,,(string-append "manifest-rust-std-" >> + (nix-system->gnu-triplet-for-ru= st)) >> "manifest-rustc")) >> (for-each >> (lambda (file) (delete-manifest-file cargo-out fil= e)) > > If I understand the code correctly, this quasiquote is unnecessary, as > the host-side code will evaluate to a string that can be inserted as-is, > without another unquote on the build side. > > Fixing this would mean that the patch can go on master, since it would > now only trigger rebuilds on architectures that are already broken. Ooooh yeah, that'll be much better, I've attached a patch that does just that. I can confirm it doesn't trigger a full rebuild, nice! > I wish you best of luck on your quest for Rust on ARM boards. This has > been a long-standing issue, and it'd be nice to have it fixed. Let me > know if you need any help - I packaged the last few versions, so I got > quite familiar with the various failure modes of the build process. I'm > NieDzejkob on IRC, if you prefer. haha, thanks :-), I haven't got very far with it yet, the build failed at 1.23 with a test case failure. Something to do with receiving the wrong signal on an expected crash. I'm optimistic though! I don't have the build log around anymore, but we can see if the CI has the same problem. I haven't spent much time investigating, instead thinking I'm better off trying to get the patches that allow bootstrapping from 1.29 working. I was planning on looking into that. Otherwise we can skip any tests that don't pass and carry on, I suspect it's normal behaviour on that platform and the tests need updating. I think aarch64 is officially supported now but it's probably quite recent. Thanks, Pierre --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-rust-Fix-install-phase-for-non-x86_64-platforms.patch Content-Transfer-Encoding: quoted-printable >From c2b9142fb3de5dd27f26914d89eb08750a3f33fb Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sun, 16 Aug 2020 12:17:18 +0100 Subject: [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms. * gnu/packages/rust.scm (rust-1.20)[arguments]: Replace hardcoded x86_64 triplet with nix-system->gnu-triplet-for-rust in 'delete-install-logs phase. --- gnu/packages/rust.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 778aeaab05..7571cfee3f 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -9,6 +9,7 @@ ;;; Copyright =C2=A9 2018 Danny Milosavljevic ;;; Copyright =C2=A9 2019 Ivan Petkov ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka +;;; Copyright =C2=A9 2020 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -614,7 +615,8 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\" (lambda (file) (delete-manifest-file out file)) '("install.log" "manifest-rust-docs" - "manifest-rust-std-x86_64-unknown-linux-gnu" + ,(string-append "manifest-rust-std-" + (nix-system->gnu-triplet-for-rust)) "manifest-rustc")) (for-each (lambda (file) (delete-manifest-file cargo-out file)) --=20 2.28.0 --=-=-=--