You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to cross-compile something, and even though, the identically named down to the hash (compatible?), std crate for the cross arch had come from the same minor version (rustc 1.6.0-dev) I still got the error:
hello.rs:1:1: 1:1 error: the crate `std` has been compiled with rustc 1.6.0-dev, which is incompatible with this version of rustc [E0514]
What is required for the crates to be compatible then? The exact commit hash of the rust compilers as well?
If so, this issue could be about something else too - building from a full source snapshot (instead of git clones) doesn't put the hash info into the binary.
I guess this may depend on the string being compared, the nightly compilers have the version string ending with -nightly and from-source builds use -dev by default (configurable either way of course).
I wonder if perhaps this check should just compare commit revisions?
I can confirm I got it working in both directions using 1.5.0-dev (after building from the same snapshot on both architectures) - rustc -vV doesn't include the hash info nor build date though.
I'd like to suggest including the commit info in the full source snapshots so that it can be parsed by the build scripts and rustc -vV doesn't end up like this:
The original issue has turned out to be about something else - fully compatible crates were being rejected for the sole reason CFG_VERSION was different. Otherwise, the message would have been crystal clear.
In other words, it's not possible to pick up crates from rust-lang and use them in your own compiler built from tarball source, meaning #30622 shouldn't close this.
Activity
sfackler commentedon Dec 13, 2015
The compilers must have been built from the same commit.
samwonelsie commentedon Dec 13, 2015
Strange that it's not printing the hash if it's still able to compare against it.
ticki commentedon Dec 14, 2015
Try to run
cargo cleansamwonelsie commentedon Dec 14, 2015
Fresh from the reddit thread, eh?
It's not that issue.
EDIT:
https://www.reddit.com/r/rust/comments/3wic4c/error_the_crate_regex_has_been_compiled_with_an/
ticki commentedon Dec 14, 2015
Reddit thread?
arielb1 commentedon Dec 14, 2015
What compilers were you using?
samwonelsie commentedon Dec 14, 2015
Those were 1.6 nightlies for armhf (from rustbuild) and i686 (mine) architectures roughly from the same day - hence the matching crate names.
arielb1 commentedon Dec 14, 2015
Apparently the nightlies are built with different values of
CFG_VERSION. Could @alexcrichton investigate?arielb1 commentedon Dec 14, 2015
The
CFG_VERSIONis visible by doingstrings $RLIB_FILE_CREATED_BY_RUSTC | grep "rustc 1[.]", or byrustc --version.alexcrichton commentedon Dec 14, 2015
I guess this may depend on the string being compared, the nightly compilers have the version string ending with
-nightlyand from-source builds use-devby default (configurable either way of course).I wonder if perhaps this check should just compare commit revisions?
samwonelsie commentedon Dec 15, 2015
I can confirm I got it working in both directions using 1.5.0-dev (after building from the same snapshot on both architectures) -
rustc -vVdoesn't include the hash info nor build date though.samwonelsie commentedon Feb 20, 2016
I'd like to suggest including the commit info in the full source snapshots so that it can be parsed by the build scripts and
rustc -vVdoesn't end up like this:samwonelsie commentedon Mar 18, 2016
The original issue has turned out to be about something else - fully compatible crates were being rejected for the sole reason
CFG_VERSIONwas different. Otherwise, the message would have been crystal clear.In other words, it's not possible to pick up crates from rust-lang and use them in your own compiler built from tarball source, meaning #30622 shouldn't close this.
samwonelsie commentedon Apr 30, 2016
#33286