Subject: bug#48239: rust-1.19.0 build fails

From: Mark H Weaver <[email-masked]>
Date: Wed, 05 May 2021 15:36:39 -0400

Hi,

Bone Baboon via Bug reports for GNU Guix <[email-masked]> writes:
> On a x86_64 computer when I run `guix build --no-substitutes --cores=1
> rust` it fails during the build phase of rust-1.19.0.

Thanks for the report.

> The build log of rust-1.19.0 is attached.

Here are the last few lines of the log:

--8<---------------cut here---------------start------------->8---
(76/77) BUILDING cargo v0.20.0
BUILDING cargo v0.20.0
"libcore"
command "output/rustc-build/rustc" "-C" "linker=/gnu/store/afpgzln8860m6yfhxy6i8n9rywbp85cy-gcc-7.5.0/bin/gcc" "-Z" "force-unstable-if-unmarked" "-L" "output/target-libs" "src/libcore/lib.rs" "-o" "output/target-libs/libcore.rlib" failed with signal 8
--8<---------------cut here---------------end--------------->8---

On x86_64-linux systems, signal 8 is SIGFPE i.e. a floating-point
exception, or "Erroneous arithmetic operation" as the comment says in
include/bits/signum-generic.h.

Are you aware of any relevant customizations to your kernel
configuration that might possibly be related to this?

For what it's worth, on my Thinkpad X200 (Core 2 Duo) with 4 GB of RAM
and 8 GB of swap, I've been successully building Rust locally using Guix
for many years, as long as I don't run other memory intensive processes
at the same time.

It might be worth trying the build a second time.  Occasionally we see
nondeterministic build failures in some packages, although I don't
recall seeing such failures in Rust.

     Regards,
       Mark

-- 
Disinformation flourishes because many people care deeply about
injustice but very few check the facts.  Ask me about
<https://stallmansupport.org>.