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

Need to run x.py setup multiple times for it to create a config.toml #105215

Closed
kraktus opened this issue Dec 3, 2022 · 1 comment · Fixed by #105217
Closed

Need to run x.py setup multiple times for it to create a config.toml #105215

kraktus opened this issue Dec 3, 2022 · 1 comment · Fixed by #105217
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

@kraktus
Copy link
Contributor

kraktus commented Dec 3, 2022

On a fresh install on MacOS Ventura on a 2020 M1 MacBook Air, I had to run x.py setup multiple times before it creating a config.toml

$ x.py setup
...
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) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): a
Updating submodule src/tools/rust-installer
Submodule 'src/rust-installer' (https://github.com/rust-lang/rust-installer.git) registered for path 'src/tools/rust-installer'
Cloning into '/Users/kraktus/Github/rust/src/tools/rust-installer'...
remote: Enumerating objects: 53, done.        
remote: Counting objects: 100% (53/53), done.        
remote: Compressing objects: 100% (31/31), done.        
remote: Total 53 (delta 3), reused 38 (delta 0), pack-reused 0        
Receiving objects: 100% (53/53), 39.23 KiB | 146.00 KiB/s, done.
Resolving deltas: 100% (3/3), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 1), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 712 bytes | 178.00 KiB/s, done.
From https://github.com/rust-lang/rust-installer
 * branch            300b5ec61ef38855a07e6bb4955a37aa1c414c00 -> FETCH_HEAD
Submodule path 'src/tools/rust-installer': checked out '300b5ec61ef38855a07e6bb4955a37aa1c414c00'
No local changes to save
No stash entries found.
Build completed unsuccessfully in 0:27:00
$ x.py setup
...
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) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): a
Updating submodule src/tools/cargo
Submodule 'src/tools/cargo' (https://github.com/rust-lang/cargo.git) registered for path 'src/tools/cargo'
Cloning into '/Users/kraktus/Github/rust/src/tools/cargo'...
remote: Enumerating objects: 1738, done.        
remote: Counting objects: 100% (1738/1738), done.        
remote: Compressing objects: 100% (1201/1201), done.        
remote: Total 1738 (delta 453), reused 1057 (delta 362), pack-reused 0        
Receiving objects: 100% (1738/1738), 2.41 MiB | 4.54 MiB/s, done.
Resolving deltas: 100% (453/453), done.
Submodule path 'src/tools/cargo': checked out 'f6e737b1e3386adb89333bf06a01f68a91ac5306'
No local changes to save
No stash entries found.
Build completed unsuccessfully in 0:00:03
$ x.py setup
...
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) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
Updating submodule library/backtrace
Submodule 'library/backtrace' (https://github.com/rust-lang/backtrace-rs.git) registered for path 'library/backtrace'
Cloning into '/Users/kraktus/Github/rust/library/backtrace'...
remote: Enumerating objects: 140, done.        
remote: Counting objects: 100% (140/140), done.        
remote: Compressing objects: 100% (105/105), done.        
remote: Total 140 (delta 9), reused 77 (delta 4), pack-reused 0        
Receiving objects: 100% (140/140), 99.24 KiB | 4.31 MiB/s, done.
Resolving deltas: 100% (9/9), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 13), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), 2.07 KiB | 132.00 KiB/s, done.
From https://github.com/rust-lang/backtrace-rs
 * branch            07872f28cd8a65c3c7428811548dc85f1f2fb05b -> FETCH_HEAD
Submodule path 'library/backtrace': checked out '07872f28cd8a65c3c7428811548dc85f1f2fb05b'
No local changes to save
No stash entries found.
Build completed unsuccessfully in 0:00:05
$ x.py setup
...
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) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b
Updating submodule library/stdarch
Submodule 'library/stdarch' (https://github.com/rust-lang/stdarch.git) registered for path 'library/stdarch'
Cloning into '/Users/kraktus/Github/rust/library/stdarch'...
remote: Enumerating objects: 311, done.        
remote: Counting objects: 100% (311/311), done.        
remote: Compressing objects: 100% (259/259), done.        
remote: Total 311 (delta 53), reused 147 (delta 19), pack-reused 0        
Receiving objects: 100% (311/311), 1.39 MiB | 4.80 MiB/s, done.
Resolving deltas: 100% (53/53), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 189, done.
remote: Counting objects: 100% (189/189), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 104 (delta 64), reused 27 (delta 1), pack-reused 0
Receiving objects: 100% (104/104), 41.34 KiB | 10.33 MiB/s, done.
Resolving deltas: 100% (64/64), completed with 61 local objects.
From https://github.com/rust-lang/stdarch
 * branch            790411f93c4b5eada3c23abb4c9a063fb0b24d99 -> FETCH_HEAD
Submodule path 'library/stdarch': checked out '790411f93c4b5eada3c23abb4c9a063fb0b24d99'
Submodule 'crates/intrinsic-test/acle' (https://github.com/ARM-software/acle.git) registered for path 'library/stdarch/crates/intrinsic-test/acle'
Cloning into '/Users/kraktus/Github/rust/library/stdarch/crates/intrinsic-test/acle'...
remote: Enumerating objects: 87, done.        
remote: Counting objects: 100% (87/87), done.        
remote: Compressing objects: 100% (83/83), done.        
remote: Total 87 (delta 18), reused 33 (delta 1), pack-reused 0        
Receiving objects: 100% (87/87), 617.96 KiB | 1.03 MiB/s, done.
Resolving deltas: 100% (18/18), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 67, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 40 (delta 25), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (40/40), 254.67 KiB | 1.09 MiB/s, done.
From https://github.com/ARM-software/acle
 * branch            5626f85f469f419db16f20b1614863aeb377c22b -> FETCH_HEAD
Submodule path 'library/stdarch/crates/intrinsic-test/acle': checked out '5626f85f469f419db16f20b1614863aeb377c22b'
No local changes to save
No stash entries found.
Build completed unsuccessfully in 0:00:09

The last one, with -v setup

$ x.py setup -v
...
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) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): a
finding compilers
CC_aarch64-apple-darwin = "cc"
CFLAGS_aarch64-apple-darwin = ["-ffunction-sections", "-fdata-sections", "-fPIC", "-arch", "arm64", "-stdlib=libc++"]
CXX_aarch64-apple-darwin = "c++"
CXXFLAGS_aarch64-apple-darwin = ["-ffunction-sections", "-fdata-sections", "-fPIC", "-arch", "arm64", "-stdlib=libc++"]
AR_aarch64-apple-darwin = "ar"
learning about cargo
`x.py` will now use the configuration at /Users/kraktus/Github/rust/src/bootstrap/defaults/config.library.toml

`stage1` toolchain already linked; not attempting to link `stage1` toolchain

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 `tidy --bless` 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`

To get started, try one of the following commands:
- `x.py check`
- `x.py build`
- `x.py test library/std`
- `x.py doc`
For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html
Build completed successfully in 0:00:36

Note that the output is different every time, and that a different submodule is updated

Relevant zulip thread

@kraktus kraktus added the C-bug Category: This is a bug. label Dec 3, 2022
@kraktus kraktus changed the title Need to run x.py setup multiple times for it to create a `config.toml Need to run x.py setup multiple times for it to create a config.toml Dec 3, 2022
@kraktus
Copy link
Contributor Author

kraktus commented Dec 3, 2022

@rustbot label A-bootstrap C-bug

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Dec 3, 2022
@bors bors closed this as completed in 2a39e45 Dec 4, 2022
RalfJung pushed a commit to RalfJung/miri that referenced this issue Dec 5, 2022
Don't exit with an error if there are no changes to submodules

Fixes rust-lang/rust#105215, which regressed in rust-lang/rust#104865.
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.

2 participants