c-ares: fatal error: 'os/availability.h' file not found building on Mac OS X 10.8 - 10.11
1.30.0 fails to build on Mac OS X 10.11:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/ares_sysconfig_mac.c:54:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_c-ares/c-ares/work/c-ares-1.30.0/src/lib/thirdparty/apple/dnsinfo.h:31:10: fatal error: 'os/availability.h' file not found
#include <os/availability.h>
^
There are similar reports for Mac OS X 10.8, Mac OS X 10.9 and Mac OS X 10.10.
It’s unclear whether c-ares still supports Mac OS X versions prior to 10.12, given discussion in issue #454, but if it’s possible, a fix for this would be appreciated. It may relate to reliance on clock_gettime, introduced in 10.12. Discussed at https://trac.macports.org/ticket/70207
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 62 (28 by maintainers)
Commits related to this issue
- MacOS - legacy: back off to older upstream dnsinfo.h MacOS 10.8-10.11 won't compile with dnsinfo.h from configd-1109.140.1, back off to configd-963.50.8 which still works with newer MacOS verions Fi... — committed to c-ares/c-ares by bradh352 2 years ago
- MacOS - legacy: back off to older upstream dnsinfo.h MacOS 10.8-10.11 won't compile with dnsinfo.h from configd-1109.140.1, back off to configd-963.50.8 which still works with newer MacOS verions Fi... — committed to c-ares/c-ares by bradh352 2 years ago
- MacOS - legacy: back off to older upstream dnsinfo.h MacOS 10.8-10.11 won't compile with dnsinfo.h from configd-1109.140.1, back off to configd-963.50.8 which still works with newer MacOS verions Fi... — committed to c-ares/c-ares by bradh352 2 years ago
Looks right to me.
Btw, when specifying an ip address, you’re likely meaning to use
adig -t PTR 8.8.8.8for a reverse lookup. That’s why all you got was an SOA record back since the query itself wasn’t technically valid.Otherwise you could do a forward lookup like
adig www.google.comk, just joined that. I’m on as bradh352
ok, this is getting a bit more complicated unfortunately.
dnsinfo.hthat would correspond with 10.6 is https://opensource.apple.com/source/configd/configd-395.11/dnsinfo/dnsinfo.hIt does not have the
reach_flagsandif_namemembers of thedns_resolver_tstructure.The
if_namecan be worked around since we haveif_index, but thereach_flagscould be an issue.@bradh352 I will test whatever needed locally, this is really important to have working. (Perhaps no trivial method for CI for macOS ppc, though it is possible to do via Rosetta on an x86 Mac.)
@bradh352 I will try building now and let you know.
Thank you very much for fixing this!
P. S. 1.29.0 was missed, since MacPorts skipped it.
I don’t see why we couldn’t back off to an earlier version of the dnsinfo.h header.