emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

Unable to find crate libc #50

Closed davidtwco closed 6 years ago

davidtwco commented 6 years ago

My project builds normally on my system but fails within the docker container with the following error:

error[E0463]: can't find crate for `libc`
  --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.4.2/src/os.rs:75:5
   |
75 |     extern crate libc;
   |     ^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

Here's a full log of the compilation. I've seen this happen with other crates too, not just rand. I've tried this on various tags of the docker image (in some older versions it isn't always libc that cannot be found) to no success.

davidtwco commented 6 years ago

Closing this as I've been unable to produce the issue on other machines (including those with similar configurations).