Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc can't find dependencies when building in a VirtualBox shared drive on a Windows VM #2990
Comments
oconnor663
changed the title
Windows build things I'm using unstable libc, when I'm trying to use crates.io
Windows build thinks I'm using unstable libc, when I'm trying to use crates.io
Aug 14, 2016
oconnor663
changed the title
Windows build thinks I'm using unstable libc, when I'm trying to use crates.io
Windows build thinks I'm using unstable libc, when I'm trying to use crates.io (update: specific to Virtualbox shared drives?)
Aug 14, 2016
This comment has been minimized.
This comment has been minimized.
|
Interesting! Could you gist the full output of |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
Ah, the same thing seems to apply to another problem I've run into, this time with
Looks totally different, but under the circumstances maybe it's related? |
This comment has been minimized.
This comment has been minimized.
|
Hm that "could not canonicalize" message seems fishy, which seems to be coming from rustup, I wonder if the bug is perhaps there? If you set |
This comment has been minimized.
This comment has been minimized.
|
cc @brson, fishy messages from rustup |
This comment has been minimized.
This comment has been minimized.
|
If I did this right, looks like it's unrelated to the path warnings?
Edit: Same for the libc error:
|
This comment has been minimized.
This comment has been minimized.
|
Hm, can you try setting |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton here it is as a gist: https://gist.github.com/oconnor663/8ccd5ea845f2f196645465f5661a623f. Looks like this is the relevant bit:
|
This comment has been minimized.
This comment has been minimized.
|
More about dependencies other than libc: I tried depending on Maybe the picture is something like: rustc refuses to select library locations inside of E:\ (my VirtualBox shared drive). Most dependencies lead to this panic as a result, but libc falls back to the installed version in C:\ and gives an unstable feature error. In all cases, copying the entire project to somewhere under C:\ fixes everything. |
This comment has been minimized.
This comment has been minimized.
|
Hm, can you try running this program? fn main() {
println!("{:?}", fs::canonicalize(r"E:\hello_world\target\debug\deps"));
}My suspicion is that the function is failing so the compiler is ignoring those candidates, but I may be wrong. |
oconnor663
changed the title
Windows build thinks I'm using unstable libc, when I'm trying to use crates.io (update: specific to Virtualbox shared drives?)
rustc can't find dependencies when building in a VirtualBox shared drive on a Windows VM
Aug 17, 2016
This comment has been minimized.
This comment has been minimized.
|
Here's what I get:
I get that output for any filepath that exists inside of
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Aha! Ok I think this is a rustc bug and not a Cargo bug in that case. Basically the compiler's use of It looks like for whatever reason the shared folder doesn't implement this filesystem API :( |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Perhaps, yeah! I think the fix will be to have the compiler work better with calls to |
oconnor663
added a commit
to oconnor663/os_pipe.rs
that referenced
this issue
Aug 20, 2016
brson
referenced this issue
Aug 23, 2016
Open
Unexpected "could not canonicalize path" warnings in proxies when on a network drive #682
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Thanks for letting me know. Is rustup's behavior causing badness here or is it just annoying? rustup issue rust-lang/rustup.rs#682 |
This comment has been minimized.
This comment has been minimized.
|
@brson I think these examples where we ran rustc directly make it look like rustup isn't causing the problem here, though it's possible something else might be broken that we didn't notice? |
This comment has been minimized.
This comment has been minimized.
|
@brson I believe the compiler is the root tool at fault here, but the rustup behavior is a bit odd (printing out errors to the console) |
This comment has been minimized.
This comment has been minimized.
marek-g
commented
Oct 24, 2016
•
|
Hi! I've got the same compilation problem on Windows 7 using ImDisk's RAM drive. When I switch to partiton on HDD drive, everything works fine. fs::canonicalize returns Error on RAM drive and Ok on HDD drive. |
This comment has been minimized.
This comment has been minimized.
|
I tried looking through rust-lang/rust's issues and couldn't find anything that sounded exactly like the problems with fs::canonicalize described here, and I don't have a windows virtualbox setup handy to be able to see if this is still an issue. So I'm going to close this given that if it is still an issue, it should be in rust-lang/rust instead, so if anyone is able to reproduce this, please reopen over there. Thanks! |

oconnor663 commentedAug 14, 2016
•
edited
Similar to this old issue: rust-lang/rust#21771
I have this
main.rs:And this
Cargo.toml:cargo buildworks fine on Linux. But on Windows, I get an error like this:It looks like it's building libc from crates.io, but it's not linking against it or something? I can see a similar error on Linux if I remove the
dependenciessection, fromCargo.toml, which makes sense to me.When I try different version with rustup, I see the same thing on 1.0.9, 1.0.10, and nightly.
UPDATE: I'm running all of this in a Windows 7 Virtualbox VM (Linux host), inside a shared drive. But when I try in a regular folder under
C:\\, the problem goes away! Something related to shared drives?