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

running "./x.py test" after "./x.py build" build fails #63303

Closed
tshepang opened this issue Aug 5, 2019 · 6 comments
Closed

running "./x.py test" after "./x.py build" build fails #63303

tshepang opened this issue Aug 5, 2019 · 6 comments
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

@tshepang
Copy link
Member

tshepang commented Aug 5, 2019

Here is the relevant part...

...
Testing rustc_macros stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)                                                                                                                                                                                               [0/45477]
    Finished release [optimized] target(s) in 0.10s                                                                                                                                                                                                                                      
     Running build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/rustc_macros-9c38a09c1d63337a

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests rustc_macros
error[E0460]: found possibly newer version of crate `std` which `synstructure` depends on
 --> /home/tshepang/rust/rustc/src/librustc_macros/src/lib.rs:8:5
  |
8 | use synstructure::decl_derive;
  |     ^^^^^^^^^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `std`: /home/tshepang/rust/rustc/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-94a3d4bb5e32a9d0.rlib
          crate `std`: /home/tshepang/rust/rustc/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-94a3d4bb5e32a9d0.so
          crate `synstructure`: /home/tshepang/rust/rustc/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/libsynstructure-154d40b508cd900a.rlib

error: aborting due to previous error

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/home/tshepang/rust/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "" "--manifest-path" "/home/tshepang/rust/rustc/src/rustc/Cargo.toml" "-p" "rustc_macros"
 "--" "--quiet"
expected success, got: exit code: 1


failed to run: /home/tshepang/rust/rustc/build/bootstrap/debug/bootstrap test
Build completed unsuccessfully in 0:16:29

Workaround is cleaning the build dir and re-running...

./x.py clean && ./x.py test
@jonas-schievink jonas-schievink added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Aug 5, 2019
@tshepang tshepang changed the title running "./x.py test" after "./x.py" build fails running "./x.py test" after "./x.py build" build fails Aug 5, 2019
@ehuss
Copy link
Contributor

ehuss commented Aug 5, 2019

I believe this is #59105. Just to be clear, did you update your git repository at some point before building? Doing a clean checkout with a clean build directory should not hit this by just running those two commands in succession.

When you see this error, you can work around it by deleting the files:

rm -rf build/*/{stage1-rustc,stage1-codegen}/release

@tshepang
Copy link
Member Author

tshepang commented Aug 6, 2019

Yes, it happened after I updated the repo

@petrochenkov
Copy link
Contributor

I believe this is #59105.

Looks the same, but I regularly observe this without using incremental compilation.

@tshepang
Copy link
Member Author

tshepang commented Aug 6, 2019

Oh, am also not using incremental compilation

@ehuss
Copy link
Contributor

ehuss commented Aug 6, 2019

The issue title is misleading. There is no relation to incremental. It's been reported a number of times, I just linked to that one since it has the most recent information. I'm not sure if it is ok for me to edit or close other people's issues?

We have a fix queued up that I hope will make it during the next release cycle.

@tshepang
Copy link
Member Author

tshepang commented Aug 6, 2019

Thanks @ehuss

@tshepang tshepang closed this as completed Aug 6, 2019
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

No branches or pull requests

4 participants