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

Build rustc for the host as well as target in tools #64862

Closed

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Sep 28, 2019

I believe this should fix clippy etc for cross compiled platforms (clippy is currently broken for other reasons it seems, though, so not sure how to test. I don't get the 'crate not found' errors, anyway).

cc #62558

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 28, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). 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.
2019-09-28T02:24:14.8897659Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-28T02:24:14.9106485Z ##[command]git config gc.auto 0
2019-09-28T02:24:14.9197936Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-28T02:24:14.9273836Z ##[command]git config --get-all http.proxy
2019-09-28T02:24:14.9444395Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64862/merge:refs/remotes/pull/64862/merge
---
2019-09-28T03:28:42.2083111Z .................................................................................................... 1500/9046
2019-09-28T03:28:48.6976534Z .................................................................................................... 1600/9046
2019-09-28T03:29:01.5346917Z .........................................................................i...............i.......... 1700/9046
2019-09-28T03:29:08.8962496Z .................................................................................................... 1800/9046
2019-09-28T03:29:17.8739702Z ................................................................iiiii............................... 1900/9046
2019-09-28T03:29:37.7476789Z .................................................................................................... 2100/9046
2019-09-28T03:29:40.5254255Z .................................................................................................... 2200/9046
2019-09-28T03:29:44.0260245Z .................................................................................................... 2300/9046
2019-09-28T03:29:52.6645571Z .................................................................................................... 2400/9046
---
2019-09-28T03:32:56.9210393Z ....................................................i...............i............................... 4700/9046
2019-09-28T03:33:06.5258646Z .................................................................................................... 4800/9046
2019-09-28T03:33:15.2368768Z .................................................................................................... 4900/9046
2019-09-28T03:33:23.1092343Z .................................................................................................... 5000/9046
2019-09-28T03:33:33.2499320Z ........................................ii.ii....................................................... 5100/9046
2019-09-28T03:33:43.8339529Z .................................................................................................... 5300/9046
2019-09-28T03:33:54.9375104Z .................................................................................................... 5400/9046
2019-09-28T03:34:02.5982007Z .....i.............................................................................................. 5500/9046
2019-09-28T03:34:08.0763188Z .................................................................................................... 5600/9046
2019-09-28T03:34:08.0763188Z .................................................................................................... 5600/9046
2019-09-28T03:34:20.3416332Z .................................................................................................... 5700/9046
2019-09-28T03:34:33.8734280Z ii...i..ii...........i.............................................................................. 5800/9046
2019-09-28T03:34:56.2728198Z .................................................................................................... 6000/9046
2019-09-28T03:35:05.0751001Z .................................................................................................... 6100/9046
2019-09-28T03:35:05.0751001Z .................................................................................................... 6100/9046
2019-09-28T03:35:20.1799410Z ...i..ii............................................................................................ 6200/9046
2019-09-28T03:35:40.2798343Z ...............................................................i.................................... 6400/9046
2019-09-28T03:35:42.7366232Z .................................................................................................... 6500/9046
2019-09-28T03:35:45.9985375Z ...................................i................................................................ 6600/9046
2019-09-28T03:35:49.7081331Z .................................................................................................... 6700/9046
---
2019-09-28T03:40:29.7958161Z  finished in 5.521
2019-09-28T03:40:29.8153022Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:40:30.0012340Z 
2019-09-28T03:40:30.0012614Z running 150 tests
2019-09-28T03:40:33.4077055Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/150
2019-09-28T03:40:35.4556605Z ..iiii..............i.........iii.i.......ii......
2019-09-28T03:40:35.4557141Z 
2019-09-28T03:40:35.4563798Z  finished in 5.641
2019-09-28T03:40:35.4760447Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:40:35.6508677Z 
---
2019-09-28T03:40:37.7865704Z  finished in 2.310
2019-09-28T03:40:37.8083534Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:40:37.9793323Z 
2019-09-28T03:40:37.9793665Z running 9 tests
2019-09-28T03:40:37.9794553Z iiiiiiiii
2019-09-28T03:40:37.9794976Z 
2019-09-28T03:40:37.9798736Z  finished in 0.172
2019-09-28T03:40:38.0008797Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:40:38.1893730Z 
---
2019-09-28T03:40:57.0129724Z  finished in 19.012
2019-09-28T03:40:57.0364949Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:40:57.5927632Z 
2019-09-28T03:40:57.5928564Z running 123 tests
2019-09-28T03:41:23.5193404Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-09-28T03:41:28.6656057Z i.i.i......iii.i.....ii
2019-09-28T03:41:28.6657480Z 
2019-09-28T03:41:28.6661782Z  finished in 31.629
2019-09-28T03:41:28.6671751Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T03:41:28.6672491Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-09-28T03:55:05.1745072Z 
2019-09-28T03:55:05.1745961Z    Doc-tests core
2019-09-28T03:55:10.5927127Z 
2019-09-28T03:55:10.5927984Z running 2405 tests
2019-09-28T03:55:22.6205402Z ......iiiii......................................................................................... 100/2405
2019-09-28T03:55:33.8996117Z ...............................................................................ii................... 200/2405
2019-09-28T03:56:01.0014111Z .i.................................................................................................. 400/2405
2019-09-28T03:56:01.0014111Z .i.................................................................................................. 400/2405
2019-09-28T03:56:12.3745379Z ................................................i..i.................iiii........................... 500/2405
2019-09-28T03:56:34.2390805Z .................................................................................................... 700/2405
2019-09-28T03:56:45.5870185Z .................................................................................................... 800/2405
2019-09-28T03:56:56.6705841Z .................................................................................................... 900/2405
2019-09-28T03:57:07.9282425Z .................................................................................................... 1000/2405
---
2019-09-28T04:01:35.5924760Z 
2019-09-28T04:01:35.5925042Z running 992 tests
2019-09-28T04:01:58.3851149Z i................................................................................................... 100/992
2019-09-28T04:02:10.9472164Z .................................................................................................... 200/992
2019-09-28T04:02:19.8690794Z .................iii......i......i...i......i....................................................... 300/992
2019-09-28T04:02:25.9920350Z .................................................................................................... 400/992
2019-09-28T04:02:34.3976235Z ...................................i..i.................................ii.......................... 500/992
2019-09-28T04:02:50.5220267Z .................................................................................................... 700/992
2019-09-28T04:02:50.5220267Z .................................................................................................... 700/992
2019-09-28T04:02:59.2875868Z ..................iiii.............................................................................. 800/992
2019-09-28T04:03:15.1491971Z .................................................................................................... 900/992
2019-09-28T04:03:23.3119684Z ........................................iiii................................................
2019-09-28T04:03:23.3123265Z 
2019-09-28T04:03:23.3230073Z  finished in 205.464
2019-09-28T04:03:23.3248656Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:03:23.5372912Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-09-28T04:20:16.7269526Z  finished in 40.501
2019-09-28T04:20:16.7654560Z Check compiletest suite=run-make-fulldeps mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:20:16.9441940Z 
2019-09-28T04:20:16.9442514Z running 202 tests
2019-09-28T04:20:55.2575896Z ....................i...ii.................................................................i........ 100/202
2019-09-28T04:21:46.8415172Z ................................iiii.......i...........iiii.iii....................................i 200/202
2019-09-28T04:21:47.1942984Z test result: ok. 185 passed; 0 failed; 17 ignored; 0 measured; 0 filtered out
2019-09-28T04:21:47.1943487Z 
2019-09-28T04:21:47.1946865Z  finished in 90.429
2019-09-28T04:21:47.1957328Z doc tests for: /checkout/src/doc/rustdoc/src/command-line-arguments.md
---
2019-09-28T04:23:23.2958706Z 
2019-09-28T04:23:23.2959541Z ---- builder::tests::dist_only_cross_host stdout ----
2019-09-28T04:23:23.2959856Z thread 'main' panicked at 'assertion failed: `(left == right)`
2019-09-28T04:23:23.2959894Z 
2019-09-28T04:23:23.2960195Z Diff < left / right > :
2019-09-28T04:23:23.2960293Z      Rustc {
2019-09-28T04:23:23.2960358Z          target: "A",
2019-09-28T04:23:23.2960463Z          compiler: Compiler {
2019-09-28T04:23:23.2960512Z              stage: 0,
2019-09-28T04:23:23.2960512Z              stage: 0,
2019-09-28T04:23:23.2960559Z              host: "A",
2019-09-28T04:23:23.2960625Z          },
2019-09-28T04:23:23.2960671Z      },
2019-09-28T04:23:23.2960715Z      Rustc {
2019-09-28T04:23:23.2960966Z <        target: "A",
2019-09-28T04:23:23.2961205Z <        compiler: Compiler {
2019-09-28T04:23:23.2961433Z <            stage: 1,
2019-09-28T04:23:23.2961676Z <            host: "A",
2019-09-28T04:23:23.2961895Z <        },
2019-09-28T04:23:23.2962104Z <    },
2019-09-28T04:23:23.2962316Z <    Rustc {
2019-09-28T04:23:23.2962564Z          target: "B",
2019-09-28T04:23:23.2962661Z              stage: 1,
2019-09-28T04:23:23.2962732Z              host: "A",
2019-09-28T04:23:23.2962778Z          },
2019-09-28T04:23:23.2962823Z      },
---
2019-09-28T04:23:23.3068647Z == clock drift check ==
2019-09-28T04:23:23.3090282Z   local time: Sat Sep 28 04:23:23 UTC 2019
2019-09-28T04:23:23.4595128Z   network time: Sat, 28 Sep 2019 04:23:23 GMT
2019-09-28T04:23:23.4597540Z == end clock drift check ==
2019-09-28T04:23:25.7700397Z ##[error]Bash exited with code '1'.
2019-09-28T04:23:25.7749741Z ##[section]Starting: Checkout
2019-09-28T04:23:25.7751695Z ==============================================================================
2019-09-28T04:23:25.7751748Z Task         : Get sources
2019-09-28T04:23:25.7751794Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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. (Feature Requests)

@alexcrichton
Copy link
Member

I think this builds rustc one more time on all builders (this isn't the symlinked one) as shown from the test changes, so I think this would mean we'd slow down all our dist builders?

@Mark-Simulacrum
Copy link
Member Author

Yeah, I think you're right -- I plan to try and allocate some time to figure out why this dependency is necessary, since it seems like it shouldn't be. I personally suspect -Zdual-proc-macros just due its odd nature but don't really have evidence to back me up there. Certainly in local testing we were building clippy_lints without --target which I think should never happen (we always intend to pass some target, even if that target is x86_64-unknown-linux-gnu, right? Or does Cargo not thread that through?).

@alexcrichton
Copy link
Member

Also to be clear I haven't investigate the linked issue here, and I'm not 100% familiar with -Zdual-proc-macros, it was afaik just a "hack" needed to ship rustc using procedural macros and it's all unstable and can change at any time.

@Mark-Simulacrum
Copy link
Member Author

Sure, yes -- I haven't spent more than a couple hours on this either :)

@he32
Copy link
Contributor

he32 commented Oct 3, 2019

BTW, in an attempt to see where this would get a cross-compile, I locally applied the above commit and re-tried a cross-build of 1.38.0 with amd64 as host and armv7 as target, but I'm still unable to complete a cross build, the error is

error[E0464]: multiple matching crates for `rustc_macros`
 --> /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/vendor/rustc-ap-rustc_errors/diagnostic.rs:9:5
  |
9 | use syntax_pos::{MultiSpan, Span};
  |     ^^^^^^^^^^
  |
  = note: candidates:
          crate `rustc_macros`: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1/lib/rustlib/x86_64-unknown-netbsd/lib/librustc_macros-47279f083f076c01.so
          crate `rustc_macros`: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1-tools/release/deps/librustc_macros-ebd9d84768c4b363.so

error[E0461]: couldn't find crate `rustc_macros` with expected target triple x86_64-unknown-netbsd which `syntax_pos` depends on
 --> /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/vendor/rustc-ap-rustc_errors/diagnostic.rs:9:5
  |
9 | use syntax_pos::{MultiSpan, Span};
  |     ^^^^^^^^^^
  |
  = note: the following crate versions were found:
          crate `rustc_macros`, target triple armv7-unknown-netbsd-eabihf: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1-tools/armv7-unknown-netbsd-eabihf/release/deps/librustc_macros-edac7f465b9c2524.so

error[E0464]: multiple matching crates for `rustc_macros`
  --> /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/vendor/rustc-ap-rustc_target/abi/mod.rs:11:5
   |
11 | use syntax_pos::symbol::{sym, Symbol};
   |     ^^^^^^^^^^
   |
   = note: candidates:
           crate `rustc_macros`: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1/lib/rustlib/x86_64-unknown-netbsd/lib/librustc_macros-47279f083f076c01.so
           crate `rustc_macros`: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1-tools/release/deps/librustc_macros-ebd9d84768c4b363.so

error[E0461]: couldn't find crate `rustc_macros` with expected target triple x86_64-unknown-netbsd which `syntax_pos` depends on
  --> /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/vendor/rustc-ap-rustc_target/abi/mod.rs:11:5
   |
11 | use syntax_pos::symbol::{sym, Symbol};
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `rustc_macros`, target triple armv7-unknown-netbsd-eabihf: /usr/pkgsrc/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-netbsd/stage1-tools/armv7-unknown-netbsd-eabihf/release/deps/librustc_macros-edac7f465b9c2524.so

error: aborting due to 2 previous errors

error: aborting due to 2 previous errors

error: Could not compile `rustc-ap-rustc_errors`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `rustc-ap-rustc_target`.

@msizanoen1
Copy link
Contributor

msizanoen1 commented Oct 4, 2019

I enabled verbose = 2 and this is the logs: link
There are no --target armv7-unknown-linux-gnueabihf which means it is compiled for the host.

Compiling clippy_lints v0.0.212 (/builds/nsidious/rust-ci/rust/src/tools/clippy/clippy_lints)
     Running `/builds/nsidious/rust-ci/rust/build/bootstrap/debug/rustc --edition=2018 --crate-name clippy_lints src/tools/clippy/clippy_lints/src/lib.rs --error-format json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C metadata=05f6b439c75db891 -C extra-filename=-05f6b439c75db891 --out-dir /builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps -L dependency=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps --extern cargo_metadata=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libcargo_metadata-b6383692b0bb6679.rmeta --extern if_chain=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libif_chain-9c23c72dca32979f.rmeta --extern itertools=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libitertools-1832f23158689783.rmeta --extern lazy_static=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/liblazy_static-05c684a841ed472a.rmeta --extern matches=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libmatches-61cf540a1ac2deb4.rmeta --extern pulldown_cmark=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libpulldown_cmark-f827a890558b8504.rmeta --extern quine_mc_cluskey=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libquine_mc_cluskey-221cb3213d8097ad.rmeta --extern regex_syntax=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libregex_syntax-cad403b97af4f3fb.rmeta --extern semver=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libsemver-d455adfc963974f9.rmeta --extern serde=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libserde-cc4d472167daa67f.rmeta --extern smallvec=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libsmallvec-f7334b787bd8ab0e.rmeta --extern toml=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libtoml-a92ea37771dd40ac.rmeta --extern unicode_normalization=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libunicode_normalization-663c92f314907150.rmeta --extern url=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/liburl-94a5a1f1fa5ceb72.rmeta -Zbinary-dep-depinfo -L native=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/build/backtrace-sys-b9bdfe1a29c5a201/out`
rustc command: "LD_LIBRARY_PATH"="/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1/lib:/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps:/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1/lib" "/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" "--edition=2018" "--crate-name" "clippy_lints" "src/tools/clippy/clippy_lints/src/lib.rs" "--error-format" "json" "--json=diagnostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=2" "-C" "metadata=05f6b439c75db891" "-C" "extra-filename=-05f6b439c75db891" "--out-dir" "/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "-L" "dependency=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps" "--extern" "cargo_metadata=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libcargo_metadata-b6383692b0bb6679.rmeta" "--extern" "if_chain=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libif_chain-9c23c72dca32979f.rmeta" "--extern" "itertools=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libitertools-1832f23158689783.rmeta" "--extern" "lazy_static=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/liblazy_static-05c684a841ed472a.rmeta" "--extern" "matches=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libmatches-61cf540a1ac2deb4.rmeta" "--extern" "pulldown_cmark=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libpulldown_cmark-f827a890558b8504.rmeta" "--extern" "quine_mc_cluskey=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libquine_mc_cluskey-221cb3213d8097ad.rmeta" "--extern" "regex_syntax=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libregex_syntax-cad403b97af4f3fb.rmeta" "--extern" "semver=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libsemver-d455adfc963974f9.rmeta" "--extern" "serde=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libserde-cc4d472167daa67f.rmeta" "--extern" "smallvec=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libsmallvec-f7334b787bd8ab0e.rmeta" "--extern" "toml=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libtoml-a92ea37771dd40ac.rmeta" "--extern" "unicode_normalization=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/libunicode_normalization-663c92f314907150.rmeta" "--extern" "url=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/deps/liburl-94a5a1f1fa5ceb72.rmeta" "-Zbinary-dep-depinfo" "-L" "native=/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/build/backtrace-sys-b9bdfe1a29c5a201/out" "-Cdebuginfo=0" "--remap-path-prefix" "/builds/nsidious/rust-ci/rust=/rustc/5670d048c0f88af9976b5505c7853b23dd06770d"
sysroot: "/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1"
libdir: "/builds/nsidious/rust-ci/rust/build/x86_64-unknown-linux-gnu/stage1/lib"
error[E0463]: can't find crate for `fmt_macros`
  --> src/tools/clippy/clippy_lints/src/lib.rs:20:1
   |
20 | extern crate fmt_macros;
   | ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `clippy_lints`.

This is probably caused by plugin = true in clippy manifest which causes clippy_lints to be compiled for host.
Solution: replace plugin = true with crate-type = ["dylib"] which is what cargo do under the hood. Or just remove the plugin because compiler plugins are deprecated anyway.
Compiling stage2 for host works too but wastes compile time.

@Mark-Simulacrum
Copy link
Member Author

I don't seem to have the time to invest in this just now so going to go ahead and close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants