Skip to content

Suggest x build library for a custom toolchain that fails to load core #113259

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

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

mu001999
Copy link
Contributor

@mu001999 mu001999 commented Jul 2, 2023

Fixes #113222

r? @jyn514

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 2, 2023
@Noratrieb
Copy link
Member

r? Nilstrieb
Have you tested this locally?

@rustbot rustbot assigned Noratrieb and unassigned jyn514 Jul 2, 2023
@mu001999
Copy link
Contributor Author

mu001999 commented Jul 2, 2023

r? Nilstrieb Have you tested this locally?

@Nilstrieb Yes

@Noratrieb
Copy link
Member

sounds good, it looks correct to me
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 2, 2023

📌 Commit b913f55 has been approved by Nilstrieb

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 2, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 3, 2023
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#113253 (Fixed documentation of from<CString> for Rc<CStr>: Arc -> Rc)
 - rust-lang#113258 (Migrate GUI colors test to original CSS color format)
 - rust-lang#113259 (Suggest `x build library` for a custom toolchain that fails to load `core`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1366ad3 into rust-lang:master Jul 3, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jul 3, 2023
@mu001999 mu001999 deleted the diag/add-std branch July 3, 2023 09:05
@oli-obk
Copy link
Contributor

oli-obk commented Jul 3, 2023

I'm getting a bunch of local test failures that are probably due to this PR.


failures:

---- [ui] tests/ui/crate-loading/missing-std.rs stdout ----
diff of stderr:

5	   | ^^^^^^^^^^^^^^^^^^ can't find crate
6	   |
7	   = note: the `x86_64-unknown-uefi` target may not be installed
-	   = help: consider downloading the target with `rustup target add x86_64-unknown-uefi`
+	   = help: consider adding the standard library to the sysroot with `x build library --target x86_64-unknown-uefi`
9	   = help: consider building the standard library from source with `cargo build -Zbuild-std`
10	
11	error: requires `sized` lang_item


The actual stderr differed from the expected stderr.
Actual stderr saved to /home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/crate-loading/missing-std/missing-std.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args crate-loading/missing-std.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: CARGO="/usr/bin/cargo" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/ubuntu/rust17/tests/ui/crate-loading/missing-std.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--sysroot" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/crate-loading/missing-std" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/crate-loading/missing-std/auxiliary" "--target" "x86_64-unknown-uefi"
stdout: none
--- stderr -------------------------------
error[E0463]: can't find crate for `core`
  --> /home/ubuntu/rust17/tests/ui/crate-loading/missing-std.rs:6:1
   |
LL | extern crate core;
   | ^^^^^^^^^^^^^^^^^^ can't find crate
   |
   = note: the `x86_64-unknown-uefi` target may not be installed
   = help: consider adding the standard library to the sysroot with `x build library --target x86_64-unknown-uefi`
   = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: requires `sized` lang_item

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0463`.
------------------------------------------


---- [ui] tests/ui/issues/issue-49851/compiler-builtins-error.rs stdout ----
diff of stderr:

1	error[E0463]: can't find crate for `core`
2	   |
3	   = note: the `thumbv7em-none-eabihf` target may not be installed
-	   = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
+	   = help: consider adding the standard library to the sysroot with `x build library --target thumbv7em-none-eabihf`
5	   = help: consider building the standard library from source with `cargo build -Zbuild-std`
6	
7	error[E0463]: can't find crate for `compiler_builtins`


The actual stderr differed from the expected stderr.
Actual stderr saved to /home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-49851/compiler-builtins-error/compiler-builtins-error.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args issues/issue-49851/compiler-builtins-error.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/ubuntu/rust17/tests/ui/issues/issue-49851/compiler-builtins-error.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--sysroot" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-49851/compiler-builtins-error" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-49851/compiler-builtins-error/auxiliary" "--target" "thumbv7em-none-eabihf"
stdout: none
--- stderr -------------------------------
error[E0463]: can't find crate for `core`
   |
   = note: the `thumbv7em-none-eabihf` target may not be installed
   = help: consider adding the standard library to the sysroot with `x build library --target thumbv7em-none-eabihf`
   = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `compiler_builtins`

error[E0463]: can't find crate for `cortex_m`
  --> /home/ubuntu/rust17/tests/ui/issues/issue-49851/compiler-builtins-error.rs:10:1
   |
LL | extern crate cortex_m;
   | ^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: requires `sized` lang_item

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0463`.
------------------------------------------


---- [ui] tests/ui/issues/issue-37131.rs stdout ----
diff of stderr:

1	error[E0463]: can't find crate for `std`
2	   |
3	   = note: the `thumbv6m-none-eabi` target may not be installed
-	   = help: consider downloading the target with `rustup target add thumbv6m-none-eabi`
+	   = help: consider adding the standard library to the sysroot with `x build library --target thumbv6m-none-eabi`
5	   = help: consider building the standard library from source with `cargo build -Zbuild-std`
6	
7	error: requires `sized` lang_item


The actual stderr differed from the expected stderr.
Actual stderr saved to /home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-37131/issue-37131.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args issues/issue-37131.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "/home/ubuntu/rust17/tests/ui/issues/issue-37131.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "--sysroot" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/stage1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-37131" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/ubuntu/rust17/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-37131/auxiliary" "--target=thumbv6m-none-eabi"
stdout: none
--- stderr -------------------------------
error[E0463]: can't find crate for `std`
   |
   = note: the `thumbv6m-none-eabi` target may not be installed
   = help: consider adding the standard library to the sysroot with `x build library --target thumbv6m-none-eabi`
   = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: requires `sized` lang_item

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0463`.
------------------------------------------



failures:
    [ui] tests/ui/crate-loading/missing-std.rs
    [ui] tests/ui/issues/issue-49851/compiler-builtins-error.rs
    [ui] tests/ui/issues/issue-37131.rs

test result: FAILED. 4 passed; 3 failed; 15258 ignored; 0 measured; 0 filtered out; finished in 232.53ms

My config.toml is

changelog-seen = 2
profile = "compiler"

[rust]
debug = true

@jyn514
Copy link
Member

jyn514 commented Jul 3, 2023

hmm. i forgot that CI sets channel = nightly.

@mu001999 i think we should revert this for now until we can come up with a way to test it. maybe we can use nornalize-stderr or something like that? it won't guarantee the new error is being emitted but it at least won't break local tests.

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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest x build library for a custom toolchain that fails to load core
6 participants