Skip to content

Missing values in libc in latest nightly #25

@spencerelliott

Description

@spencerelliott

Whenever I try to compile rust3ds-template project using cargo 3ds build, I get the following error:

error[E0425]: cannot find value `UTIME_OMIT` in crate `libc`
   --> /home/spencer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:552:63
    |
552 |         let omit = libc::timespec { tv_sec: 0, tv_nsec: libc::UTIME_OMIT as _ };
    |                                                               ^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `futimens` in crate `libc`
    --> /home/spencer/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:1118:36
     |
1118 |                 cvt(unsafe { libc::futimens(self.as_raw_fd(), times.0.as_ptr()) })?;
     |                                    ^^^^^^^^ help: a function with a similar name exists: `utimes`
     |
    ::: /home/spencer/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.126/src/unix/mod.rs:1159:5
     |
1159 |     pub fn utimes(filename: *const ::c_char, times: *const ::timeval) -> ::c_int;
     |     ---------------------------------------------------------------------------- similarly named function `utimes` defined here

For more information about this error, try `rustc --explain E0425`.
error: could not compile `std` due to 2 previous errors

I have tried running cargo clean, cargo update, and I have even deleted the entire folder and started over.

My version of nightly is:

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.64.0-nightly (affe0d3a0 2022-08-05)

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