error[E0523]: found two different crates with name `std` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
sanderjo opened this issue · 2 comments
sanderjo commented
Trying to build with cargo build --release
I get:
Compiling clap v2.24.2
Compiling scroll_derive v0.4.0
error[E0523]: found two different crates with name `std` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
--> /home/sander/.cargo/registry/src/github.com-1ecc6299db9ec823/scroll_derive-0.4.0/src/lib.rs:3:1
|
3 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: Could not compile `scroll_derive`.
Build failed, waiting for other jobs to finish...
error: build failed
sander@Stream-13:~/git/bingrep$
Version of rustc:
sander@Stream-13:~$ rustc --version
rustc 1.16.0
This is on Ubuntu 17.04
Full log of CLI:
sander@Stream-13:~/git$ rm -rf bingrep/
sander@Stream-13:~/git$ rm -rf /home/sander/.cargo/
sander@Stream-13:~/git$ git clone https://github.com/m4b/bingrep.git
Cloning into 'bingrep'...
remote: Counting objects: 91, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 91 (delta 6), reused 15 (delta 5), pack-reused 73
Unpacking objects: 100% (91/91), done.
sander@Stream-13:~/git$ cd bingrep/
sander@Stream-13:~/git/bingrep$ cargo build --release
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading colored v1.5.1
Downloading goblin v0.0.10
Downloading structopt v0.0.3
Downloading structopt-derive v0.0.3
Downloading lazy_static v0.2.8
Downloading plain v0.0.2
Downloading scroll v0.5.0
Downloading scroll_derive v0.4.0
Downloading quote v0.3.15
Downloading syn v0.11.11
Downloading synom v0.11.3
Downloading unicode-xid v0.0.4
Downloading clap v2.24.2
Downloading vec_map v0.8.0
Downloading unicode-width v0.1.4
Downloading strsim v0.6.0
Downloading bitflags v0.8.2
Downloading atty v0.2.2
Downloading ansi_term v0.9.0
Downloading unicode-segmentation v1.2.0
Downloading term_size v0.3.0
Downloading libc v0.2.23
Compiling scroll v0.5.0
Compiling unicode-xid v0.0.4
Compiling unicode-segmentation v1.2.0
Compiling ansi_term v0.9.0
Compiling strsim v0.6.0
Compiling unicode-width v0.1.4
Compiling quote v0.3.15
Compiling synom v0.11.3
Compiling libc v0.2.23
Compiling plain v0.0.2
Compiling lazy_static v0.2.8
Compiling colored v1.5.1
Compiling atty v0.2.2
Compiling syn v0.11.11
Compiling bitflags v0.8.2
Compiling vec_map v0.8.0
Compiling term_size v0.3.0
Compiling clap v2.24.2
Compiling scroll_derive v0.4.0
error[E0523]: found two different crates with name `std` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
--> /home/sander/.cargo/registry/src/github.com-1ecc6299db9ec823/scroll_derive-0.4.0/src/lib.rs:3:1
|
3 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: Could not compile `scroll_derive`.
Build failed, waiting for other jobs to finish...
error: build failed
sander@Stream-13:~/git/bingrep$
sanderjo commented
Related to rust-lang/rust#35636 (comment) ?
Three-line rust source file:
sander@Stream-13:~$ cat test.rs
#![feature(rustc_private)]
extern crate flate;
fn main() {}
Building results in the same(?) error message:
sander@Stream-13:~$ rustc test.rs
error[E0523]: found two different crates with name `std` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.
--> test.rs:2:1
|
2 | extern crate flate;
| ^^^^^^^^^^^^^^^^^^^
So assuming this is valid Rust code (I don't know), the problem is in the rust version on my Ubuntu?
sanderjo commented
Update:
Short: I got it working with the current Rust version 1.18.0
Long:
I removed Ubuntu's cargo, and did an install from the website:
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
Version:
$ rustc --version
rustc 1.18.0 (03fc9d622 2017-06-06)
And now the build is OK:
sander@Stream-13:~/git/bingrep$ cargo build --release
Compiling unicode-segmentation v1.2.0
Compiling plain v0.0.2
Compiling bitflags v0.8.2
Compiling lazy_static v0.2.8
Compiling scroll v0.5.0
Compiling ansi_term v0.9.0
Compiling unicode-width v0.1.4
Compiling unicode-xid v0.0.4
Compiling synom v0.11.3
Compiling strsim v0.6.0
Compiling vec_map v0.8.0
Compiling quote v0.3.15
Compiling libc v0.2.23
Compiling syn v0.11.11
Compiling atty v0.2.2
Compiling term_size v0.3.0
Compiling clap v2.24.2
Compiling structopt-derive v0.0.3
Compiling scroll_derive v0.4.0
Compiling goblin v0.0.10
Compiling colored v1.5.1
Compiling structopt v0.0.3
Compiling bingrep v0.1.0 (file:///home/sander/git/bingrep)
Finished release [optimized] target(s) in 213.67 secs
sander@Stream-13:~/git/bingrep$
... and bingrep is working. Cool!