Skip to content

run-make tests no longer work at stage 0 at all #135373

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

Closed
lolbinarycat opened this issue Jan 11, 2025 · 4 comments · Fixed by #135389
Closed

run-make tests no longer work at stage 0 at all #135373

lolbinarycat opened this issue Jan 11, 2025 · 4 comments · Fixed by #135389
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@lolbinarycat
Copy link
Contributor

this is useful for run-make tests that actually test tools or the standard library, and not the compiler itself, however it now seems to just result in a linker error.

command: COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/

error:

[run-make] tests/run-make/rustdoc-default-output ... F


failures:

---- [run-make] tests/run-make/rustdoc-default-output stdout ----

error: rmake recipe failed to complete
status: exit status: 127
command: cd "/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-default-output/rmake_out" && env -u RUSTFLAGS AR="ar" CARGO="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" CC="gcc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" CXX="g++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" HOST_RPATH_DIR="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/lib" LD_LIBRARY_PATH="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/lib:/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin:/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_COMPONENTS="" LLVM_FILECHECK="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/nix/store/k5inwzpp6a0295pd3nfckk9hq8wmifhz-nodejs-20.15.1/bin/node" PYTHON="/home/binarycat/.nix-inst-profile/bin/python3" RUSTC="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" RUSTDOC="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustdoc" SOURCE_ROOT="/home/binarycat/src/rs/rust" TARGET="x86_64-unknown-linux-gnu" TARGET_RPATH_DIR="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" TARGET_RPATH_ENV="/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-default-output/rmake_out:/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0/lib" "/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-default-output/rmake"
stdout: none
--- stderr -------------------------------
/home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-default-output/rmake: error while loading shared libraries: libstd-96b6fb01dfb1a1ef.so: cannot open shared object file: No such file or directory
------------------------------------------



failures:
    [run-make] tests/run-make/rustdoc-default-output

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 382 filtered out; finished in 1.97s
@lolbinarycat lolbinarycat added A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 11, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 11, 2025
@jieyouxu
Copy link
Member

You need both COMPILETEST_FORCE_STAGE0 and --stage 0, and this is intentional (in the current configuration):

COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/ --stage 0
  • COMPILETEST_FORCE_STAGE0=1 instructs compiletest to set --sysroot to stage0-sysroot, and is also explicitly used to signal that not all run-make tests will pass if you force stage 0.
  • You also need --stage 0 for the bootstrap-side for things to properly line up staging wise, including to use properly staged compiler/std.

This is documented in https://rustc-dev-guide.rust-lang.org/tests/compiletest.html?highlight=COMPILETEST_FOR#quickly-check-if-rmakers-tests-can-be-compiled.

@jieyouxu jieyouxu closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 11, 2025
@jieyouxu
Copy link
Member

FTR, even with COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/ --stage 0 this fails because the current rustdoc-flow implementation seems to link against a wrong std:

/home/joe/repos/rust/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-default-output/rmake: error while loading shared libraries: libstd-8ed685ab045ab644.so: cannot open shared object file: No such file or directory

@lolbinarycat
Copy link
Contributor Author

FTR, even with COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/ --stage 0 this fails because the current rustdoc-flow implementation seems to link against a wrong std

yes... that's what this issue is about.

you don't need --stage 0 if you have config.toml set up the correct way.

@lolbinarycat lolbinarycat reopened this Jan 11, 2025
@jieyouxu jieyouxu marked this as a duplicate of #135382 Jan 11, 2025
@jieyouxu jieyouxu added A-compiletest Area: The compiletest test runner E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status and removed A-linkage Area: linking into static, shared libraries and binaries labels Jan 11, 2025
@jieyouxu

This comment has been minimized.

@jieyouxu jieyouxu changed the title run-make tests can no longer be run as stage0 /test/run-make/rustdoc-default-output can no longer be run as stage0 Jan 12, 2025
@jieyouxu jieyouxu changed the title /test/run-make/rustdoc-default-output can no longer be run as stage0 tests/run-make/rustdoc-default-output can no longer be run as stage0 Jan 12, 2025
@jieyouxu jieyouxu changed the title tests/run-make/rustdoc-default-output can no longer be run as stage0 run-make tests no longer work at stage 0 at all Jan 12, 2025
@bors bors closed this as completed in 1380549 Jan 12, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 12, 2025
Rollup merge of rust-lang#135389 - jieyouxu:fix-stage0-rustdoc-rmake, r=onur-ozkan

compiletest: include stage0-sysroot libstd dylib in recipe dylib search path

To fix some of the failures in `COMPILETEST_FORCE_STAGE0=1 ./x test run-make --stage 0`. Specifically,

```
COMPILETEST_FORCE_STAGE0=1 ./x test tests/run-make/rustdoc-default-output/ --stage 0
```

should now pass.

Fixes rust-lang#135373. (As in, make *some* of the `run-make` tests pass, other `run-make` tests fail for various reasons against stage0, and generally `run-make` tests are not guaranteed to pass at stage 0.)

cc `@lolbinarycat`

r? bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner C-bug Category: This is a bug. E-needs-investigation Call for partcipation: This issues needs some investigation to determine current status T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Development

Successfully merging a pull request may close this issue.

3 participants