From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: Guillaume Le Vaillant <glv@posteo.net>
Cc: 50617@debbugs.gnu.org
Subject: bug#50617: [core-updates-frozen] CMake fails to build on i686-linux
Date: Thu, 16 Sep 2021 17:20:15 +0200 [thread overview]
Message-ID: <87h7ek1r9s.fsf@inria.fr> (raw)
In-Reply-To: <87k0jgoe2v.fsf@kitej> (Guillaume Le Vaillant's message of "Thu, 16 Sep 2021 13:13:55 +0000")
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
Hi,
Guillaume Le Vaillant <glv@posteo.net> skribis:
> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> On ‘core-updates-frozen’, CMake has one test failure on i686-linux when
>> building on berlin (e.g., <https://ci.guix.gnu.org/build/790602/log/raw>):
>>
>> --8<---------------cut here---------------start------------->8---
>> 545/558 Test #518: RunCMake.CPack_TXZ ................................***Failed 3.79 sec
>> [...]
>> --8<---------------cut here---------------end--------------->8---
>>
>> I cannot reproduce it on hardware with 32 cores. I suspect it has to do
>> with the number of threads used for xz compression, which defaults to
>> the number of cores, and some of the build machines on berlin have way
>> more cores.
>>
>> Ludo’.
>
> I tried a few times on a machine with 16 cores, and I can't reproduce
> either. The build succeeded every time.
My latest attempt is to go as far as setting the number of threads used
by libarchive to 1 (patch attached). However, that still fails
systematically on berlin’s 32-core build machines.
The Internet doesn’t seem to have much to say about this problem.
Ideas anyone?
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2236 bytes --]
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index f76ee3ff3a..a235d922e0 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -92,7 +92,7 @@ using the CMake build system.")
;;; Build phases shared between 'cmake-bootstrap' and the later variants
;;; that use cmake-build-system.
-(define %common-build-phases
+(define (%common-build-phases)
`((add-after 'unpack 'split-package
;; Remove files that have been packaged in other package recipes.
(lambda _
@@ -100,6 +100,18 @@ using the CMake build system.")
(substitute* "Auxiliary/CMakeLists.txt"
((".*cmake-mode.el.*") ""))
#t))
+ ,@(let ((system (or (%current-target-system) (%current-system))))
+ (if (or (string-prefix? "i686-" system)
+ (string-prefix? "i586-" system))
+ '((add-after 'unpack 'clamp-xz-thread-number
+ (lambda _
+ ;; By default, 'CPack' would use as many threads as the
+ ;; number of available cores for xz compression.
+ ;; However, this leads to test failures: <XXX>.
+ (substitute* "Source/cmArchiveWrite.cxx"
+ (("case CompressXZ:")
+ "case CompressXZ: numThreads = 1;\n")))))
+ '()))
(add-before 'configure 'patch-bin-sh
(lambda _
;; Replace "/bin/sh" by the right path in... a lot of
@@ -188,7 +200,7 @@ using the CMake build system.")
" --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
#:phases
(modify-phases %standard-phases
- ,@%common-build-phases
+ ,@(%common-build-phases)
(add-before 'configure 'set-paths
(lambda _
;; Help cmake's bootstrap process to find system libraries
@@ -295,7 +307,7 @@ and workspaces that can be used in the compiler environment of your choice.")
#:build-type "Release"
#:phases
(modify-phases %standard-phases
- ,@%common-build-phases
+ ,@(%common-build-phases)
(add-after 'install 'delete-help-documentation
(lambda* (#:key outputs #:allow-other-keys)
(delete-file-recursively
next prev parent reply other threads:[~2021-09-16 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 9:41 bug#50617: [core-updates-frozen] CMake fails to build on i686-linux Ludovic Courtès
2021-09-16 13:13 ` Guillaume Le Vaillant
2021-09-16 15:20 ` Ludovic Courtès [this message]
2021-09-16 16:21 ` Maxime Devos
2021-09-17 7:05 ` Ludovic Courtès
2021-09-21 8:21 ` Ludovic Courtès
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=87h7ek1r9s.fsf@inria.fr \
--to=ludovic.courtes@inria.fr \
--cc=50617@debbugs.gnu.org \
--cc=glv@posteo.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).