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

switch between nightly and stable causes buildfailure #454

Closed
drahnr opened this issue Jun 15, 2019 · 14 comments
Closed

switch between nightly and stable causes buildfailure #454

drahnr opened this issue Jun 15, 2019 · 14 comments

Comments

@drahnr
Copy link
Collaborator

drahnr commented Jun 15, 2019

cargo +nightly b after accidentally running cargo b where the default toolchain is stable

   Compiling unicase v1.4.2
error[E0514]: found crate `rustc` compiled by an incompatible version of rustc
 --> /home/bernhard/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/unicase-1.4.2/build.rs:1:1
  |
1 | extern crate version_check as rustc;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: please recompile that crate using this compiler (rustc 1.37.0-nightly (9606f6fa6 2019-06-14))
  = note: the following crate versions were found:
          crate `rustc` compiled by rustc 1.35.0 (3c235d560 2019-05-20): /home/bernhard/Projects/rhapsodize/target/debug/deps/libversion_check-b81766fb0f808cf7.rlib

error: aborting due to previous error

error: Could not compile `unicase`.

The quick solution is to delete referenced rlib files, I am also not sure if this is related to sccache at all.
warning: build failed, waiting for other jobs to finish...
error: build failed
@drahnr drahnr changed the title rustup update causes compilation failure for crates with build.rs using rustc version switch between nightly and stable causes buildfailure Jun 15, 2019
@drahnr
Copy link
Collaborator Author

drahnr commented Mar 19, 2020

Going to be solved by #666

@repi
Copy link

repi commented May 4, 2020

Did it solve it? Been merged but this is still open.

Would that also solve the case of switching between two different nightly versions (same version number, different date)?

@drahnr
Copy link
Collaborator Author

drahnr commented May 5, 2020

It is indeed solved and can be closed.

@drahnr drahnr closed this as completed May 5, 2020
@repi
Copy link

repi commented May 5, 2020

Sweet! Thx

@drahnr
Copy link
Collaborator Author

drahnr commented May 5, 2020

@repl note that you need to flush your cache (redis, memcached or whatever backend you are using) - wrongly versioned binary artifacts are still cached there which will cause you to see errors until they are removed.
And also remove the locally cached version rm -rf ~/.cache/sccache-* if you are using the dist-client feature.
And last but not least, do the same for your projects ./target dir which at this point is likely to contain copies of the remotely cached artifacts.


Alternatively SCCACHE_RECACHE=1 and delete ./target dir.

@repi
Copy link

repi commented May 5, 2020

Ah thanks for the heads up!

@repi
Copy link

repi commented May 16, 2020

We upgraded to f502075 on master and flushed our sccache data and target/ but are still seeing build failures related to sccache when our CI switches to a new nightly build:

error[E0514]: found crate `futures_core` compiled by an incompatible version of rustc
  --> /usr/local/cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/futures-channel-0.3.5/src/mpsc/mod.rs:81:5
   |
81 | use futures_core::stream::{FusedStream, Stream};
   |     ^^^^^^^^^^^^
   |
   = help: please recompile that crate using this compiler (rustc 1.45.0-nightly (ed084b0b8 2020-05-15))
   = note: the following crate versions were found:
           crate `futures_core` compiled by rustc 1.45.0-nightly (769d12eec 2020-05-12): /var/buildkite/builds/embark-studios/ark/target/debug/deps/libfutures_core-9cd068e3b6544207.rmeta

@drahnr any ideas of what else could be incorrect?

@drahnr
Copy link
Collaborator Author

drahnr commented May 16, 2020

As a matter of fact, testing focused on switching between stable and nightly, I'll give it a shot soon and post the shell helper function I use to wipe sccache

@drahnr
Copy link
Collaborator Author

drahnr commented May 18, 2020

@repi did not get around to looking into it any futher, this is my cleanup helper:

function cachewipe {
    killall sccache
    rm -r ./target || true
    rm -r ~/.cache/sccache* || true
    redis-cli -u redis://1.2.3.4:6379/2 flushall || true
    export SCCACHE_RECACHE=1
}

followed by cargo b usually does the trick

@repi
Copy link

repi commented May 18, 2020

We use a GCS bucket for our sccache storage, which we've wiped manually and works, but as there are nightly releases every few days or so this gets tricky as every update would need a full cache wipe.

@drahnr
Copy link
Collaborator Author

drahnr commented May 18, 2020

The above should really only be necessary once - from pre #666 to post #666 - I am hopefully going to get around to test this soon

@froydnj
Copy link
Contributor

froydnj commented May 18, 2020

The above should really only be necessary once - from pre #666 to post #666 - I am hopefully going to get around to test this soon

Wait, why is it even necessary in the first place?

@drahnr
Copy link
Collaborator Author

drahnr commented May 29, 2020

@repl a colleague just provided me a way of reproducing it could you please attach some open logs, the mention reproduction was caused by an outdated 0.2.13 release
@froydnj frankly I don't remember why, could have been just coincidence that it never happened ever after I did that?

@drahnr
Copy link
Collaborator Author

drahnr commented Jun 7, 2020

Tried to reproduce this today, to no avail. Logs would be much appreciated or at least a command sequence consistently reproducing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants