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

Compilation on mips (big-endian 32-bit) fails with crate std compiled by an incompatible version of rustc #41471

Closed
hsivonen opened this issue Apr 22, 2017 · 7 comments
Assignees
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@hsivonen
Copy link
Member

On Linux on 32-bit big-endian MIPS when trying to compile encoding_rs, I get the following error on both nightly (1.18.0-nightly (1785bca 2017-04-21)) and stable (1.16.0 (30cf806 2017-03-10)) installed via rustup:

   Compiling cfg-if v0.1.0
error[E0514]: found crate `std` compiled by an incompatible version of rustc
  |
  = help: please recompile that crate using this compiler (rustc 1.16.0 (30cf806ef 2017-03-10))
  = note: crate `std` path #1: /home/user/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd_shim-fa5d09c1de30baa9.rlib compiled by ""
  = note: crate `std` path #2: /home/user/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd_unicode-f161ec64ee07d726.rlib compiled by ""
  = note: crate `std` path #3: /home/user/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd-dfe2fc549aedc35c.rlib compiled by ""
  = note: crate `std` path #4: /home/user/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd-dfe2fc549aedc35c.so compiled by ""

error: aborting due to previous error

error: Could not compile `cfg-if`.

To learn more, run the command again with --verbose.
@arielb1 arielb1 added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 23, 2017
@nikomatsakis
Copy link
Contributor

cc @brson -- any thoughts on what's going on here? Is this a rustup issue? Compiler?

@nikomatsakis
Copy link
Contributor

triage: P-high

Tentatively marking as P-high. MIPS is tier 2, but it's not good for it to be horribly broken.

@hsivonen -- you're sure this is not some quirk of your install?

@rust-highfive rust-highfive added P-high High priority and removed I-nominated labels Apr 27, 2017
@nagisa nagisa self-assigned this Apr 27, 2017
@hsivonen
Copy link
Member Author

hsivonen commented Apr 28, 2017

@hsivonen -- you're sure this is not some quirk of your install?

Pretty sure. This was right after install from rustup without messing with the rustup directories in any way manually.

(The underlying system I used is quirky: Debian Wheezy with Rust-compatible glibc transplanted from Jessie, but I have a hard time seeing how that could result in the error seen here.)

@nagisa
Copy link
Member

nagisa commented Apr 28, 2017

Can only reproduce on stable (meaning it should be fixed on master, already?):

nagisa@debian:~/encoding_rs-master$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading cfg-if v0.1.0
   Compiling cfg-if v0.1.0
   Compiling encoding_rs v0.6.2 (file:///home/nagisa/encoding_rs-master)
    Finished dev [unoptimized + debuginfo] target(s) in 533.65 secs
nagisa@debian:~/encoding_rs-master$ uname -a
Linux debian 3.16.0-4-4kc-malta #1 Debian 3.16.39-1 (2016-12-30) mips GNU/Linux
nagisa@debian:~/encoding_rs-master$ rustc --version
rustc 1.18.0-nightly (94e884b63 2017-04-27)
nagisa@debian:~/encoding_rs-master$ cargo +stable build
   Compiling cfg-if v0.1.0
$<2>error[E0514]$<2>$<2>: found crate `std` compiled by an incompatible version of rustc$<2>
  $<2>$<2>|$<2>
  $<2>$<2>= $<2>$<2>help$<2>: please recompile that crate using this compiler (rustc 1.17.0 (56124baa9 2017-04-24))$<2>
  $<2>$<2>= $<2>$<2>note$<2>: crate `std` path #1: /home/nagisa/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd_unicode-cfbd6648f7db2ee5.rlib compiled by ""$<2>
  $<2>$<2>= $<2>$<2>note$<2>: crate `std` path #2: /home/nagisa/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd-f4594d3e53dcb114.rlib compiled by ""$<2>
  $<2>$<2>= $<2>$<2>note$<2>: crate `std` path #3: /home/nagisa/.rustup/toolchains/stable-mips-unknown-linux-gnu/lib/rustlib/mips-unknown-linux-gnu/lib/libstd-f4594d3e53dcb114.so compiled by ""$<2>

$<2>error$<2>$<2>: aborting due to previous error$<2>

error: Could not compile `cfg-if`.

To learn more, run the command again with --verbose.

@nikomatsakis
Copy link
Contributor

@hsivonen, can you verify if this is fixed on a nightly build?

@hsivonen
Copy link
Member Author

rustc 1.18.0-nightly (128aa26 2017-04-28) no longer exhibits this bug. Thanks!

@nagisa
Copy link
Member

nagisa commented Apr 29, 2017

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants