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

Inject the compiler_builtins crate whenever the core crate is injected #49503

Merged
merged 1 commit into from
Apr 7, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 30, 2018

It depends on libcore for providing all lang items that are necessary for doing anything useful, so core can't depend on it.

r? @japaric

cc @aturon

@TimNN
Copy link
Contributor

TimNN commented Mar 30, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613112/613112), completed with 4857 local objects.
---
[00:00:41] configure: rust.quiet-tests     := True
---
[00:18:45] make: *** [all] Error 1
[00:18:45] Makefile:28: recipe for target 'all' failed
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:3901454a:start=1522409549192346845,finish=1522409549199528480,duration=7181635
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:105d11c0
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:105d11c0:start=1522409549206175186,finish=1522409549213163157,duration=6987971
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0511bc9a
$ dmesg | grep -i kill
[   10.870252] init: failsafe main process (1092) killed by TERM signal

If this was not helpful or you have suggestes for improvements, please ping or otherwise contact @TimNN.

@oli-obk oli-obk force-pushed the extern_crate_compiler_builtins branch 2 times, most recently from 6c575fd to 1a8fb17 Compare March 30, 2018 14:20
@TimNN
Copy link
Contributor

TimNN commented Mar 30, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613128/613128), completed with 4853 local objects.
---
[00:00:43] configure: rust.quiet-tests     := True
---
[00:20:08] error[E0463]: can't find crate for `compiler_builtins`
[00:20:08]
[00:20:08] error: aborting due to previous error
[00:20:08]
[00:20:08] For more information about this error, try `rustc --explain E0463`.
[00:20:08] error: Could not compile `panic_abort`.
[00:20:08]
[00:20:08] Caused by:
[00:20:08]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name panic_abort libpanic_abort/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=14193139c52711af -C extra-filename=-14193139c52711af --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-4b35f2d05e20a0a4.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-a8294e31ba20c477.rlib -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-3fdfe34106cc8b15/out` (exit code: 101)
[00:20:08] warning: build failed, waiting for other jobs to finish...
[00:20:09] error: build failed
[00:20:09] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:20:09] expected success, got: exit code: 101
[00:20:09] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1064:9
[00:20:09] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:20:09] travis_fold:end:stage1-std
[00:20:09] travis_time:end:stage1-std:start=1522420949020891945,finish=1522421002426650809,duration=53405758864
[00:20:09] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:20:09] Build completed unsuccessfully in 0:15:04
[00:20:09] Makefile:28: recipe for target 'all' failed
[00:20:09] make: *** [all] Error 1
---
$ cat obj/tmp/sccache.log
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:048fa278:start=1522421003045336271,finish=1522421003052734791,duration=7398520
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:148da1bc
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:148da1bc:start=1522421003058907052,finish=1522421003065611621,duration=6704569
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0052db94
$ dmesg | grep -i kill
[   10.710744] init: failsafe main process (1092) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@TimNN
Copy link
Contributor

TimNN commented Mar 30, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613124/613124), completed with 4853 local objects.
---
[00:00:45] configure: rust.quiet-tests     := True
---
[00:23:53] error[E0463]: can't find crate for `compiler_builtins`
[00:23:53]
[00:23:53] error: aborting due to previous error
[00:23:53]
[00:23:53] For more information about this error, try `rustc --explain E0463`.
[00:23:53] error: Could not compile `unwind`.
[00:23:53]
[00:23:53] Caused by:
[00:23:53]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name unwind libunwind/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=09bb8c86b54eb662 -C extra-filename=-09bb8c86b54eb662 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/liblibc-4b35f2d05e20a0a4.rlib --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-a8294e31ba20c477.rlib -l gcc_s -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-3fdfe34106cc8b15/out` (exit code: 101)
[00:23"always" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:23:54] expected success, got: exit code: 101
[00:23:54] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1064:9
[00:23:54] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:23:54] travis_fold:end:stage1-std
[00:23:54] travis_time:end:stage1-std:start=1522421066798884900,finish=1522421136842379243,duration=70043494343
[00:23:54] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:23:54] Build completed unsuccessfully in 0:18:40
[00:23:54] Makefile:28: recipe for target 'all' failed
[00:23:54] make: *** [all] Error 1
---
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:17bed2ce:start=1522421137766754712,finish=1522421137778643452,duration=11888740
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0da2802c
$ dmesg | grep -i kill
[   11.516288] init: failsafe main process (1093) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@japaric
Copy link
Member

japaric commented Mar 30, 2018

I want to point out that this PR will break some nightly users of Xargo. If they were developing a no-std library and didn't have a Xargo.toml that specified the compiler-builtins crate as part of the sysroot that Xargo will build then xargo build will break for them. The fix is to add or edit a Xargo.toml to look like this:

[dependencies.core] # add this section if you didn't have it already
stage = 0

[dependencies.compiler_builtins] # add this section
features = ["mem"] # not really required
stage = 1

@alexcrichton how do you feel about this nightly-only breaking change and the Cargo.toml modifications in the diff?

This PR looks good to me but I'll leave @alexcrichton do the sign off.

r? @alexcrichton

@oli-obk oli-obk force-pushed the extern_crate_compiler_builtins branch 2 times, most recently from 65e1c99 to 88ecd6c Compare March 30, 2018 16:29
@TimNN
Copy link
Contributor

TimNN commented Mar 30, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (613138/613138), completed with 4854 local objects.
---
[00:00:57] configure: rust.quiet-tests     := True
---
[00:27:49] error[E0259]: the name `compiler_builtins` is defined multiple times
[00:27:49]    --> libstd/lib.rs:377:1
[00:27:49]     |
[00:27:49] 377 | extern crate compiler_builtins;
[00:27:49]     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `compiler_builtins` reimported here
[00:27:49]     |
[00:27:49]     = note: `compiler_builtins` must be defined only once in the type namespace of this module
[00:27:49] help: You can use `as` to change the binding name of the import
[00:27:49]     |
[00:27:49] 377 | extern crate compiler_builtins as other_compiler_builtins;

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@shepmaster shepmaster added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 30, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 30, 2018

@TimNN I love the bot. The only slightly confusing situation is that it will post even after a commit that fails has been force pushed over with a commit that succeeds

@alexcrichton
Copy link
Member

r=me on the rustc changes!

@japaric
Copy link
Member

japaric commented Apr 1, 2018

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 1, 2018

📌 Commit 247bdb9 has been approved by alexcrichton

@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 Apr 1, 2018
@bors
Copy link
Contributor

bors commented Apr 1, 2018

🔒 Merge conflict

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 1, 2018
@oli-obk oli-obk force-pushed the extern_crate_compiler_builtins branch from 247bdb9 to 4ecbfbb Compare April 3, 2018 06:43
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 3, 2018

rebased

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 3, 2018

📌 Commit 4ecbfbb has been approved by alexcrichton

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 3, 2018
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 5, 2018
@bors
Copy link
Contributor

bors commented Apr 6, 2018

☔ The latest upstream changes (presumably #49154) made this pull request unmergeable. Please resolve the merge conflicts.

@japaric
Copy link
Member

japaric commented Apr 6, 2018

Fixed the merge conflict and two more Cargo.tomls; still testing locally. The Cargo.lock will need to be updated as well but that's hard to do from GH :-).

@TimNN
Copy link
Contributor

TimNN commented Apr 6, 2018

Your PR failed on Travis. Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
Resolving deltas: 100% (611672/611672), completed with 4861 local objects.
---
[00:00:46] configure: rust.quiet-tests     := True
---
[00:01:18] error: the lock file needs to be updated but --locked was passed to prevent this
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:31
[00:01:18] make: *** [prepare] Error 1
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] Command failed. Attempt 2/5:
[00:01:18] error: the lock file needs to be updated but --locked was passed to prevent this
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:00
[00:01:18] make: *** [prepare] Error 1
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] Command failed. Attempt 3/5:
[00:01:18] error: the lock file needs to be updated but --locked was passed to prevent this
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:00
[00:01:18] make: *** [prepare] Error 1
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] Command failed. Attempt 4/5:
[00:01:18] error: the lock file needs to be updated but --locked was passed to prevent this
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:00
[00:01:18] make: *** [prepare] Error 1
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] Command failed. Attempt 5/5:
[00:01:18] error: the lock file needs to be updated but --locked was passed to prevent this
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:00
[00:01:18] make: *** [prepare] Error 1
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] The command has failed after 5 attempts.
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:0e9514fc:start=1523031062354581336,finish=1523031062362205548,duration=7624212
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:0866ba90
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:0866ba90:start=1523031062368936878,finish=1523031062375297956,duration=6361078
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:02177eb8
$ dmesg | grep -i kill
[   10.613799] init: failsafe main process (1094) killed by TERM signal

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN.

@japaric
Copy link
Member

japaric commented Apr 6, 2018

still testing locally

I ran x.py dist for x86_64-linux and wasm32 with profilers and sanitizers enabled and it finished successfully.

@oli-obk could you update the lockfile?

@oli-obk oli-obk force-pushed the extern_crate_compiler_builtins branch from 3301ad2 to 679657b Compare April 7, 2018 07:24
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 7, 2018

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Apr 7, 2018

📌 Commit 679657b has been approved by alexcrichton

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 7, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Apr 7, 2018
…ins, r=alexcrichton

Inject the `compiler_builtins` crate whenever the `core` crate is injected
bors added a commit that referenced this pull request Apr 7, 2018
Rollup of 9 pull requests

Successful merges:

 - #49510 (Fix anchor position on fields)
 - #49652 (Fix anchors issue when everything is collapsed)
 - #49702 (std: Inline some Termination-related methods)
 - #49728 (add emit_debug_gdb_scripts target option and ..)
 - #49731 (add THUMB targets to rustup manifest)
 - #49742 (Using X headings instead of 0.X #49739)
 - #49748 (proc_macro: Improve Debug representations)
 - #49750 (bootstrap: Remove the fast path)
 - #49503 (Inject the `compiler_builtins` crate whenever the `core` crate is injected)

Failed merges:
@bors bors merged commit 679657b into rust-lang:master Apr 7, 2018
phil-opp added a commit to rust-osdev/bootloader that referenced this pull request Apr 8, 2018
The compiler_builtins crate is injected automatically now: rust-lang/rust#49503
kryo4096 pushed a commit to kryo4096/RostOS that referenced this pull request Dec 17, 2018
The compiler_builtins crate is injected automatically now: rust-lang/rust#49503
Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019
…sdreavus

rustdoc: mask `compiler_builtins` docs

Fixes rust-lang#46783.

I wasn't able to fully confirm the underlying cause, but my theory is that functions in `compiler_builtins` were overwriting functions with the same names in libcore in the search index. Since the functions in `compiler_builtins` didn't have docs, that's why they weren't appearing in the results.

Masking the `compiler_builtins` crate fixes the search results. It appears that this crate was accidentally unmasked in rust-lang#49503.
kennytm added a commit to kennytm/rust that referenced this pull request Feb 16, 2019
…sdreavus

rustdoc: mask `compiler_builtins` docs

Fixes rust-lang#46783.

I wasn't able to fully confirm the underlying cause, but my theory is that functions in `compiler_builtins` were overwriting functions with the same names in libcore in the search index. Since the functions in `compiler_builtins` didn't have docs, that's why they weren't appearing in the results.

Masking the `compiler_builtins` crate fixes the search results. It appears that this crate was accidentally unmasked in rust-lang#49503.
@oli-obk oli-obk deleted the extern_crate_compiler_builtins branch June 15, 2020 15:26
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants