windy1 / zeroconf-rs

zeroconf is a cross-platform library that wraps underlying ZeroConf/mDNS implementations such as Bonjour or Avahi, providing an easy and idiomatic way to both register and browse services.
MIT License
77 stars 25 forks source link

Doesn't build for `aarch64-apple-darwin` #21

Closed cezarmathe closed 1 year ago

cezarmathe commented 2 years ago

Running cargo build --target aarch64-apple-darwin fails.

Cargo output:

   Compiling zeroconf v0.10.5
error[E0432]: unresolved imports `bonjour_sys::DNSServiceGetAddrInfo`, `bonjour_sys::DNSServiceGetAddrInfoReply`, `bonjour_sys::DNSServiceProtocol`
 --> /home/kiwi/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/zeroconf-0.10.5/src/macos/service_ref.rs:5:63
  |
5 |     DNSServiceBrowse, DNSServiceBrowseReply, DNSServiceFlags, DNSServiceGetAddrInfo,
  |                                                               ^^^^^^^^^^^^^^^^^^^^^ no `DNSServiceGetAddrInfo` in the root
6 |     DNSServiceGetAddrInfoReply, DNSServiceProcessResult, DNSServiceProtocol, DNSServiceRef,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^                           ^^^^^^^^^^^^^^^^^^
  |     |                                                    |
  |     |                                                    no `DNSServiceProtocol` in the root
  |     |                                                    help: a similar name exists in the module: `DNSServiceBrowse`
  |     no `DNSServiceGetAddrInfoReply` in the root

error[E0412]: cannot find type `sockaddr` in crate `bonjour_sys`
   --> /home/kiwi/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/zeroconf-0.10.5/src/macos/browser.rs:226:34
    |
226 |     address: *const bonjour_sys::sockaddr,
    |                                  ^^^^^^^^ not found in `bonjour_sys`
    |
help: consider importing this struct
    |
3   | use libc::sockaddr;
    |

error[E0412]: cannot find type `sockaddr` in crate `bonjour_sys`
   --> /home/kiwi/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/zeroconf-0.10.5/src/macos/browser.rs:239:34
    |
239 |     address: *const bonjour_sys::sockaddr,
    |                                  ^^^^^^^^ not found in `bonjour_sys`
    |
help: consider importing this struct
    |
3   | use libc::sockaddr;
    |

error[E0283]: type annotations needed
   --> /home/kiwi/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/zeroconf-0.10.5/src/macos/service_ref.rs:233:10
    |
233 | #[derive(Builder, BuilderDelegate)]
    |          ^^^^^^^ cannot infer type
    |
    = note: cannot satisfy `_: Default`
    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0283, E0412, E0432.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `zeroconf` due to 4 previous errors
windy1 commented 1 year ago

This must be outdated because it is building on this platform fine for me.