Skip to content

guix openssl-sys-0_9_61_H1 run failure (was: bootstrapping 1.54.0 with mrustc parallel build failure) #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Apteryks opened this issue Dec 7, 2024 · 13 comments

Comments

@Apteryks
Copy link

Apteryks commented Dec 7, 2024

Hello,

When building rust/cargo 1.54.0 with mrustc (latest commit, 1827564) I get:

(67/111) BUILDING sized_chunks from sized-chunks v0.6.4 with features [std]
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/sized-chunks/src/lib.rs -o output/cargo-build/libsized_chunks-0_6_4_H10.rlib --crate-name sized_chunks --crate-type rlib -C emit-depfile=output/cargo-build/libsized_chunks-0_6_4_H10.rlib.d --crate-tag 0_6_4_H10 --cfg debug_assertions -O -L output -L output/cargo-build --cfg feature="std" --edition 2018 --extern bitmaps=output/cargo-build/libbitmaps-2_1_0_H1.rlib --extern typenum=output/cargo-build/libtypenum-1_12_0.rlib
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_getrandom-0_1_14_H20_run
> /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/getrandom-0.1.14/output/cargo-build/build_getrandom-0_2_0_H40_run
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/getrandom-0.1.14/output/cargo-build/build_getrandom-0_2_0_H40_run' - No such file or directory
Calling /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/getrandom-0.1.14/output/cargo-build/build_getrandom-0_2_0_H40_run failed (see /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_getrandom-0_2_0_H40.txt_failed.txt for stdout)
(68/111) BUILDING getrandom v0.1.14 with features [std]
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/getrandom-0.1.14/src/lib.rs -o output/cargo-build/libgetrandom-0_1_14_H20.rlib --crate-name getrandom --crate-type rlib -C emit-depfile=output/cargo-build/libgetrandom-0_1_14_H20.rlib.d --crate-tag 0_1_14_H20 --cfg debug_assertions -O -L output -L output/cargo-build --cfg feature="std" --edition 2018 --extern cfg_if=output/cargo-build/libcfg_if-0_1_10.rlib --extern libc=output/cargo-build/liblibc-0_2_95_H21.rlib
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory
TTStream:0: warn:0:Unknown cfg() param 'features'
rustc-1.54.0-src/vendor/clap/src/suggestions.rs:112: note: From here
TTStream:0: warn:0:Unknown cfg() param 'features'
rustc-1.54.0-src/vendor/clap/src/suggestions.rs:113: note: From here
BUILD FAILED
make: *** [minicargo.mk:235: 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" "CFLAGS=-std=gnu11" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 818.5 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" "CFLAGS=-std=gnu11" "OUTDIR_SUF=" failed with status 2
build process 18 exited with status 256
builder for `/gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv' failed with exit code 1
build of /gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv failed
View build log at '/var/log/guix/drvs/7c/0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv'.
guix build: error: build of `/gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv' failed

real	13m50,327s
user	0m2,410s
sys	0m0,144s

That appears to be an issue with building with many cores (my machine uses -j32).

@thepowersgang
Copy link
Owner

The failure on build_getrandom-0_2_0_H40_run is slightly interesting, as it should already have been built with the reworked job system. Could you check if it was reported as completed earlier in the build log?

However: Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory
That seems very strange, as that should already exist - as that's the compiler. That points to something strange with your filesystem.

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

Regarding the first problem, it gets build first here, I think:

�[32m(68/175) BUILDING memmap2 v0.2.3�[0m
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/getrandom/build.rs --crate-name build --crate-type bin -o output/rustc-build/build_getrandom-0_2_0_H40_run -L output/rustc-build -L output --cfg feature=std --edition 2018

Then later I see:

�[32m(76/175) BUILDING block_buffer from block-buffer v0.9.0�[0m
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/digest/src/lib.rs -o output/rustc-build/libdigest-0_9_0_H9.rlib --crate-name digest --crate-type rlib -C emit-depfile=output/rustc-build/libdigest-0_9_0_H9.rlib.d --crate-tag 0_9_0_H9 --cfg debug_assertions -O -L output -L output/rustc-build --cfg feature="std" --cfg feature="alloc" --edition 2018 --extern generic_array=output/rustc-build/libgeneric_array-0_14_4.rlib
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/block-buffer/src/lib.rs -o output/rustc-build/libblock_buffer-0_9_0.rlib --crate-name block_buffer --crate-type rlib -C emit-depfile=output/rustc-build/libblock_buffer-0_9_0.rlib.d --crate-tag 0_9_0 --cfg debug_assertions -O -L output -L output/rustc-build --edition 2018 --extern generic_array=output/rustc-build/libgeneric_array-0_14_4.rlib
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/rustc-build/build_getrandom-0_2_0_H40_run

I'm attaching the complete build log.
rust-1.54.0-build.log

Regarding the second error, I doubt there's a problem with my file system; it's Btrfs on a NVMe drive; the build happens in its own container without access to the rest of the file system or network, and I don't see anything spelling trouble in dmesg.

I've tried to reproduce it and with 2 new builds so far haven't succeeded, so it's potentially difficult to trigger.

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

Oh, but I see other similar reports by fellow Guix contributors in https://issues.guix.gnu.org/74142, complete with logs.

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

And also https://issues.guix.gnu.org/57879

@thepowersgang
Copy link
Owner

thepowersgang commented Dec 7, 2024

Please confirm that you are using the latest version of mrustc, as that log output doesn't match the output of the most recent version of minicargo (with the fixed job sequencing).

There should be messages when each job is completed (e.g. Completed rustc_std_workspace_std) and also messages showing the number of running tasks with percentage completion.
Ref: https://github.com/thepowersgang/mrustc/blob/master/tools/minicargo/jobs.cpp#L282 and https://github.com/thepowersgang/mrustc/blob/master/tools/minicargo/jobs.cpp#L60-L74

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

I was able to reproduce on a 3rd build:

(61/175) BUILDING polonius_engine from polonius-engine v0.12.1
(62/175) BUILDING ena v0.14.0
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/polonius-engine/src/lib.rs -o output/rustc-build/libpolonius_engine-0_12_1.rlib --crate-name polonius_engine --crate-type rlib -C emit-depfile=output/rustc-build/libpolonius_engine-0_12_1.rlib.d --crate-tag 0_12_1 --cfg debug_assertions -O -L output -L output/rustc-build --extern datafrog=output/rustc-build/libdatafrog-2_0_1.rlib --extern log=output/rustc-build/liblog-0_4_14_H20000.rlib --extern rustc_hash=output/rustc-build/librustc_hash-1_1_0_H1.rlib
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/ena/src/lib.rs -o output/rustc-build/libena-0_14_0.rlib --crate-name ena --crate-type rlib -C emit-depfile=output/rustc-build/libena-0_14_0.rlib.d --crate-tag 0_14_0 --cfg debug_assertions -O -L output -L output/rustc-build --extern log=output/rustc-build/liblog-0_4_14_H20000.rlib
(63/175) BUILDING unicode_normalization from unicode-normalization v0.1.18 with features [std]
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/unicode-normalization/src/lib.rs -o output/rustc-build/libunicode_normalization-0_1_18_H1.rlib --crate-name unicode_normalization --crate-type rlib -C emit-depfile=output/rustc-build/libunicode_normalization-0_1_18_H1.rlib.d --crate-tag 0_1_18_H1 --cfg debug_assertions -O -L output -L output/rustc-build --cfg feature="std" --edition 2018 --extern tinyvec=output/rustc-build/libtinyvec-1_2_0_H81.rlib
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/rustc-build/build_num-traits-0_2_14_run
Ignoring `--emit llvm-ir` for compatability with rustc
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/rustc-build/build_crossbeam-utils-0_7_2_Ha_run
Ignoring `--emit llvm-ir` for compatability with rustc
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/rustc-build/build_memoffset-0_5_5_run
> /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/memoffset-0.5.5/output/rustc-build/build_indexmap-1_6_2_run
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/memoffset-0.5.5/output/rustc-build/build_indexmap-1_6_2_run' - No such file or directory
Calling /tmp/guix-build-rust-1.54.0.drv-0/rustc-1.54.0-src/vendor/memoffset-0.5.5/output/rustc-build/build_indexmap-1_6_2_run failed (see /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/rustc-build/build_indexmap-1_6_2.txt_failed.txt for stdout)
Ignoring `--emit llvm-ir` for compatability with rustc
Ignoring `--emit llvm-ir` for compatability with rustc
Ignoring `--emit llvm-ir` for compatability with rustc
(64/175) BUILDING memoffset v0.5.5
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/memoffset-0.5.5/src/lib.rs -o output/rustc-build/libmemoffset-0_5_5.rlib --crate-name memoffset --crate-type rlib -C emit-depfile=output/rustc-build/libmemoffset-0_5_5.rlib.d --crate-tag 0_5_5 --cfg debug_assertions -O -L output -L output/rustc-build --cfg allow_clippy --cfg maybe_uninit --cfg doctests
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory
Ignoring `--emit llvm-ir` for compatability with rustc
Ignoring `--emit llvm-ir` for compatability with rustc
(65/175) BUILDING num_traits from num-traits v0.2.14
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/num-traits/src/lib.rs -o output/rustc-build/libnum_traits-0_2_14.rlib --crate-name num_traits --crate-type rlib -C emit-depfile=output/rustc-build/libnum_traits-0_2_14.rlib.d --crate-tag 0_2_14 --cfg debug_assertions -O -L output -L output/rustc-build --cfg has_i128 --cfg has_to_int_unchecked
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory
Ignoring `--emit llvm-ir` for compatability with rustc
Ignoring `--emit llvm-ir` for compatability with rustc
Ignoring `--emit llvm-ir` for compatability with rustc
-:1: error:0:Couldn't find type name 'AtomicU128' of ::"core-0_0_0"::sync::atomic::AtomicU128/*?*/
(66/175) BUILDING crossbeam_utils from crossbeam-utils v0.7.2 with features [std,lazy_static]
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/crossbeam-utils-0.7.2/src/lib.rs -o output/rustc-build/libcrossbeam_utils-0_7_2_Ha.rlib --crate-name crossbeam_utils --crate-type rlib -C emit-depfile=output/rustc-build/libcrossbeam_utils-0_7_2_Ha.rlib.d --crate-tag 0_7_2_Ha --cfg debug_assertions -O -L output -L output/rustc-build --cfg has_min_const_fn --cfg has_atomic_u8 --cfg has_atomic_u16 --cfg has_atomic_u32 --cfg has_atomic_u64 --cfg feature="std" --cfg feature="lazy_static" --extern cfg_if=output/rustc-build/libcfg_if-0_1_10.rlib --extern lazy_static=output/rustc-build/liblazy_static-1_4_0.rlib
Unable to run process '/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc' - No such file or directory
BUILD FAILED
make: *** [minicargo.mk:228: output/rustc] Error 1
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-f" "minicargo.mk" "output/rustc" "RUSTC_TARGET=x86_64-unknown-linux-gnu" "RUSTC_VERSION=1.54.0" "MRUSTC_TARGET_VER=1.54" "CFLAGS=-std=gnu11" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 243.2 seconds
command "make" "-f" "minicargo.mk" "output/rustc" "RUSTC_TARGET=x86_64-unknown-linux-gnu" "RUSTC_VERSION=1.54.0" "MRUSTC_TARGET_VER=1.54" "CFLAGS=-std=gnu11" "OUTDIR_SUF=" failed with status 2
build process 18 exited with status 256
builder for `/gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv' failed with exit code 1
build of /gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv failed
View build log at '/var/log/guix/drvs/7c/0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv'.
guix build: error: build of `/gnu/store/7c0i0bymjhn6psr3x29j6ira733b6m5y-rust-1.54.0.drv' failed

real	4m10,810s
user	0m2,352s
sys	0m0,132s

Full log attached.
rust-1.54-0_2.log

@thepowersgang
Copy link
Owner

thepowersgang commented Dec 7, 2024

The log you originally posted claims to be for revision 1827564, but doesn't have tools/minicargo/jobs.cpp? That is very strange.

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

Please confirm that you are using the latest version of mrustc, as that log output doesn't match the output of the most recent version of minicargo (with the fixed job sequencing).

Oh, it seems I borked my update of mrustc... was still using the v0.10.1 tag. I'll try again, probably resolved then :-).

@Apteryks
Copy link
Author

Apteryks commented Dec 7, 2024

OK, now I'm confident I'm on the latest revision 1827564 (sorry for the earlier mishaps!), and could still trigger a failure:

--- BUILDING regex v1.5.4 (72.5% 6r,0w,40b/167t)
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/regex/src/lib.rs -o output/cargo-build/libregex-1_5_4_H1fffb.rlib -C emit-depfile=output/cargo-build/libregex-1_5_4_H1fffb.rlib.d --cfg debug_assertions -O -L output -L output/cargo-build --cfg feature="std" --cfg feature="perf" --cfg feature="perf-cache" --cfg feature="perf-dfa" --cfg feature="perf-inline" --cfg feature="perf-literal" --cfg feature="aho-corasick" --cfg feature="memchr" --cfg feature="unicode" --cfg feature="regex-syntax/default" --cfg feature="unicode-age" --cfg feature="unicode-bool" --cfg feature="unicode-case" --cfg feature="unicode-gencat" --cfg feature="unicode-perl" --cfg feature="unicode-script" --cfg feature="unicode-segment" --crate-name regex --crate-type rlib --crate-tag 1_5_4_H1fffb --edition 2018 --extern aho_corasick=output/cargo-build/libaho_corasick-0_7_13_H1.rlib --extern memchr=output/cargo-build/libmemchr-2_4_0_H6.rlib --extern regex_syntax=output/cargo-build/libregex_syntax-0_6_25_Hff.rlib > output/cargo-build/libregex-1_5_4_H1fffb.rlib_dbg.txt
 (72.5% 6r,0w,40b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, libnghttp2-sys v0.1.4 (script run), openssl-sys v0.9.61 (build), regex v1.5.4
Completed openssl-sys v0.9.61 (build)
 (73.1% 5r,0w,40b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, libnghttp2-sys v0.1.4 (script run), regex v1.5.4
--- RUNNING openssl-sys v0.9.61 (script run) (73.1% 6r,0w,39b/167t)
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1_run > /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1.txt
 (73.1% 6r,0w,39b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, libnghttp2-sys v0.1.4 (script run), regex v1.5.4, openssl-sys v0.9.61 (script run)
Ignoring `--emit llvm-ir` for compatability with rustc
Completed libnghttp2-sys v0.1.4 (script run)
 (73.7% 5r,0w,39b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, regex v1.5.4, openssl-sys v0.9.61 (script run)
--- BUILDING libnghttp2-sys v0.1.4 (73.7% 6r,0w,38b/167t)
> /tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc rustc-1.54.0-src/vendor/libnghttp2-sys/src/lib.rs -o output/cargo-build/liblibnghttp2_sys-0_1_4.rlib -C emit-depfile=output/cargo-build/liblibnghttp2_sys-0_1_4.rlib.d --cfg debug_assertions -O -L output -L output/cargo-build --crate-name libnghttp2_sys --crate-type rlib --crate-tag 0_1_4 -L /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_libnghttp2-sys-0_1_4/i/lib -l nghttp2 --extern libc=output/cargo-build/liblibc-0_2_95_H21.rlib > output/cargo-build/liblibnghttp2_sys-0_1_4.rlib_dbg.txt
 (73.7% 6r,0w,38b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, regex v1.5.4, openssl-sys v0.9.61 (script run), libnghttp2-sys v0.1.4
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', :0:0
Process was terminated with signal 6
FAILING COMMAND: /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1_run
Env:  CARGO_FEATURE_VENDORED=1 CARGO_FEATURE_OPENSSL_SRC=1 OUT_DIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1 CARGO_MANIFEST_DIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/rustc-1.54.0-src/vendor/openssl-sys CARGO_PKG_NAME=openssl-sys CARGO_PKG_VERSION=0.9.61 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=9 CARGO_PKG_VERSION_PATCH=61 TARGET=x86_64-unknown-linux-gnu HOST=x86_64-unknown-linux-gnu NUM_JOBS=1 OPT_LEVEL=2 DEBUG=0 PROFILE=release RUSTC=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc MRUSTC_LIBDIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/output CARGO_CFG_TARGET_VENDOR= CARGO_CFG_TARGET_VENDOR=gnu CARGO_CFG_TARGET_POINTER_WIDTH=64 CARGO_CFG_TARGET_OS=linux CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=ptr CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=64 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=32 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=16 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=8 CARGO_CFG_RUST_COMPILER=mrustc CARGO_CFG_TARGET_ENDIAN=little CARGO_CFG_TARGET_ARCH=x86_64 CARGO_CFG_TARGET_ENV=gnu CARGO_CFG_TARGET_HAS_ATOMIC=cas CARGO_CFG_TARGET_HAS_ATOMIC=ptr CARGO_CFG_TARGET_HAS_ATOMIC=64 CARGO_CFG_TARGET_HAS_ATOMIC=32 CARGO_CFG_TARGET_HAS_ATOMIC=16 CARGO_CFG_TARGET_HAS_ATOMIC=8 CARGO_CFG_TARGET_FAMILY=unix CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=ptr CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=64 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=32 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=16 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=8 CARGO_CFG_UNIX=1 CARGO_CFG_LINUX=1
Calling output/cargo-build/build_openssl-sys-0_9_61_H1_run failed (see output/cargo-build/build_openssl-sys-0_9_61_H1.txt_failed.txt for stdout)
 (74.3% 5r,0w,38b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, regex v1.5.4, libnghttp2-sys v0.1.4
Completed libnghttp2-sys v0.1.4
 (74.9% 4r,0w,38b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72, regex v1.5.4
Completed regex v1.5.4
 (75.4% 3r,0w,38b/167t): crc32fast v1.2.1, clap v2.33.3, syn v1.0.72
Completed clap v2.33.3
 (76.0% 2r,0w,38b/167t): crc32fast v1.2.1, syn v1.0.72
Completed crc32fast v1.2.1
 (76.6% 1r,0w,38b/167t): syn v1.0.72
Completed syn v1.0.72
 (77.2% 0r,0w,38b/167t):
BUILD FAILED
make: *** [minicargo.mk:262: 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" "CFLAGS=-std=gnu11" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 803.6 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" "CFLAGS=-std=gnu11" "OUTDIR_SUF=" failed with status 2
build process 18 exited with status 256
builder for `/gnu/store/gxdm2pvvdikps5qgmxl74bpksh55yhxb-rust-1.54.0.drv' failed with exit code 1
build of /gnu/store/gxdm2pvvdikps5qgmxl74bpksh55yhxb-rust-1.54.0.drv failed
View build log at '/var/log/guix/drvs/gx/dm2pvvdikps5qgmxl74bpksh55yhxb-rust-1.54.0.drv'.
guix build: error: build of `/gnu/store/gxdm2pvvdikps5qgmxl74bpksh55yhxb-rust-1.54.0.drv' failed

real	13m50,764s
user	0m6,916s
sys	0m0,157s

Uploading rust-1.54.0-fail-with-mrustc-1827564.log…

Build log attached.

@thepowersgang
Copy link
Owner

That build log link doesn't work, but it doesn't matter - as the error is within the build script this time.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', :0:0
Process was terminated with signal 6
FAILING COMMAND: /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1_run

The file output/cargo-build/build_openssl-sys-0_9_61_H1.txt_failed.txt will have more information, but to know for sure why it failed you may need to run the build script using a debugger to see where that unwrap was. When doing that, make sure to set the full suite of environment variables (printed below the failing command)

@Apteryks
Copy link
Author

Apteryks commented Dec 9, 2024

The output/cargo-build/build_openssl-sys-0_9_61_H1.txt_failed.txt file contains:

Setup: V V V
(0.00 s) Setup: DONE
Target Load: V V V
(0.00 s) Target Load: DONE
Parse: V V V
(0.00 s) Parse: DONE
LoadCrates: V V V
(0.15 s) LoadCrates: DONE
Expand: V V V
(0.00 s) Expand: DONE
- main: params.outfile = /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1/libprobe0.rlib
Implicit Crates: V V V
(0.00 s) Implicit Crates: DONE
Resolve Use: V V V
(0.00 s) Resolve Use: DONE
Resolve Index: V V V
(0.00 s) Resolve Index: DONE
Resolve Absolute: V V V
(0.00 s) Resolve Absolute: DONE
HIR Lower: V V V
(0.00 s) HIR Lower: DONE
Lifetime Elision: V V V
(0.00 s) Lifetime Elision: DONE
Resolve Type Aliases: V V V
(0.00 s) Resolve Type Aliases: DONE
Resolve Bind: V V V
(0.04 s) Resolve Bind: DONE
Resolve UFCS Outer: V V V
(0.00 s) Resolve UFCS Outer: DONE
Resolve HIR Self Type: V V V
(0.00 s) Resolve HIR Self Type: DONE
Resolve HIR Markings: V V V
(0.00 s) Resolve HIR Markings: DONE
Sort Impls: V V V
(0.00 s) Sort Impls: DONE
Resolve UFCS paths: V V V
(0.00 s) Resolve UFCS paths: DONE
Constant Evaluate: V V V
(0.00 s) Constant Evaluate: DONE
Typecheck Outer: V V V
(0.00 s) Typecheck Outer: DONE
Typecheck Expressions: V V V
(0.00 s) Typecheck Expressions: DONE
Expand HIR Annotate: V V V
(0.00 s) Expand HIR Annotate: DONE
Expand HIR Static Borrow Mark: V V V
(0.00 s) Expand HIR Static Borrow Mark: DONE
Expand HIR Lifetimes: V V V
(0.00 s) Expand HIR Lifetimes: DONE
Expand HIR Closures: V V V
(0.00 s) Expand HIR Closures: DONE
Expand HIR Static Borrow: V V V
(0.00 s) Expand HIR Static Borrow: DONE
Expand HIR VTables: V V V
(0.00 s) Expand HIR VTables: DONE
Expand HIR Calls: V V V
(0.00 s) Expand HIR Calls: DONE
Expand HIR Reborrows: V V V
(0.00 s) Expand HIR Reborrows: DONE
Expand HIR ErasedType: V V V
(0.00 s) Expand HIR ErasedType: DONE
Typecheck Expressions (validate): V V V
(0.00 s) Typecheck Expressions (validate): DONE
Lower MIR: V V V
(0.00 s) Lower MIR: DONE
MIR Validate: V V V
(0.00 s) MIR Validate: DONE
MIR Cleanup: V V V
(0.00 s) MIR Cleanup: DONE
MIR Optimise: V V V
(0.00 s) MIR Optimise: DONE
MIR Validate PO: V V V
(0.00 s) MIR Validate PO: DONE
MIR Validate Full: V V V
(0.00 s) MIR Validate Full: DONE
Trans Enumerate: V V V
(0.00 s) Trans Enumerate: DONE
Trans Auto Impls: V V V
(0.00 s) Trans Auto Impls: DONE
Trans Monomorph: V V V
(0.00 s) Trans Monomorph: DONE
MIR Optimise Inline: V V V
(0.00 s) MIR Optimise Inline: DONE
Trans Enumerate Cleanup: V V V
(0.00 s) Trans Enumerate Cleanup: DONE
HIR Serialise: V V V
(0.00 s) HIR Serialise: DONE
Trans Codegen: V V V
Running command - "gcc" @"/tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1/libprobe0.rlib_cmd.txt"
(0.00 s) Trans Codegen: DONE
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset

Running the gcc command it contains succeeds (exit status 0). Hm.

@thepowersgang
Copy link
Owner

That gcc command is just from openssl calling "rustc" (actually mrustc here) to test something.

Could you run the build script under gdb (remember to provide the correct environment, see the dump of environment variables in the log).

A trick for making it easier to debug: Grab the gcc command from the _dbg.txt for the build script (and likely openssl_src too) and run it again, passing -g)

CARGO_FEATURE_VENDORED=1 CARGO_FEATURE_OPENSSL_SRC=1 OUT_DIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1 CARGO_MANIFEST_DIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/rustc-1.54.0-src/vendor/openssl-sys CARGO_PKG_NAME=openssl-sys CARGO_PKG_VERSION=0.9.61 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=9 CARGO_PKG_VERSION_PATCH=61 TARGET=x86_64-unknown-linux-gnu HOST=x86_64-unknown-linux-gnu NUM_JOBS=1 OPT_LEVEL=2 DEBUG=0 PROFILE=release RUSTC=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/bin/mrustc MRUSTC_LIBDIR=/tmp/guix-build-rust-1.54.0.drv-0/mrustc/output CARGO_CFG_TARGET_VENDOR= CARGO_CFG_TARGET_VENDOR=gnu CARGO_CFG_TARGET_POINTER_WIDTH=64 CARGO_CFG_TARGET_OS=linux CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=ptr CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=64 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=32 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=16 CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=8 CARGO_CFG_RUST_COMPILER=mrustc CARGO_CFG_TARGET_ENDIAN=little CARGO_CFG_TARGET_ARCH=x86_64 CARGO_CFG_TARGET_ENV=gnu CARGO_CFG_TARGET_HAS_ATOMIC=cas CARGO_CFG_TARGET_HAS_ATOMIC=ptr CARGO_CFG_TARGET_HAS_ATOMIC=64 CARGO_CFG_TARGET_HAS_ATOMIC=32 CARGO_CFG_TARGET_HAS_ATOMIC=16 CARGO_CFG_TARGET_HAS_ATOMIC=8 CARGO_CFG_TARGET_FAMILY=unix CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=ptr CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=64 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=32 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=16 CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=8 CARGO_CFG_UNIX=1 CARGO_CFG_LINUX=1 gdb /tmp/guix-build-rust-1.54.0.drv-0/mrustc/output/cargo-build/build_openssl-sys-0_9_61_H1_run

@thepowersgang
Copy link
Owner

Also, could you check the source_dir function in the generated C code for openssl_src and check that the path it returns looks sensible (i.e. points to the openssl source)

@thepowersgang thepowersgang changed the title bootstrapping 1.54.0 with mrustc parallel build failure guix openssl-sys-0_9_61_H1 run failure (was: bootstrapping 1.54.0 with mrustc parallel build failure) Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants