Skip to content
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

Rustc bootstrap build is unable to find crates in poky after 1.76 version update #122075

Closed
Yashinde145 opened this issue Mar 6, 2024 · 24 comments
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Yashinde145
Copy link

I am building rust 1.76 and then testing it using the same command(python3 src/bootstrap/bootstrap.py test test_suites_names --target x86_64-poky-linux-gnu in poky environment) as mentioned in #115642 (comment).

While bootstrapping the rustc for poky target(x86_64-poky-linux-gnu), the build is unable to fetch the standard crates and macros and thus the build fails. Since, the build is not completed successfully, testing also doesn't take place. This didn't happened till rust 1.75.

The following is a small portion of error log:

error[E0463]: can't find crate for `std` 
error[E0463]: can't find crate for `core`
error[E0463]: can't find crate for `compiler_builtins`
.
.   many more similar errors
.
error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /rust/deps/quote-1.0.29/build.rs:33:25
   |
33 |     if pieces.next() != Some("rustc 1") {
   |                         ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /rust/deps/quote-1.0.29/build.rs:37:5
   |
37 |     Some(RustcVersion { minor })
   |     ^^^^ not found in this scope
   .
   .   many more similar erorrs
   .
error: cannot find macro `format` in this scope
   --> /rust/deps/autocfg/src/lib.rs:333:19
    |
333 |             emit(&format!("has_{}", mangle(name)));
    |                   ^^^^^^

Complete log file is attached for more details. (Build log starts from line 65)

Are there any significant changes with respect to building rustc and crates on custom targets from 1.75 to 1.76? I tried to check the release notes but couldn't find.

Am I missing something or doing anything wrong?

@Yashinde145 Yashinde145 added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Mar 6, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 6, 2024
@jieyouxu jieyouxu added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 6, 2024
@apiraino
Copy link
Contributor

apiraino commented Mar 6, 2024

maybe cc: @onur-ozkan since they helped last time?

@rustbot label -I-prioritize

@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 6, 2024
@onur-ozkan
Copy link
Member

Thanks for the ping. I will check it in couple days.

@onur-ozkan onur-ozkan self-assigned this Mar 6, 2024
@onur-ozkan
Copy link
Member

error[E0463]: can't find crate for `std` 
error[E0463]: can't find crate for `core`
error[E0463]: can't find crate for `compiler_builtins`
.
.   many more similar errors
.
error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /rust/deps/quote-1.0.29/build.rs:33:25
   |
33 |     if pieces.next() != Some("rustc 1") {
   |                         ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /rust/deps/quote-1.0.29/build.rs:37:5
   |
37 |     Some(RustcVersion { minor })
   |     ^^^^ not found in this scope
   .
   .   many more similar erorrs
   .
error: cannot find macro `format` in this scope
   --> /rust/deps/autocfg/src/lib.rs:333:19
    |
333 |             emit(&format!("has_{}", mangle(name)));
    |                   ^^^^^^

Complete log file is attached for more details. (Build log starts from line 65)

I can't see which build step is failing in the error log. Can you share it as well ? @Yashinde145

@Yashinde145
Copy link
Author

The build fails when Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu) (line no 423) after Compiling dissimilar v1.0.6 (line no 577)

At the end of the log file, it has the command which fails (line no 11982)

- cd "/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_poky_linux_gnu="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1-rustc" CARGO_TARGET_X86_64_POKY_LINUX_GNU_LINKER="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-ccld" CARGO_TARGET_X86_64_POKY_LINUX_GNU_RUNNER="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client run 0" CC_x86_64_poky_linux_gnu="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-poky-linux-gnu" CFG_DEFAULT_CODEGEN_BACKEND="llvm" CFG_DISABLE_UNSTABLE_FEATURES="1" CFG_LIBDIR_RELATIVE="lib" CFG_LLVM_ROOT="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config" CFG_RELEASE="1.76.0" CFG_RELEASE_CHANNEL="stable" CFG_VERSION="1.76.0 (07dca489a 2024-02-04) (built from a source tarball)" CFG_VER_DATE="2024-02-04" CFG_VER_HASH="07dca489ac2d933c78d3c5158e3f43beefeb02ce" CFG_VIRTUAL_RUST_SOURCE_BASE_DIR="/rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce" CFLAGS_x86_64_poky_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_poky_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_poky_linux_gnu="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-cxx" LD_LIBRARY_PATH="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-poky-linux-gnu/lib:/home/testuser/lib" LIBC_CHECK_CFG="1" LLVM_CONFIG="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/recipe-sysroot/usr/lib/llvm-rust/bin/llvm-config" LLVM_NDEBUG="1" RANLIB_x86_64_poky_linux_gnu="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-ar s" REAL_LIBRARY_PATH="/home/testuser/lib" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-poky-linux-gnu/native" RUSTC="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/bootstrap/debug/rustc" RUSTC_BLESS="Gesundheit" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_CARGO_REGISTRY_SRC_TO_REMAP="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/vendor=/rust/deps" RUSTC_DEBUGINFO_MAP="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src=/rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce" RUSTC_ERROR_METADATA_DST="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/tmp/extended-error-metadata" RUSTC_FORCE_UNSTABLE="1" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap) -Clinker=/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/build-rust-ccld" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTC_SNAPSHOT="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/lib" RUSTC_STAGE="1" RUSTC_SYSROOT="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/bootstrap/debug/rustc" RUSTDOC="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -Clinker=/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/wrapper/target-rust-ccld -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.76.0\t(07dca489a\t2024-02-04)\t(built\tfrom\ta\tsource\ttarball) -Zcrate-attr=warn(rust_2018_idioms)" RUSTDOC_LIBDIR="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/lib" RUSTDOC_REAL="/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -Zdual-proc-macros -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options -Wrustc::internal -Cprefer-dynamic" RUST_TEST_THREADS="192" UPDATE_EXPECT="1" WINAPI_NO_BUNDLED_LIBRARIES="1" __CARGO_DEFAULT_LIB_METADATA="stable" "/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rust-snapshot/bin/cargo" "test" "--target" "x86_64-poky-linux-gnu" "--release" "-Zcheck-cfg" "-Zdual-proc-macros" "-Zbinary-dep-depinfo" "-j" "192" "--frozen" "--features" "llvm max_level_info" "--manifest-path" "/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.76.0/rustc-1.76.0-src/compiler/rustc/Cargo.toml" "--no-fail-fast" "--doc" "-p" "rustc_abi" "-p" "rustc_arena" "-p" "rustc_ast" "-p" "rustc_ast_lowering" "-p" "rustc_ast_passes" "-p" "rustc_ast_pretty" "-p" "rustc_attr" "-p" "rustc_baked_icu_data" "-p" "rustc_borrowck" "-p" "rustc_builtin_macros" "-p" "rustc_codegen_llvm" "-p" "rustc_codegen_ssa" "-p" "rustc_const_eval" "-p" "rustc_data_structures" "-p" "rustc_driver" "-p" "rustc_driver_impl" "-p" "rustc_error_codes" "-p" "rustc_error_messages" "-p" "rustc_errors" "-p" "rustc_expand" "-p" "rustc_feature" "-p" "rustc_fluent_macro" "-p" "rustc_fs_util" "-p" "rustc_graphviz" "-p" "rustc_hir" "-p" "rustc_hir_analysis" "-p" "rustc_hir_pretty" "-p" "rustc_hir_typeck" "-p" "rustc_incremental" "-p" "rustc_index" "-p" "rustc_index_macros" "-p" "rustc_infer" "-p" "rustc_interface" "-p" "rustc_lexer" "-p" "rustc_lint" "-p" "rustc_lint_defs" "-p" "rustc_llvm" "-p" "rustc_log" "-p" "rustc_macros" "-p" "rustc_metadata" "-p" "rustc_middle" "-p" "rustc_mir_build" "-p" "rustc_mir_dataflow" "-p" "rustc_mir_transform" "-p" "rustc_monomorphize" "-p" "rustc_next_trait_solver" "-p" "rustc_parse" "-p" "rustc_parse_format" "-p" "rustc_passes" "-p" "rustc_pattern_analysis" "-p" "rustc_privacy" "-p" "rustc_query_impl" "-p" "rustc_query_system" "-p" "rustc_resolve" "-p" "rustc_serialize" "-p" "rustc_session" "-p" "rustc_smir" "-p" "rustc_span" "-p" "rustc_symbol_mangling" "-p" "rustc_target" "-p" "rustc_trait_selection" "-p" "rustc_traits" "-p" "rustc_transmute" "-p" "rustc_ty_utils" "-p" "rustc_type_ir" "-p" "stable_mir" "--" "-Z" "unstable-options" "--format" "json"

@onur-ozkan
Copy link
Member

Can you share entire logs and the build configuration (config.toml) using gist or something else?

@Yashinde145
Copy link
Author

@onur-ozkan onur-ozkan changed the title Rustc bootstrap build is unable to fetch crates in poky after 1.76 version update Rustc bootstrap build is unable to find crates in poky after 1.76 version update Mar 7, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 7, 2024
@onur-ozkan
Copy link
Member

Could you please try applying this patch (in impl Step for Crate) and run the build again?

diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 4a4497e57db..da8c88dcd41 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -2571,7 +2571,7 @@ fn run(self, builder: &Builder<'_>) {
         // version of libstd, then what we're actually testing is the libstd
         // produced in stage1. Reflect that here by updating the compiler that
         // we're working with automatically.
-        let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
+        let compiler = builder.compiler_for(compiler.stage, target, target);

         let mut cargo = builder::Cargo::new(
             builder,

This should fix the problem of using an incorrect sysroot which seems to be the reason of your build failure.

@onur-ozkan
Copy link
Member

This should fix the problem of using an incorrect sysroot which seems to be the reason of your build failure.

If that don't work, you could try this one too:

diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 4a4497e57db..282c009eb7c 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -2572,6 +2572,7 @@ fn run(self, builder: &Builder<'_>) {
         // produced in stage1. Reflect that here by updating the compiler that
         // we're working with automatically.
         let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
+        builder.ensure(compile::Rustc::new(compiler, target));

         let mut cargo = builder::Cargo::new(
             builder,

@Yashinde145
Copy link
Author

I will check with the patches and get back.

@Yashinde145
Copy link
Author

Yashinde145 commented Mar 8, 2024

#122075 (comment) first patch doesn't work.
#122075 (comment) second patch works and errors are not seen, but the test suites and the tests are not running after this...

@onur-ozkan
Copy link
Member

This didn't happened till rust 1.75.

I tried running x test compiler/* for the aarch64-unknown-linux-gnu target on version 1.75, and it appears that this isn't a recent regression. With #122205 this problem should have been resolved. I attempted to replicate the workflow as closely as possible (I don't believe it's necessary to be within the poky environment since bootstrap doesn't do tricks depending on specific environments, except for NixOS). However, this problem still persists since version 1.75 (possibly even earlier, although I haven't tested versions older than 1.75).

but the test suites and the tests are not running after this...

That's strange. What exactly happens then?

@Yashinde145
Copy link
Author

However, this problem still persists since version 1.75 (possibly even earlier, although I haven't tested versions older than 1.75).

Surprisingly, I didn't observe this problem in rust version 1.75.

That's strange. What exactly happens then?

I have added another gist file for the build log after applying #122205 patch.

I see that the following lines are newly seen after applying above patch:

There have been changes to x.py since you last updated:
  [INFO] Use of the `if-available` value for `download-ci-llvm` is deprecated; prefer using the new `if-unchanged` value.
    - PR Link https://github.com/rust-lang/rust/pull/117813
  [INFO] The `rust.use-lld` configuration now has different options ('external'/true or 'self-contained'), and its behaviour has changed.
    - PR Link https://github.com/rust-lang/rust/pull/116278
  [INFO] Removed rust.run_dsymutil and dist.gpg_password_file config options, as they were unused.
    - PR Link https://github.com/rust-lang/rust/pull/118703
NOTE: to silence this warning, update `config.toml` to use `change-id = 118703` instead
NOTE: this message was printed twice to make it more likely to be seen

Does this change alter x.py? Do I need to update my change-id in config.toml from change-id = 116881 to change-id = 118703?

Also, can you share with me the steps to debug and fix these kind of rustc bootstrap build issues? I would like to first try and find a fix by myself before asking here.

@onur-ozkan
Copy link
Member

Does this change alter x.py? Do I need to update my change-id in config.toml from change-id = 116881 to change-id = 118703?

No.

Also, can you share with me the steps to debug and fix these kind of rustc bootstrap build issues? I would like to first try and find a fix by myself before asking here.

I simply did x test compiler/* on cross target.

I have added another gist file for the build log after applying #122205 patch.

In the logs I can see that a portion of the tests were executed successfully. Could you please share the full version of the executed command (x) ?

@Yashinde145
Copy link
Author

Command:

python3 src/bootstrap/bootstrap.py test --exclude<some excluded test cases list> --target x86_64-poky-linux-gnu

@onur-ozkan
Copy link
Member

onur-ozkan commented Mar 9, 2024

Command:

python3 src/bootstrap/bootstrap.py test --exclude<some excluded test cases list> --target x86_64-poky-linux-gnu

I need the full version (without placeholders like <some excluded test cases list>)

@Yashinde145
Copy link
Author

python3 src/bootstrap/bootstrap.py test --exclude compiler/rustc --exclude compiler/rustc_interface/src/tests.rs --exclude library/panic_abort --exclude library/panic_unwind --exclude library/test/src/stats/tests.rs --exclude src/bootstrap/builder/tests.rs --exclude src/doc/rustc --exclude src/doc/rustdoc --exclude src/doc/unstable-book --exclude src/librustdoc --exclude src/rustdoc-json-types --exclude src/tools/compiletest/src/common.rs --exclude src/tools/lint-docs --exclude src/tools/rust-analyzer --exclude src/tools/rustdoc-themes --exclude src/tools/tidy --exclude tests/assembly/asm/aarch64-outline-atomics.rs --exclude tests/codegen/abi-main-signature-32bit-c-int.rs --exclude tests/codegen/abi-repr-ext.rs --exclude tests/codegen/abi-x86-interrupt.rs --exclude tests/codegen/branch-protection.rs --exclude tests/codegen/catch-unwind.rs --exclude tests/codegen/cf-protection.rs --exclude tests/codegen/enum-bounds-check-derived-idx.rs --exclude tests/codegen/force-unwind-tables.rs --exclude tests/codegen/intrinsic-no-unnamed-attr.rs --exclude tests/codegen/issues/issue-103840.rs --exclude tests/codegen/issues/issue-47278.rs --exclude tests/codegen/issues/issue-73827-bounds-check-index-in-subexpr.rs --exclude tests/codegen/lifetime_start_end.rs --exclude tests/codegen/local-generics-in-exe-internalized.rs --exclude tests/codegen/match-unoptimized.rs --exclude tests/codegen/noalias-rwlockreadguard.rs --exclude tests/codegen/non-terminate/nonempty-infinite-loop.rs --exclude tests/codegen/noreturn-uninhabited.rs --exclude tests/codegen/repr-transparent-aggregates-3.rs --exclude tests/codegen/riscv-abi/call-llvm-intrinsics.rs --exclude tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs --exclude tests/codegen/riscv-abi/riscv64-lp64d-abi.rs --exclude tests/codegen/sse42-implies-crc32.rs --exclude tests/codegen/thread-local.rs --exclude tests/codegen/uninit-consts.rs --exclude tests/pretty/raw-str-nonexpr.rs --exclude tests/run-make --exclude tests/run-make-fulldeps --exclude tests/rustdoc --exclude tests/rustdoc-json --exclude tests/rustdoc-js-std --exclude tests/rustdoc-ui/cfg-test.rs --exclude tests/rustdoc-ui/check-cfg-test.rs --exclude tests/rustdoc-ui/display-output.rs --exclude tests/rustdoc-ui/doc-comment-multi-line-attr.rs --exclude tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs --exclude tests/rustdoc-ui/doc-test-doctest-feature.rs --exclude tests/rustdoc-ui/doctest-multiline-crate-attribute.rs --exclude tests/rustdoc-ui/doctest-output.rs --exclude tests/rustdoc-ui/doc-test-rustdoc-feature.rs --exclude tests/rustdoc-ui/failed-doctest-compile-fail.rs --exclude tests/rustdoc-ui/issue-80992.rs --exclude tests/rustdoc-ui/issue-91134.rs --exclude tests/rustdoc-ui/nocapture-fail.rs --exclude tests/rustdoc-ui/nocapture.rs --exclude tests/rustdoc-ui/no-run-flag.rs --exclude tests/rustdoc-ui/run-directory.rs --exclude tests/rustdoc-ui/test-no_std.rs --exclude tests/rustdoc-ui/test-type.rs --exclude tests/rustdoc/unit-return.rs --exclude tests/ui/abi/stack-probes-lto.rs --exclude tests/ui/abi/stack-probes.rs --exclude tests/ui/array-slice-vec/subslice-patterns-const-eval-match.rs --exclude tests/ui/asm/x86_64/sym.rs --exclude tests/ui/associated-type-bounds/fn-apit.rs --exclude tests/ui/associated-type-bounds/fn-dyn-apit.rs --exclude tests/ui/associated-type-bounds/fn-wrap-apit.rs --exclude tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs --exclude tests/ui/drop/dynamic-drop.rs --exclude tests/ui/empty_global_asm.rs --exclude tests/ui/functions-closures/fn-help-with-err.rs --exclude tests/ui/linkage-attr/issue-10755.rs --exclude tests/ui/macros/restricted-shadowing-legacy.rs --exclude tests/ui/process/nofile-limit.rs --exclude tests/ui/process/process-panic-after-fork.rs --exclude tests/ui/process/process-sigpipe.rs --exclude tests/ui/simd/target-feature-mixup.rs --exclude tests/ui/structs-enums/multiple-reprs.rs --exclude src/tools/jsondoclint --exclude src/tools/replace-version-placeholder --exclude tests/codegen/abi-efiapi.rs --exclude tests/codegen/abi-sysv64.rs --exclude tests/codegen/align-byval.rs --exclude tests/codegen/align-fn.rs --exclude tests/codegen/asm-powerpc-clobbers.rs --exclude tests/codegen/async-fn-debug-awaitee-field.rs --exclude tests/codegen/binary-search-index-no-bound-check.rs --exclude tests/codegen/call-metadata.rs --exclude tests/codegen/debug-column.rs --exclude tests/codegen/debug-limited.rs --exclude tests/codegen/debuginfo-generic-closure-env-names.rs --exclude tests/codegen/drop.rs --exclude tests/codegen/dst-vtable-align-nonzero.rs --exclude tests/codegen/enable-lto-unit-splitting.rs --exclude tests/codegen/enum/enum-u128.rs --exclude tests/codegen/fn-impl-trait-self.rs --exclude tests/codegen/inherit_overflow.rs --exclude tests/codegen/inline-function-args-debug-info.rs --exclude tests/codegen/intrinsics/mask.rs --exclude tests/codegen/intrinsics/transmute-niched.rs --exclude tests/codegen/issues/issue-73258.rs --exclude tests/codegen/issues/issue-75546.rs --exclude tests/codegen/issues/issue-77812.rs --exclude tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs --exclude tests/codegen/llvm-ident.rs --exclude tests/codegen/mainsubprogram.rs --exclude tests/codegen/move-operands.rs --exclude tests/codegen/repr/transparent-mips64.rs --exclude tests/mir-opt/ --exclude tests/rustdoc-json --exclude tests/rustdoc-ui/doc-test-rustdoc-feature.rs --exclude tests/rustdoc-ui/no-run-flag.rs --exclude tests/ui-fulldeps/ --exclude tests/ui/numbers-arithmetic/u128.rs --doc --no-fail-fast --bless --target x86_64-poky-linux-gnu

@onur-ozkan
Copy link
Member

You are trying to test docs (--doc) for a cross-target (--target x86_64-poky-linux-gnu) which is not yet supported on bootstrap. This is the default behavior from cargo, which is why you do not see tests in the build log.

@rustbot label -I-regression-untriaged

@onur-ozkan onur-ozkan removed their assignment Mar 9, 2024
@onur-ozkan onur-ozkan removed C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Mar 9, 2024
@onur-ozkan
Copy link
Member

onur-ozkan commented Mar 9, 2024

You are trying to test docs (--doc) for a cross-target (--target x86_64-poky-linux-gnu) which is not yet supported on bootstrap. This is the default behavior from cargo, which is why you do not see tests in the build log.

@rustbot label -I-regression-untriaged

This is neither a bug nor a regression. You have always been ignoring tests with the --doc flag, but you probably didn't realize it before. If you don't see any issues when running without the --doc flag, I would expect this issue to be closed (you can open another issue for requesting cross-target doctest support on bootstrap).

@Yashinde145
Copy link
Author

Yashinde145 commented Mar 10, 2024

@onur-ozkan,

This is the default behavior from cargo, which is why you do not see tests in the build log.
This is neither a bug nor a regression. You have always been ignoring tests with the --doc flag, but you probably didn't realize it before.

In rust 1.75 version I was able to run tests with --doc flag. I have attached log_1_75_with_doc_flag.txt file for reference.

If you don't see any issues when running without the --doc flag, I would expect this issue to be closed

I checked without using --doc flag and there are many failures as follows:
These failures were also there in rust 1.75 but after using --doc flag these failures were not seen.

Full log for more details: log_1_76_without_doc_flag.txt

---- markdown::term::tests::test_output stdout ----
thread 'markdown::term::tests::test_output' panicked at compiler/rustc_errors/src/markdown/tests/term.rs:75:55:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_errors::markdown::term::tests::test_output
   4: <rustc_errors::markdown::term::tests::test_output::{closure#0} as core::ops::function::FnOnce<()>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@onur-ozkan
Copy link
Member

In rust 1.75 version I was able to run tests with --doc flag. I have attached log_1_75_with_doc_flag.txt file for reference.

Those are ui tests not doc tests.

Full log for more details: log_1_76_without_doc_flag.txt

I can't see errors in this log file.

@Yashinde145
Copy link
Author

The log file is truncated due to large size.
image

You can click on view the full file link which I have mentioned below.
Can you check this:

https://gist.github.com/Yashinde145/036a934f0523307859f7c855b83ecfd6/raw/f7bc4558eed66a10b65bb915f292ae166d3bb52a/log_1_76_without_doc_flag.txt

@onur-ozkan
Copy link
Member

The log file is truncated due to large size.

Oh, I see.

Failing tests in the log file are unit tests and previously you were not running them with --doc flag. Can you create another issue related to that failing tests?

@Yashinde145
Copy link
Author

Sure, I have created #122285 for it.

@onur-ozkan
Copy link
Member

Thanks, I am closing this one as it's no longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants