Skip to content

Test builds with minimal versions #741

@BurntSushi

Description

@BurntSushi

Steps to reproduce:

$ rustc --version
rustc 1.34.0-nightly (d8a0dd7ae 2019-01-28)
$ cargo --version
cargo 1.34.0-nightly (245818076 2019-01-27)
$ cargo generate-lockfile -Z minimal-versions
    Updating crates.io index
$ cargo build
  Downloaded autocfg v0.1.0
  Downloaded libc v0.2.0
   Compiling autocfg v0.1.0
   Compiling libc v0.2.0
   Compiling rand_os v0.1.2 (/home/andrew/clones/rand/rand_os)
error[E0425]: cannot find function `syscall` in module `libc`
   --> rand_os/src/linux_android.rs:127:15
    |
127 |         libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(),
    |               ^^^^^^^ help: a function with a similar name exists: `sysctl`

warning: use of deprecated item 'std::sync::atomic::ATOMIC_BOOL_INIT': the `new` function is now preferred
  --> rand_os/src/linux_android.rs:21:37
   |
21 | use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
   |                                     ^^^^^^^^^^^^^^^^
   |
   = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'std::sync::atomic::ATOMIC_BOOL_INIT': the `new` function is now preferred
  --> rand_os/src/linux_android.rs:56:49
   |
56 |         static OS_RNG_INITIALIZED: AtomicBool = ATOMIC_BOOL_INIT;
   |                                                 ^^^^^^^^^^^^^^^^

warning: use of deprecated item 'std::sync::atomic::ATOMIC_BOOL_INIT': the `new` function is now preferred
   --> rand_os/src/linux_android.rs:163:36
    |
163 |     static AVAILABLE: AtomicBool = ATOMIC_BOOL_INIT;
    |                                    ^^^^^^^^^^^^^^^^

   Compiling rand_chacha v0.1.1 (/home/andrew/clones/rand/rand_chacha)
   Compiling rand_pcg v0.1.1 (/home/andrew/clones/rand/rand_pcg)
   Compiling rand v0.6.5 (/home/andrew/clones/rand)
error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: Could not compile `rand_os`.
warning: build failed, waiting for other jobs to finish...
error: build failed

I think the issue here is that rand advertises that it works for all releases of libc that are 0.2 or newer, but this is actually not the case. So the dependency should be updated to require a newer version of libc.

There may be other issues lurking as well, see: crossbeam-rs/crossbeam#312

The regex crate does this check in its CI configuration to make sure its dependency specifications are always correct. See: https://github.com/rust-lang/regex/blob/60d087a23025e045ae754a345b04003c31d83d93/ci/script.sh#L53-L55 --- You might consider doing the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions