From: Pierre Langlois <pierre.langlois@gmx.com>
To: "Jakub Kądziołka" <kuba@kadziolka.net>
Cc: pierre.langlois@gmx.com, 42888@debbugs.gnu.org
Subject: [bug#42888] [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms.
Date: Thu, 20 Aug 2020 21:55:49 +0100 [thread overview]
Message-ID: <874koy47g8.fsf@gmx.com> (raw)
In-Reply-To: <20200819215552.stnpvcfaj5xpqkn7@gravity>
[-- Attachment #1: Type: text/plain, Size: 3270 bytes --]
Hi Jakub,
Jakub Kądziołka writes:
> On Sun, Aug 16, 2020 at 03:42:38PM +0100, Pierre Langlois wrote:
>>
>> Pierre Langlois writes:
>>
>> > 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?
>>
>> Whoops, I forgot the copyright line on that file.
>>
>
> 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 = \"" 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-rust))
>> "manifest-rustc"))
>> (for-each
>> (lambda (file) (delete-manifest-file cargo-out file))
>
> 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
[-- Attachment #2: 0001-gnu-rust-Fix-install-phase-for-non-x86_64-platforms.patch --]
[-- Type: text/x-patch, Size: 1564 bytes --]
From c2b9142fb3de5dd27f26914d89eb08750a3f33fb Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
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 © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -614,7 +615,8 @@ jemalloc = \"" 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))
--
2.28.0
next prev parent reply other threads:[~2020-08-20 20:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 14:12 [bug#42888] [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms Pierre Langlois
2020-08-16 14:19 ` Efraim Flashner
2020-08-16 14:42 ` Pierre Langlois
2020-08-19 21:55 ` Jakub Kądziołka
2020-08-20 20:55 ` Pierre Langlois [this message]
2020-09-19 13:36 ` Pierre Langlois
2020-09-25 18:57 ` Marius Bakke
2020-09-25 20:03 ` bug#42888: " Pierre Langlois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874koy47g8.fsf@gmx.com \
--to=pierre.langlois@gmx.com \
--cc=42888@debbugs.gnu.org \
--cc=kuba@kadziolka.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).