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
76 stars 24 forks source link

build error: failed to run custom build command for `bonjour-sys v0.3.0` #63

Closed Binlogo closed 2 weeks ago

Binlogo commented 1 month ago

To run cargo build

error: failed to run custom build command for `bonjour-sys v0.3.0`
...
--- stderr
  wrapper.h:4:10: error: 'dns_sd.h' file not found with <angled> include; use "quotes" instead
  ./dns_sd.h:176:10: fatal error: 'dispatch/dispatch.h' file not found
  thread 'main' panicked at xxxxxx/bonjour-sys-0.3.0/build.rs:24:10:
  failed to generate dns_sd.h bindings: ClangDiagnostic("wrapper.h:4:10: error: 'dns_sd.h' file not found with <angled> include; use \"quotes\" instead\n./dns_sd.h:176:10: fatal error: 'dispatch/dispatch.h' file not found\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Running environment

❯ rustup show  
Default host: aarch64-apple-darwin
stable-aarch64-apple-darwin (default)
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
windy1 commented 1 month ago

That's interesting. Are you able to use dns-sd via CLI? Can you try doing dns-sd -B and see what happens?

Binlogo commented 1 month ago

That's interesting. Are you able to use dns-sd via CLI? Can you try doing dns-sd -B and see what happens?

Sure, I run dns-sd as follows.:

❯ dns-sd -B
Browsing for _http._tcp
DATE: ---Mon 26 Aug 2024---
13:06:16.742  ...STARTING...
windy1 commented 1 month ago

Unfortunately, I cannot reproduce this. It builds fine with the same target on my machine and in CI. What version of macOS?

windy1 commented 2 weeks ago

Closing due to inactivity