Skip to content

Can't install on OSX #145

@therealjasonkenney

Description

@therealjasonkenney

I use OSX as a dev machine, and it would be nice if this could install just so I don't have wrap everything in platform checks. My project uses journald on linux and defaults to stderr when it's not available.

Anyhow here are the errors, and some seemed simple to fix

   Compiling libsystemd v0.6.0
error[E0432]: unresolved import `nix::sys::memfd`
 --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:3:15
  |
3 | use nix::sys::memfd::memfd_create;
  |               ^^^^^ could not find `memfd` in `sys`

error[E0433]: failed to resolve: could not find `linux` in `os`
  --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:11:14
   |
11 | use std::os::linux::fs::MetadataExt;
   |              ^^^^^ could not find `linux` in `os`

error[E0432]: unresolved import `nix::sys::memfd`
 --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:4:15
  |
4 | use nix::sys::memfd::MemFdCreateFlag;
  |               ^^^^^ could not find `memfd` in `sys`

error[E0412]: cannot find type `mq_attr` in crate `libc`
   --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/activation.rs:202:54
    |
202 |         let mut attr = std::mem::MaybeUninit::<libc::mq_attr>::uninit();
    |                                                      ^^^^^^^ not found in `libc`

error[E0425]: cannot find function `mq_getattr` in crate `libc`
    --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/activation.rs:203:34
     |
203  |         let res = unsafe { libc::mq_getattr(*self, attr.as_mut_ptr()) };
     |                                  ^^^^^^^^^^ help: a function with a similar name exists: `tcgetattr`
     |
    ::: /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.144/src/unix/mod.rs:1383:5
     |
1383 |     pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
     |     ----------------------------------------------------------------- similarly named function `tcgetattr` defined here

error[E0599]: no function or associated item named `new_abstract` found for struct `UnixAddr` in the current scope
  --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/daemon.rs:95:50
   |
95 |         Some(stripped_addr) => socket::UnixAddr::new_abstract(stripped_addr.as_bytes())
   |                                                  ^^^^^^^^^^^^ function or associated item not found in `UnixAddr`

error[E0599]: no variant or associated item named `F_ADD_SEALS` found for enum `nix::fcntl::FcntlArg` in the current scope
   --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:227:40
    |
227 |     fcntl(memfd.as_raw_fd(), FcntlArg::F_ADD_SEALS(SealFlag::all()))
    |                                        ^^^^^^^^^^^ variant or associated item not found in `FcntlArg<'_>`

error[E0433]: failed to resolve: use of undeclared type `SealFlag`
   --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:227:52
    |
227 |     fcntl(memfd.as_raw_fd(), FcntlArg::F_ADD_SEALS(SealFlag::all()))
    |                                                    ^^^^^^^^ use of undeclared type `SealFlag`

error[E0599]: no method named `st_dev` found for reference `&std::fs::Metadata` in the current scope
   --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:315:30
    |
315 |             device: metadata.st_dev(),
    |                              ^^^^^^ method not found in `&Metadata`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   | use std::os::macos::fs::MetadataExt;
    |

error[E0599]: no method named `st_ino` found for reference `&std::fs::Metadata` in the current scope
   --> /Volumes/Navi/Users/lain/.cargo/registry/src/github.com-1ecc6299db9ec823/libsystemd-0.6.0/src/logging.rs:316:29
    |
316 |             inode: metadata.st_ino(),
    |                             ^^^^^^ method not found in `&Metadata`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   | use std::os::macos::fs::MetadataExt;
    |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions