-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rustc can't find dependencies when building in a VirtualBox shared drive on a Windows VM #2990
Comments
Interesting! Could you gist the full output of |
|
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? |
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 |
cc @brson, fishy messages from rustup |
If I did this right, looks like it's unrelated to the path warnings?
Edit: Same for the libc error:
|
Hm, can you try setting |
@alexcrichton here it is as a gist: https://gist.github.com/oconnor663/8ccd5ea845f2f196645465f5661a623f. Looks like this is the relevant bit:
|
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. |
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. |
Here's what I get:
I get that output for any filepath that exists inside of
|
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 :( |
Perhaps, yeah! I think the fix will be to have the compiler work better with calls to |
The Windows build breaks are semi-explained! See rust-lang/cargo#2990.
@alexcrichton Thanks for letting me know. Is rustup's behavior causing badness here or is it just annoying? rustup issue rust-lang/rustup#682 |
@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? |
@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) |
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. |
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! |
Similar to this old issue: rust-lang/rust#21771
I have this
main.rs
:And this
Cargo.toml
:cargo build
works 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
dependencies
section, 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?The text was updated successfully, but these errors were encountered: