From: Mark H Weaver <mhw@netris.org>
To: "Mathieu Othacehe" <othacehe@gnu.org>, "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: wip-ungrafting builds stuck
Date: Sun, 18 Apr 2021 12:07:52 -0400 [thread overview]
Message-ID: <871rb7tw24.fsf@netris.org> (raw)
In-Reply-To: <874kg3rjay.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
Mathieu Othacehe <othacehe@gnu.org> writes:
>> Any idea what could be wrong, Mathieu? What would you suggest to do
>> when investigating such issues?
>
> Yes I noticed it. The main problem here is that almost all workers are
> stuck building Rust.
>
> I see two actions here:
>
> 1. Understand why Rust is taking so long to build.
The attached patch, which I've been using on my private branch of Guix
for a long time and is fully tested, would significantly speed up the
Rust bootstrap. I never submitted it because I wasn't sure it would be
of interest.
Mark
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] gnu: rust: Disable check phases of versions before 1.40. --]
[-- Type: text/x-patch, Size: 4352 bytes --]
From cfe7ed9732e77eacf7f9e6b6db0d731b2f7d100e Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sun, 19 Jul 2020 23:13:28 -0400
Subject: [PATCH] gnu: rust: Disable check phases of versions before 1.40.
This saves 49 hours of total build time on a Thinkpad X200.
* gnu/packages/rust.scm (rust-1.19)[arguments]: Add "#:tests? #f".
(rust-1.20, rust-1.26)[arguments]: Modify the custom 'check' phase to honor
the '#:tests?' argument.
(rust-1.40)[arguments]: Override '#:tests?' argument to be #t.
---
gnu/packages/rust.scm | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 3952a17908..2b9f26c204 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -236,6 +236,8 @@ safety and thread safety guarantees.")
(arguments
`(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
#:modules ((guix build utils) (ice-9 match) (guix build gnu-build-system))
+ #:tests? #f ;Disable the test suite for early versions of rust to save
+ ;compile time.
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-env
@@ -596,11 +598,16 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(invoke "./x.py" "build")
(invoke "./x.py" "build" "src/tools/cargo")))
(replace 'check
- (lambda* _
- ;; Disable parallel execution to prevent EAGAIN errors when
- ;; running tests.
- (invoke "./x.py" "-j1" "test" "-vv")
- (invoke "./x.py" "-j1" "test" "src/tools/cargo")
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ (let ((parallel-job-spec
+ ;; Disable parallel execution to prevent EAGAIN
+ ;; errors when running tests.
+ "-j1"))
+ (invoke "./x.py" parallel-job-spec "test" "-vv")
+ (invoke "./x.py" parallel-job-spec "test"
+ "src/tools/cargo"))
+ (format #t "test suite not run~%"))
#t))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -774,15 +781,16 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
;; binaryen was replaced with LLD project from LLVM
(delete 'dont-build-native)
(replace 'check
- (lambda* _
- ;; Enable parallel execution.
- (let ((parallel-job-spec
- (string-append "-j" (number->string
- (min 4
- (parallel-job-count))))))
- (invoke "./x.py" parallel-job-spec "test" "-vv")
- (invoke "./x.py" parallel-job-spec "test"
- "src/tools/cargo"))))
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ (let ((parallel-job-spec
+ ;; Enable parallel execution.
+ (format #f "-j~a" (min 4 (parallel-job-count)))))
+ (invoke "./x.py" parallel-job-spec "test" "-vv")
+ (invoke "./x.py" parallel-job-spec "test"
+ "src/tools/cargo"))
+ (format #t "test suite not run~%"))
+ #t))
(replace 'remove-unsupported-tests
(lambda* _
;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
@@ -1226,6 +1234,10 @@ move around."
;; which makes this workaround only necessary for this release.
(cons* #:validate-runpath? #f
(substitute-keyword-arguments (package-arguments base-rust)
+ ((#:tests? _ #t)
+ ;; Enable the test suite, which was disabled for earlier versions
+ ;; of rust to save compile time.
+ #t)
((#:phases phases)
`(modify-phases ,phases
;; We often need to patch tests with various Guix-specific paths.
--
2.31.1
next prev parent reply other threads:[~2021-04-18 16:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-18 10:02 wip-ungrafting builds stuck Ludovic Courtès
2021-04-18 10:13 ` Mathieu Othacehe
2021-04-18 10:14 ` Mathieu Othacehe
2021-04-18 16:07 ` Mark H Weaver [this message]
2021-04-21 2:47 ` Maxim Cournoyer
2021-04-21 20:47 ` Why is glib still grafted on the 'wip-ungrafting' branch? (was Re: wip-ungrafting builds stuck) Mark H Weaver
2021-04-21 22:26 ` Leo Famulari
2021-04-22 16:27 ` Mark H Weaver
2021-04-22 18:10 ` Leo Famulari
2021-04-30 16:32 ` wip-ungrafting builds stuck Ludovic Courtès
2021-04-30 17:18 ` Leo Famulari
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=871rb7tw24.fsf@netris.org \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=othacehe@gnu.org \
/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).