Skip to content

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

Closed

Description

@lolbinarycat

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

Activity

  1. added
    A-linkageArea: linking into static, shared libraries and binaries
    C-bugCategory: This is a bug.
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Jan 11, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 11, 2025
  3. jieyouxu commented on Jan 11, 2025

    @jieyouxu
    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.

  4. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 11, 2025
  5. jieyouxu commented on Jan 11, 2025

    @jieyouxu
    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
    
  6. lolbinarycat commented on Jan 11, 2025

    @lolbinarycat
    ContributorAuthor

    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.

  7. added
    A-compiletestArea: The compiletest test runner
    E-needs-investigationCall for participation: This issues needs some investigation to determine current status
    and removed
    A-linkageArea: linking into static, shared libraries and binaries
    on Jan 11, 2025
  8. jieyouxu commented on Jan 12, 2025

    @jieyouxu
  9. 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[/+] on Jan 12, 2025
  10. 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[/+] on Jan 12, 2025
  11. 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[/+] on Jan 12, 2025
  12. added a commit that references this issue on Jan 12, 2025
    1380549
  13. added a commit that references this issue on Jan 12, 2025
    39f7a5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerC-bugCategory: This is a bug.E-needs-investigationCall for participation: This issues needs some investigation to determine current statusT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions