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

ensure std step before preparing sysroot #128108

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jul 23, 2024

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the std step fixes this issue.

r? Kobzol

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 23, 2024
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm always super confused by these various steps (Rustc, Sysroot, etc.) and which are needed for an actually working sysroot :)

What also confuses me that x build is not enough by itself, I need e.g. x build library or x build sysroot. Tested this locally, it works, thank you!

However, is it possible that this regressed rustdoc caching? On master, if I delete the build directory and do x build with download-rustc = true, rustdoc is not rebuild. With this PR, if I do the same, rustdoc is rebuilt.

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will
fail to find std while compiling on simple rust sources. Ensuring the rustc step fixes
this issue.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the ensure-std-for-precompiled-rustc branch from 9a56efa to 2f55ced Compare July 23, 2024 17:52
@onur-ozkan onur-ozkan changed the title ensure rustc step before preparing sysroot ensure std step before preparing sysroot Jul 23, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Jul 23, 2024

With the latest commit, the rustdoc issue has been fixed. Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 23, 2024

📌 Commit 2f55ced has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2024
@fmease
Copy link
Member

fmease commented Jul 23, 2024

Ah, nice! I did observe this regression (dunno when this regressed tho) and wanted to document it here: rust-lang/rustc-dev-guide#1917. I guess I can close it now :)

@Kobzol
Copy link
Contributor

Kobzol commented Jul 23, 2024

Could you describe the regression in more detail? Did you use download-rustc?

@fmease
Copy link
Member

fmease commented Jul 23, 2024

Yeah, I suppose I did use download-rustc – indirectly that is — via profile = "tools" in config.toml. Before it 'regressed' half a year ago, I used to build stage2 rustdoc w/ a downloaded rustc via ./x b (same profile) but nowadays I use ./x b library rustdoc (disclaimer: it's been a while, might misremember some details here).

@Kobzol
Copy link
Contributor

Kobzol commented Jul 23, 2024

I see. x build should have built rustdoc even before this PR, but it might not have resulted in a working sysroot. I think that you still need x sysroot even after this PR (?), but at least the sysroot should work now.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 23, 2024
…led-rustc, r=Kobzol

ensure std step before preparing sysroot

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the std step fixes this issue.

r? Kobzol
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 23, 2024
…led-rustc, r=Kobzol

ensure std step before preparing sysroot

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the std step fixes this issue.

r? Kobzol
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#124895 (Disallow hidden references to mutable static)
 - rust-lang#128043 (Docs for core::primitive: mention that "core" can be shadowed, too, so we should write "::core")
 - rust-lang#128092 (Remove wrapper functions from c.rs)
 - rust-lang#128100 (Allow to pass a full path for `run-make` tests)
 - rust-lang#128106 (Fix return type of FileAttr methods on AIX target)
 - rust-lang#128108 (ensure std step before preparing sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125962 (Update tracking issue for `const_binary_heap_new_in`)
 - rust-lang#126770 (Add elem_offset and related methods)
 - rust-lang#127481 (Remove generic lifetime parameter of trait `Pattern`)
 - rust-lang#128043 (Docs for core::primitive: mention that "core" can be shadowed, too, so we should write "::core")
 - rust-lang#128092 (Remove wrapper functions from c.rs)
 - rust-lang#128100 (Allow to pass a full path for `run-make` tests)
 - rust-lang#128106 (Fix return type of FileAttr methods on AIX target)
 - rust-lang#128108 (ensure std step before preparing sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1fe9726 into rust-lang:master Jul 24, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 24, 2024
Rollup merge of rust-lang#128108 - onur-ozkan:ensure-std-for-precompiled-rustc, r=Kobzol

ensure std step before preparing sysroot

When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the std step fixes this issue.

r? Kobzol
@rustbot rustbot added this to the 1.82.0 milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants