错误 "CARES_SIZEOF_LONG & CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"

error "CARES_SIZEOF_LONG & CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"

我正在尝试使用 QNX7 for ARM 交叉编译 gRPC。 我正在为 C++ 使用 cmake。

我正在使用以下命令:

我在编译时收到以下错误消息

[ 42%] Building CXX object CMakeFiles/grpc_unsecure.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc.o
[ 42%] Building CXX object CMakeFiles/grpc_unsecure.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc.o
In file included from /usr/include/ares.h:23:0,
                 from /local/mnt/workspace/grpc/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc:23:
/usr/include/ares_rules.h:72:4: error: #error "CARES_SIZEOF_LONG definition is missing!"
 #  error "CARES_SIZEOF_LONG definition is missing!"
    ^
/usr/include/ares_rules.h:82:4: error: #error "CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"
 #  error "CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"
    ^

以前有人遇到过这个问题吗?我该如何解决这个问题?

我试图删除安装在我的 ubuntu 系统中的 cares 库,以便它应该使用交叉编译器 cares 库。