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

found two different crates with name rustc_demangle that are not distinguished by differing -C metadata #61966

Closed
udoprog opened this issue Jun 19, 2019 · 5 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

@udoprog
Copy link
Contributor

udoprog commented Jun 19, 2019

When building latest master with ./x.py build -i, I get the following error:

(Sorry about the image, but multiline copy+paste is currently broken in my dev build of windows terminal.)

image

Error pasted for search:

found two different crates with name `rustc_demangle` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two.

Note that I've also applied this patch to solve the build breakage on msvc 2019.

Forcibly downgrading or specifying the version to to =0.1.14 like this solves the issue, but I have no idea why it happens in the first place:

diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml
index 4ae8303c76..134ac8625f 100644
--- a/src/librustc_codegen_llvm/Cargo.toml
+++ b/src/librustc_codegen_llvm/Cargo.toml
@@ -13,7 +13,7 @@ test = false
 [dependencies]
 cc = "1.0.1" # Used to locate MSVC
 num_cpus = "1.0"
-rustc-demangle = "0.1.15"
+rustc-demangle = "=0.1.14"
 rustc_llvm = { path = "../librustc_llvm" }
 memmap = "0.6"
 
diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml
index a4cb517faf..66bdde6723 100644
--- a/src/librustc_codegen_ssa/Cargo.toml
+++ b/src/librustc_codegen_ssa/Cargo.toml
@@ -14,7 +14,7 @@ test = false
 bitflags = "1.0.4"
 cc = "1.0.1"
 num_cpus = "1.0"
-rustc-demangle = "0.1.15"
+rustc-demangle = "=0.1.14"
 memmap = "0.6"
 log = "0.4.5"
 libc = "0.2.44"
diff --git a/src/librustc_codegen_utils/Cargo.toml b/src/librustc_codegen_utils/Cargo.toml
index b218d18a06..4e32caf134 100644
--- a/src/librustc_codegen_utils/Cargo.toml
+++ b/src/librustc_codegen_utils/Cargo.toml
@@ -14,7 +14,7 @@ test = false
 flate2 = "1.0"
 log = "0.4"
 punycode = "0.4.0"
-rustc-demangle = "0.1.15"
+rustc-demangle = "=0.1.14"
 
 syntax = { path = "../libsyntax" }
 syntax_pos = { path = "../libsyntax_pos" }
@jonas-schievink
Copy link
Contributor

Does it happen after ./x.py clean as well?

@jonas-schievink jonas-schievink added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 19, 2019
@udoprog
Copy link
Contributor Author

udoprog commented Jun 19, 2019

This was a clean checkout, but I'll give it a try ASAP.

@udoprog
Copy link
Contributor Author

udoprog commented Jun 19, 2019

Also, I forgot to mention that I'm building with -i (--incremental). Edited the original post.

@jonas-schievink
Copy link
Contributor

Ah okay, I've sometimes seen something like this happen after git pulling when there's already stuff built, but if it's a clean checkout that's not the same problem.

@jonas-schievink jonas-schievink added the C-bug Category: This is a bug. label Jun 19, 2019
@udoprog
Copy link
Contributor Author

udoprog commented Jun 19, 2019

Cleaning fixed it. Must've been something that happened during the initial build failure when I applied the patch to fix the MSVC 2019 build failure.

Thanks!

@udoprog udoprog closed this as completed Jun 19, 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

2 participants