Skip to content
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

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

Closed
SteveLauC opened this issue Mar 16, 2024 · 2 comments
Closed
Labels
C-bug Category: This is a bug.

Comments

@SteveLauC
Copy link
Contributor

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


@SteveLauC SteveLauC added the C-bug Category: This is a bug. label Mar 16, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 16, 2024
@Noratrieb
Copy link
Member

see #122356

@SteveLauC
Copy link
Contributor Author

Well, sorry for opening a duplicate issue:>

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants