Skip to content

macOS build support #66

@ebraminio

Description

@ebraminio

Currently trying to build it in e8d40f6 using rustup install nightly and cargo build --config .cargo/release.toml --release in macOS results in,

$ rustc --version
rustc 1.89.0-nightly (4d051fb30 2025-05-18)
$ cargo build --config .cargo/release.toml --release
   Compiling edit v1.0.0 (/Users/ebrahim/edit)
error[E0425]: cannot find function `ppoll` in crate `libc`
    --> src/sys/unix.rs:202:33
     |
202  |                 let ret = libc::ppoll(&mut pollfd, 1, &ts, null());
     |                                 ^^^^^ help: a function with a similar name exists: `poll`
     |
    ::: /Users/ebrahim/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.171/src/unix/mod.rs:1418:5
     |
1418 |     pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int;
     |     --------------------------------------------------------------------- similarly named function `poll` defined here

error[E0425]: cannot find function `__errno_location` in crate `libc`
   --> src/sys/unix.rs:228:30
    |
228 |                 match *libc::__errno_location() {
    |                              ^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `__errno_location` in crate `libc`
   --> src/sys/unix.rs:307:35
    |
307 |         let err = unsafe { *libc::__errno_location() };
    |                                   ^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `ELIBACC` in crate `libc`
   --> src/sys/unix.rs:410:50
    |
410 |             .ok_or_else(|| errno_to_apperr(libc::ELIBACC))
    |                                                  ^^^^^^^ not found in `libc`

error[E0425]: cannot find value `ELIBACC` in crate `libc`
   --> src/sys/unix.rs:426:39
    |
426 |             Err(errno_to_apperr(libc::ELIBACC))
    |                                       ^^^^^^^ not found in `libc`

error[E0425]: cannot find function `__errno_location` in crate `libc`
   --> src/sys/unix.rs:568:54
    |
568 | ...unsafe { *libc::__errno_location() })) } else { Ok(ret) }
    |                    ^^^^^^^^^^^^^^^^ not found in `libc`

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

I wonder however how there isn't a mention of this in #30 I assume that one runs the program remotely or in a container not natively in macOS, which I wish the macOS native one also happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedWe encourage you to jump in on these!I-taskSmaller tasks. Requires work in the 100s of LOC (usually).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions