I'm not sure exactly how, but my suspicion is that you are somehow picking up an old `ares.h` on your include path.
For what it's worth, we upgraded the c-ares dependency to 1.19.1 starting on the 1.56 release (see https://github.com/grpc/grpc/pull/33411). At that version, note that `src/lib/ares__addrinfo2hostent.c` includes `ares.h` and `ares.h` defines `struct ares_addrinfo`. gRPC 1.43 built with the older 1.15 version of c-ares, which did not introduce yet `struct ares_addrinfo`. So perhaps the version of ares.h your picking up is compatible with the 1.15 c-ares build but not the 1.19.1 build. On Friday, August 25, 2023 at 3:21:32 PM UTC-7 John Ousterhout wrote: > I have been working with gRPC 1.43.0 and tried today to upgrade to 1.57.0. > However, when I try to build for debug, the cares submodule doesn't compile > because the types "struct ares_addrinfo", "struct addrinfo_node", and > "struct addrinfo_cname" are not defined. Here are a couple of sample error > messages: > > /ares__addrinfo2hostent.c:68:32: error: invalid use of undefined type > 'const struct ares_addrinfo' > 68 | if (family == AF_UNSPEC && ai->nodes) > | ^~ > /ouster/grpc/third_party/cares/cares/src/lib/ares__addrinfo2hostent.c:74:14: > error: invalid use of undefined type 'struct ares_addrinfo_node' > 74 | if(next->ai_family == family) > | ^~ > | ^~ > /ouster/grpc/third_party/cares/cares/src/lib/ares__addrinfo2hostent.c:227:30: > error: invalid use of undefined type 'struct ares_addrinfo_cname' > 227 | next_cname = next_cname->next; > | ^~ > > Has anyone else seen these errors? Any suggestions on how to get past this > problem? Thanks in advance for any help you can provide. > > -John- > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d377c072-d527-42a6-8f7f-ad67d2c91581n%40googlegroups.com.