cargo: rustc can't find dependencies when building in a VirtualBox shared drive on a Windows VM
Similar to this old issue: https://github.com/rust-lang/rust/issues/21771
I have this main.rs:
extern crate libc;
fn main() {}
And this Cargo.toml:
[package]
name = "hello_world"
version = "0.1.0"
[dependencies]
libc = "*"
cargo build works fine on Linux. But on Windows, I get an error like this:
Compiling libc v0.2.15
Compiling hello_world v0.1.0 (file:///E:/hello_world)
src\main.rs:1:1: 1:19 error: use of unstable library feature 'libc': use `libc`
from crates.io (see issue #27783)
src\main.rs:1 extern crate libc;
^~~~~~~~~~~~~~~~~~
error: aborting due to previous error
error: Could not compile `hello_world`.
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, from Cargo.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?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 20 (10 by maintainers)
Commits related to this issue
- clean up some comments The Windows build breaks are semi-explained! See https://github.com/rust-lang/cargo/issues/2990. — committed to oconnor663/os_pipe.rs by oconnor663 8 years ago
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!