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

Trouble with crates duplicated between the sysroot and the project #261

Closed
RalfJung opened this issue Oct 17, 2019 · 5 comments · Fixed by #269
Closed

Trouble with crates duplicated between the sysroot and the project #261

RalfJung opened this issue Oct 17, 2019 · 5 comments · Fixed by #269

Comments

@RalfJung
Copy link
Collaborator

See #217 for all the details: seems like sometimes there is a problem when a crate occurs both in the sysroot and as a dependency of the project itself. But unfortunately, @roblabla was not able to reproduce this problem, so it is not entirely clear what is really going on.

@RalfJung
Copy link
Collaborator Author

rust-lang/wg-cargo-std-aware#34 might or might not be related.

@roblabla
Copy link
Contributor

I have come across this bug again while updating a custom libstd to rust nightly 2019-11-25.

I'm currently working on making a minimal reproducer, but I'm very afraid that whatever reproducer I manage to create will be dependent on the rustc version used, making it hard to use as a xargo test...

@roblabla
Copy link
Contributor

roblabla commented Nov 29, 2019

While investigating, I discovered that rust does inject custom metadata when building the libstd to avoid this very issue. See here. We should probably be setting that env variable to "std", just like bootstrap does.

As such, I 100% think #217 is the proper fix here.

@roblabla
Copy link
Contributor

roblabla commented Nov 29, 2019

https://github.com/roblabla/xargo-reproducer Running xargo build --target x86_64-unknown-linux-mygnu will cause the error.

@roblabla
Copy link
Contributor

Unfortunately, this requires a fairly elaborate setup to reproduce (roblabla/xargo-reproducer@abe5612 in my minimal reproducer, we need to inject a dependency in libcore). Not sure how I'd be able to recreate these conditions in a xargo smoke test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants