Subject: bug#57879: Non-deterministic build failure in mrustc / rust 1.55

From: Maxime Devos <[email-masked]>
Date: Sat, 17 Sep 2022 12:59:25 +0200

On current core-updates, mrustc ([email-masked]) fails to build:
https://ci.guix.gnu.org/build/1453052/details

End of log:

>> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/url/src/lib.rs -o output/cargo-build/liburl-2_2_2_H1.rlib --crate-name url --crate-type rlib -C emit-depfile=output/cargo-build/liburl-2_2_2_H1.rlib.d --crate-tag 2_2_2_H1 -g --cfg debug_assertions -O -L output -L output/cargo-build --cfg feature="serde" --edition 2018 --extern form_urlencoded=output/cargo-build/libform_urlencoded-1_0_1.rlib --extern idna=output/cargo-build/libidna-0_2_3.rlib --extern matches=output/cargo-build/libmatches-0_1_8.rlib --extern percent_encoding=output/cargo-build/libpercent_encoding-2_1_0.rlib --extern serde=output/cargo-build/libserde-1_0_126_H1a.rlib
>> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_semver-1_0_3_H3_run
>> /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/semver/output/cargo-build/build_serde_json-1_0_64_He0_run
> [31mUnable to run process '/tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/semver/output/cargo-build/build_serde_json-1_0_64_He0_run' - No such file or directory[0m
> Calling /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/semver/output/cargo-build/build_serde_json-1_0_64_He0_run failed (see /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_serde_json-1_0_64_He0.txt_failed.txt for stdout)
> [32m(102/111) BUILDING semver v1.0.3 with features [std,serde][0m
>> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/semver/src/lib.rs -o output/cargo-build/libsemver-1_0_3_H3.rlib --crate-name semver --crate-type rlib -C emit-depfile=output/cargo-build/libsemver-1_0_3_H3.rlib.d --crate-tag 1_0_3_H3 -g --cfg debug_assertions -O -L output -L output/cargo-build --cfg feature="std" --cfg feature="serde" --edition 2018 --extern serde=output/cargo-build/libserde-1_0_126_H1a.rlib
> [31mUnable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory[0m
> BUILD FAILED
> make: *** [minicargo.mk:229: output/cargo] Error 1
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-f" "minicargo.mk" "output/cargo" "RUSTC_TARGET=x86_64-unknown-linux-gnu" "RUSTC_VERSION=1.54.0" "MRUSTC_TARGET_VER=1.54" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f> 
> phase `build' failed after 4672.3 seconds
> command "make" "-f" "minicargo.mk" "output/cargo" "RUSTC_TARGET=x86_64-unknown-linux-gnu" "RUSTC_VERSION=1.54.0" "MRUSTC_TARGET_VER=1.54" "OUTDIR_SUF=" failed with status 2
> builder for `/gnu/store/5a7qhchr3bg539514cia892z7wgxlvfa-rust-1.54.0.drv' failed with exit code 1
> @ build-failed /gnu/store/5a7qhchr3bg539514cia892z7wgxlvfa-rust-1.54.0.drv - 1 builder for `/gnu/store/5a7qhchr3bg539514cia892z7wgxlvfa-rust-1.54.0.drv' failed with exit code 1
> cannot build derivation `/gnu/store/92g0b70l79d9rdd6fhp99ksxqjjcpmwc-rust-1.55.0.drv': 1 dependencies couldn't be built

As it was fine in evaluation 635738 which has guix commit 7e0f2728a46 
and broke in 635752 which has guix commit 5339cb1, at first sight the 
problem appears to have been introduced in 7e0f2728a46..5339cb1. 
However, the log "git log 7e0f2728a46..5339cb1" does not seem to contain 
anything relevant to Rust, and I cannot reproduce locally, so this 
appears to be some kind non-determinism problem.

To continue with antioxidant, I'd like the build to be restarted.

Greetings,
Maxime.