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

compiling rust from github source fails to find rustup #128553

Closed
wmjb opened this issue Aug 2, 2024 · 3 comments · Fixed by #128588
Closed

compiling rust from github source fails to find rustup #128553

wmjb opened this issue Aug 2, 2024 · 3 comments · Fixed by #128588
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@wmjb
Copy link

wmjb commented Aug 2, 2024

steps..

installed windows 10 on a 64 bit system
installed visual studio 2022 with c++ workload
installed python 3.12
installed git for windows

git clone --depth=1 https://github.com/rust-lang/rust.git
cd rust
python x.py setup

results in c:\source\rust>python x.py setup
downloading https://static.rust-lang.org/dist/2024-07-26/rust-std-beta-x86_64-pc-windows-msvc.tar.xz
################################################################################################################ 100.0%
downloading https://static.rust-lang.org/dist/2024-07-26/rustc-beta-x86_64-pc-windows-msvc.tar.xz
################################################################################################################ 100.0%
downloading https://static.rust-lang.org/dist/2024-07-26/cargo-beta-x86_64-pc-windows-msvc.tar.xz
################################################################################################################ 100.0%
extracting c:\source\rust\build\cache\2024-07-26\rust-std-beta-x86_64-pc-windows-msvc.tar.xz
extracting c:\source\rust\build\cache\2024-07-26\rustc-beta-x86_64-pc-windows-msvc.tar.xz
extracting c:\source\rust\build\cache\2024-07-26\cargo-beta-x86_64-pc-windows-msvc.tar.xz
Building bootstrap
Updating crates.io index
Downloaded windows-targets v0.52.6
Downloaded cpufeatures v0.2.12
Downloaded heck v0.4.1
Downloaded itoa v1.0.10
Downloaded home v0.5.9
Downloaded filetime v0.2.23
Downloaded digest v0.10.7
Downloaded pkg-config v0.3.28
Downloaded crossbeam-deque v0.8.5
Downloaded clap_lex v0.6.0
Downloaded version_check v0.9.4
Downloaded winapi-util v0.1.6
Downloaded xz2 v0.1.7
Downloaded sha2 v0.10.8
Downloaded semver v1.0.21
Downloaded quote v1.0.35
Downloaded junction v1.1.0
Downloaded anstyle v1.0.4
Downloaded crossbeam-utils v0.8.20
Downloaded typenum v1.17.0
Downloaded unicode-ident v1.0.12
Downloaded windows-core v0.52.0
Downloaded serde_derive v1.0.195
Downloaded serde v1.0.195
Downloaded memchr v2.7.1
Downloaded ignore v0.4.21
Downloaded aho-corasick v1.1.2
Downloaded cc v1.0.97
Downloaded serde_json v1.0.111
Downloaded clap_builder v4.4.12
Downloaded ryu v1.0.16
Downloaded syn v2.0.48
Downloaded opener v0.5.2
Downloaded toml v0.5.11
Downloaded tar v0.4.40
Downloaded object v0.32.2
Downloaded proc-macro2 v1.0.76
Downloaded regex-syntax v0.8.2
Downloaded crossbeam-epoch v0.9.18
Downloaded bstr v1.9.0
Downloaded clap_complete v4.4.6
Downloaded clap v4.4.13
Downloaded same-file v1.0.6
Downloaded log v0.4.20
Downloaded globset v0.4.14
Downloaded clap_derive v4.4.7
Downloaded generic-array v0.14.7
Downloaded walkdir v2.4.0
Downloaded termcolor v1.4.0
Downloaded scopeguard v1.2.0
Downloaded fd-lock v4.0.2
Downloaded crypto-common v0.1.6
Downloaded regex-automata v0.4.3
Downloaded cmake v0.1.48
Downloaded cfg-if v1.0.0
Downloaded block-buffer v0.10.4
Downloaded lzma-sys v0.1.20
Downloaded libc v0.2.155
Downloaded windows_x86_64_msvc v0.52.6
Downloaded winapi v0.3.9
Downloaded windows-sys v0.52.0
Downloaded windows v0.52.0
Downloaded 62 crates (21.7 MB) in 18.71s (largest was windows at 11.8 MB)
Compiling windows_x86_64_msvc v0.52.6
Compiling proc-macro2 v1.0.76
Compiling unicode-ident v1.0.12
Compiling winapi v0.3.9
Compiling version_check v0.9.4
Compiling typenum v1.17.0
Compiling memchr v2.7.1
Compiling serde v1.0.195
Compiling cc v1.0.97
Compiling crossbeam-utils v0.8.20
Compiling libc v0.2.155
Compiling pkg-config v0.3.28
Compiling cfg-if v1.0.0
Compiling anstyle v1.0.4
Compiling clap_lex v0.6.0
Compiling regex-syntax v0.8.2
Compiling heck v0.4.1
Compiling log v0.4.20
Compiling semver v1.0.21
Compiling serde_json v1.0.111
Compiling bootstrap v0.0.0 (C:\source\rust\src\bootstrap)
Compiling cpufeatures v0.2.12
Compiling itoa v1.0.10
Compiling scopeguard v1.2.0
Compiling ryu v1.0.16
Compiling clap_builder v4.4.12
Compiling generic-array v0.14.7
Compiling aho-corasick v1.1.2
Compiling bstr v1.9.0
Compiling object v0.32.2
Compiling windows-targets v0.52.6
Compiling windows-sys v0.52.0
Compiling windows-core v0.52.0
Compiling cmake v0.1.48
Compiling quote v1.0.35
Compiling crossbeam-epoch v0.9.18
Compiling syn v2.0.48
Compiling crossbeam-deque v0.8.5
Compiling windows v0.52.0
Compiling lzma-sys v0.1.20
Compiling regex-automata v0.4.3
Compiling crypto-common v0.1.6
Compiling block-buffer v0.10.4
Compiling digest v0.10.7
Compiling sha2 v0.10.8
Compiling winapi-util v0.1.6
Compiling opener v0.5.2
Compiling same-file v1.0.6
Compiling termcolor v1.4.0
Compiling walkdir v2.4.0
Compiling toml v0.5.11
Compiling globset v0.4.14
Compiling filetime v0.2.23
Compiling fd-lock v4.0.2
Compiling junction v1.1.0
Compiling home v0.5.9
Compiling tar v0.4.40
Compiling ignore v0.4.21
Compiling clap_derive v4.4.7
Compiling serde_derive v1.0.195
Compiling clap v4.4.13
Compiling clap_complete v4.4.6
Compiling build_helper v0.1.0 (C:\source\rust\src\tools\build_helper)
Compiling xz2 v0.1.7
Finished dev profile [unoptimized] target(s) in 1m 53s
downloading https://static.rust-lang.org/dist/2024-07-30/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz
################################################################################################################ 100.0%
extracting c:\source\rust\build\cache\2024-07-30\rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz to c:\source\rust\build\x86_64-pc-windows-msvc\rustfmt
downloading https://static.rust-lang.org/dist/2024-07-30/rustc-nightly-x86_64-pc-windows-msvc.tar.xz
################################################################################################################ 100.0%
extracting c:\source\rust\build\cache\2024-07-30\rustc-nightly-x86_64-pc-windows-msvc.tar.xz to c:\source\rust\build\x86_64-pc-windows-msvc\rustfmt
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
d) dist: Install Rust from source
e) none: Do not modify config.toml
Please choose one (a/b/c/d/e): d

To get started, try one of the following commands:

  • x.py dist
  • x.py build
    x.py will now use the configuration at C:\source\rust/src/bootstrap/defaults/config.dist.toml

Rust's CI will automatically fail if it doesn't pass tidy, the internal tool for ensuring code quality.
If you'd like, x.py can install a git hook for you that will automatically run test tidy before
pushing your code to ensure your code is up to par. If you decide later that this behavior is
undesirable, simply delete the pre-push file from .git/hooks.
Would you like to install the git hook?: [y/N] y
Linked src/etc/pre-push.sh to .git/hooks/pre-push

Command "rustup" "--version" (failure_mode=Exit) did not execute successfully.
It was not possible to execute the command: Error { kind: NotFound, message: "program not found" }

Build completed unsuccessfully in 0:04:31

@wmjb wmjb added the C-bug Category: This is a bug. label Aug 2, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 2, 2024
@wmjb
Copy link
Author

wmjb commented Aug 2, 2024

also running x.py with "user" (as build instructions states)

python x.py setup user
results in

Building bootstrap
Finished dev profile [unoptimized] target(s) in 0.48s
ERROR: no setup rules matched ["user"]
HELP: run x.py setup --help --verbose to show a list of available paths
NOTE: if you are adding a new Step to bootstrap itself, make sure you register it with describe!
Build completed unsuccessfully in 0:00:01

@workingjubilee
Copy link
Member

Huh.

@bjorn3
Copy link
Member

bjorn3 commented Aug 2, 2024

The error about rustup not being found should be harmless, though not intentional. ./x.py setup runs rustup --version to check if rustup is available and otherwise skips linking the toolchain to rustup. This should not return in an error if rustup is not found, but as it is the last step of ./x.py setup anyway, everything should work just fine.

@bjorn3 bjorn3 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself and removed A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Aug 2, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 4, 2024
@bors bors closed this as completed in 5601d14 Aug 19, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Aug 20, 2024
…bertlarsan68

bootstrap minor improvements and clean-ups

3rd commit fixes rust-lang/rust#128553 (comment).
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Aug 29, 2024
…bertlarsan68

bootstrap minor improvements and clean-ups

3rd commit fixes rust-lang/rust#128553 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants