Skip to content

build: bootstrap fails when using --enable-local-rust option #109103

Closed

Description

@filnet

Issue

Building rust with the --enable-local-rust option fails with a symbolic link creation error.

Reverting 6f0fc2f fixes the issue.

Version it worked on

It most recently worked on: Rust 1.67.1

Version with regression

Rust 1.68.0

Backtrace

Backtrace

thread 'main' panicked at 'symlink_dir(C:\M\mingw-w64-rust\src\MINGW64\build\host => C:\M\mingw-w64-rust\src\MINGW64\build\x86_64-pc-windows-gnu) failed with Le fichier spécifié est introuvable. (os error 2)', lib.rs:599:17
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: bootstrap::Build::new
             at C:\M\mingw-w64-rust\src\rustc-1.68.0-src\src\bootstrap\lib.rs:599:17
   3: bootstrap::main
             at C:\M\mingw-w64-rust\src\rustc-1.68.0-src\src\bootstrap\bin\main.rs:50:5
   4: core::ops::function::FnOnce::call_once
             at C:\M\mingw-w64-rust\src\rustc-1.67.1-src\library\core\src\ops\function.rs:507:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Build completed unsuccessfully in 0:00:32

Activity

  1. added
    C-bugCategory: This is a bug.
    regression-untriagedUntriaged performance or correctness regression.
    on Mar 13, 2023
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 13, 2023
  3. Teapot4195 commented on Mar 13, 2023

    @Teapot4195
    Contributor

    @rustbot label +t-bootstrap

    Edit: how very convenient, wasn't even aware there was limitations on label, either way, does this issue occur with x86_64-windows-msvc.

  4. rustbot commented on Mar 13, 2023

    @rustbot
    Collaborator

    Error: Label t-bootstrap can only be set by Rust team members

    Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

  5. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Mar 13, 2023
  6. filnet commented on Mar 13, 2023

    @filnet
    Author

    does this issue occur with x86_64-windows-msvc.

    I am one of the maintainers of the Rust build at https://www.msys2.org/.

    The upgrade from 1.67.1 to 1.68.0 broke the aarch64 build (which uses the --enable-local-rust option).
    We can also reproduce it on other architectures and tool chains.

  7. jyn514 commented on Mar 13, 2023

    @jyn514
    Member

    I ... don't see how this could be related to --enable-local-rust? we're not modifying anything in the stage 0 directory, only in the build directory. do you still see this issue if you remove that option?

  8. jyn514 commented on Mar 13, 2023

    @jyn514
    Member

    oh I see, when that option is enabled bootstrap.py doesn't download the toolchain and so there's no x86_64-pc-windows-gnu folder yet. the correct fix is to add create_dir_all(&build_triple) just after

    let build_triple = build.out.join(&build.build.triple);

  9. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    and removed
    regression-untriagedUntriaged performance or correctness regression.
    on Mar 13, 2023
  10. added this to the 1.68.0 milestone on Mar 13, 2023
  11. filnet commented on Mar 13, 2023

    @filnet
    Author

    I ... don't see how this could be related to --enable-local-rust? we're not modifying anything in the stage 0 directory, only in the build directory. do you still see this issue if you remove that option?

    Using --enable-local-rust will skip downloading and extracting the previous Rust version.
    The new code tries to create a symlink from host to a directory that was supposedly extracted (but was not).

    There is the same issue with --local-rust-root btw.

  12. mu001999 commented on Mar 14, 2023

    @mu001999
    Member

    @rustbot claim

  13. added a commit that references this issue on Mar 15, 2023
    d133c36
  14. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.requires-custom-configThis issue requires custom config/build for rustc in some way

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions