Closed
Description
Rust 1.70 build on Solaris sometimes files on some machines:
Building tool rustfmt (stage2 -> stage3)
Compiling cc v1.0.77
Compiling camino v1.0.9
Compiling rustfmt-nightly v1.5.2 (/scratch/psumbera/userland-test/components/rust/rustc/rustc-1.70.0-src/src/tools/rustfmt)
Compiling yansi-term v0.1.2
Compiling getopts v0.2.21
Compiling unicode_categories v0.1.1
Compiling unicode-segmentation v1.10.0
Compiling diff v0.1.13
Compiling bytecount v0.6.2
Compiling dirs-sys-next v0.1.2
Compiling dirs-sys v0.3.6
Compiling rustfmt-config_proc_macro v0.3.0 (/scratch/psumbera/userland-test/components/rust/rustc/rustc-1.70.0-src/src/tools/rustfmt/config_proc_macro)
Compiling derive-new v0.5.8
Compiling env_logger v0.9.0
Compiling cargo-platform v0.1.2
Compiling toml v0.5.7
Compiling dirs-next v2.0.0
Compiling dirs v4.0.0
Compiling annotate-snippets v0.9.1
Compiling term v0.7.0
Compiling cargo_metadata v0.14.0
Compiling libz-sys v1.1.3
Compiling rustc-workspace-hack v1.0.0 (/scratch/psumbera/userland-test/components/rust/rustc/rustc-1.70.0-src/src/tools/rustc-workspace-hack)
Finished release [optimized] target(s) in 2m 41s
Build completed successfully in 2:11:14
Building bootstrap
Finished dev [unoptimized] target(s) in 1.38s
warning: file locking not supported for target, not locking build directory
thread 'main' panicked at '`rustc` not found in /scratch/psumbera/userland-test/components/rust/rustc/build/sparcv9/build/bootstrap/debug/deps, run `cargo build --bins` before `cargo run`', lib.rs:415:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:02
make[1]: *** [Makefile:13: all] Error 1
make[1]: Leaving directory '/scratch/psumbera/userland-test/components/rust/rustc/build/sparcv9'
'/usr/gnu/bin/make' failed with error code 2!
Running a cleanup program to restore the state.
gmake[1]: Entering directory '/scratch/psumbera/userland-test/components/rust/rustc/build/sparcv9'
Building bootstrap
Finished dev [unoptimized] target(s) in 1.25s
warning: file locking not supported for target, not locking build directory
thread 'main' panicked at '`rustc` not found in /scratch/psumbera/userland-test/components/rust/rustc/build/sparcv9/build/bootstrap/debug/deps, run `cargo build --bins` before `cargo run`', lib.rs:415:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:01
gmake[1]: *** [Makefile:25: clean] Error 1
gmake[1]: Leaving directory '/scratch/psumbera/userland-test/components/rust/rustc/build/sparcv9'
Failed to run cleanup program, terminating prematurely...
I wonder whether it can do something with: warning: file locking not supported for target, not locking build directory
?!
Activity
jyn514 commentedon Jun 19, 2023
are you running
make
in parallel? that's not supported on solaris (you made the PR removing the build locking IIRC).psumbera commentedon Jun 19, 2023
I see it does:
/usr/gnu/bin/make -j 16 -l 32
.I think I should look once again if it's possible make
fd-lock
to use fcntl locking (as it's now in `rustix...You can close the bug. Thank you!
psumbera commentedon Jun 21, 2023
Adding reference to main proble -
fd-lock
isn't supported on Solaris due missingflock()
syscall).#103630
psumbera commentedon Jun 21, 2023
@jyn514 I'm confused now. I have seen the same error even with
make -j 1
(just one ocurance, not two as mentioned above).Also tried to dig closely how locking works and put into
fd-lock
some debug prints with process id and lock file name. But later when I was inspecting still running process it didn't have any lock file open. No file descriptor no lock?!jyn514 commentedon Jun 21, 2023
@psumbera did you clear the cache before running
make -j1
? if the build directory gets into an inconsistent state we don't recover it automatically.i don't know what's going on with fd-lock, but the file that bootstrap locks is
build/lock
.psumbera commentedon Jun 21, 2023
Everything is removed before new build...
jyn514 commentedon Jun 21, 2023
exactly what command are you running and what is your config.toml?
psumbera commentedon Jun 21, 2023
If I see it right, lock file is created/opened here:
rust/src/bootstrap/bin/main.rs
Line 25 in 536635c
and the file descriptor for the lock file is closed on block exit here:
rust/src/bootstrap/bin/main.rs
Line 38 in 536635c
Isn't it mean that locking isn't working even on Linux?
jyn514 commentedon Jun 21, 2023
no, it's declared outside the block
rust/src/bootstrap/bin/main.rs
Line 21 in 536635c
psumbera commentedon Jun 21, 2023
Right. Unfortunatelly version 1.70.0 hasn't fix for this (my) regression. And the declaration is still insde the block.
15 remaining items