Skip to content

Latest nightly 1.78.0-nightly (7065f0ef4 2024-03-12) is broken in DragonFlyBSD #122585

Closed
@SteveLauC

Description

@SteveLauC

I tried this code:

$ cargo new foo
$ cd foo

$ cargo +nightly check -Zbuild-std --target x86_64-unknown-dragonfly

I expected to see this happen:

cargo +nightly check exits successfully.

Instead, this happened:

  Compiling std v0.0.0 (/home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0425]: cannot find function `getrandom` in crate `libc`
  --> /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/rand.rs:73:24
   |
73 |         unsafe { libc::getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
   |                        ^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `std` (lib) due to 1 previous error

Meta

rustc --version --verbose:

rustc 1.78.0-nightly (c67326b06 2024-03-15)
binary: rustc
commit-hash: c67326b063bd27ed04f306ba2e372cd92e0a8751
commit-date: 2024-03-15
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0
Backtrace

$ RUST_BACKTRACE=1 cargo +nightly b -Zbuild-std --target x86_64-unknown-dragonfly
   Compiling std v0.0.0 (/home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0425]: cannot find function `getrandom` in crate `libc`
  --> /home/steve/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/rand.rs:73:24
   |
73 |         unsafe { libc::getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
   |                        ^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `std` (lib) due to 1 previous error


Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions