-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rustdoc fails with info about symbol names #32532
Comments
Ah, and an example of a failing build |
I'm hitting this too. |
@brson specifically with libc, or with other crate names? |
So I'm trying to figure out if the right answer here is that we should just be passing in metadata to rustdoc? Seems plausible. |
Hm, in rustdoc we actually don't care about symbol name conflict, so we could indicate that to the crate loader? |
The analysis of the underlying reason by @alexcrichton seems plausible to me, by the way. |
Maybe, but it seems sloppy to me -- I mean, why don't we care? The signatures might well be different, for example, so it might well matter. In any case, I'm trying to understand what is leading us to get this conflict still (I haven't reproduced it yet -- what target do I need to use?).
I feel like I'm still missing something. From what I can tell, the error comes when generating docs for the Perhaps part of it is that I am a bit removed from the details of how a lot of this lower level stuff works. |
ok, I see now that this error is not when bootstrapping. |
Further investigation reveals that somehow we do not seem to be supplying That said, it seems to me that |
@alexcrichton Can you elaborate on that? |
I believe this is fixed in #32560, explained here: #32560 (comment). To elaborate on the lack of metadata, rustdoc simply doesn't accept |
…tsakis mk: Add `-C metadata` for compiling crates we ship This should re-enable all external builds of crates with the same name. Right now Cargo doesn't pass `-C metadata` for the top-level library being compiled, so if that library is called `libc`, for example, then it won't be able to link to the standard library which *also* has a `libc` library compiled without `-C metadata`. This can result in naming conflicts which need to be resolved. By passing `-C metadata` to the in-tree crates we ship it should add some extra salt to all symbol names to ensure that they don't collide. Closes #32532
@alexcrichton did you actually check whether this is fixed? I wonder if it's worth trying to allow rustdoc to accept -C metadata -- I guess so long as it doesn't matter, it doesn't matter. |
Nah I was hoping to test with today's nightly, but that's blocked on #32568. I'm pretty confident that the change would fix this, however. |
FYI rustc 1.9.0-nightly (b678600 2016-03-29) fixed this issue for me |
rust-lang/rust#32532 is fixed, so this might work now. Let's find out.
Re-enable doc uploading on travis rust-lang/rust#32532 is fixed, so this might work now. Let's find out.
A bunch of my nightly builds are now generating the error:
error: the current crate is indistinguishable from one of its dependencies: it has the same crate-name
libc
and was compiled with the same-C metadata
arguments. This will result in symbol conflicts between the two. [E0519]This is likely due to the revamp of symbol names, but it's also unfortunately a regression on nightly. I think what's happening here is that Cargo isn't passing
-C metadata
to rustdoc (because it can't) and then the crates.io libc crate is conflicting with the in-tree libc crate.cc @nikomatsakis
The text was updated successfully, but these errors were encountered: