You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build drogon but I'm getting a compilation error in trantor. I followed the standard environment setup and build steps provided in the docs (using cmake). A separate clone of trantor on the latest release tag gives the same build error.
My environment:
OS: debian (WSL) (kernel 5.15)
Compiler: Tried both GCC 12 & Clang 16
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc: In constructor ‘trantor::AresResolver::LibraryInitializer::LibraryInitializer()’:
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:56:18: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’
56 | hints_ = new ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
In file included from /my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:8:
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:57:11: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’
57 | hints_->ai_flags = 0;
| ^~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:58:11: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’
58 | hints_->ai_family = AF_INET;
| ^~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:59:11: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’
59 | hints_->ai_socktype = 0;
| ^~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:60:11: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’
60 | hints_->ai_protocol = 0;
| ^~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc: In destructor ‘trantor::AresResolver::LibraryInitializer::~LibraryInitializer()’:
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:65:5: error: possible problem detected in invocation of ‘operator delete’ [-Werror=delete-incomplete]
65 | delete hints_;
| ^~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:65:12: error: invalid use of incomplete type ‘struct ares_addrinfo_hints’ [-Werror]
65 | delete hints_;
| ^~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:20:12: note: forward declaration of ‘struct ares_addrinfo_hints’
20 | struct ares_addrinfo_hints;
| ^~~~~~~~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:65:5: note: neither the destructor nor the class-specific ‘operator delete’ will be called, even if they are declared when the class is defined
65 | delete hints_;
| ^~~~~~~~~~~~~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc: In member function ‘void trantor::AresResolver::resolveInLoop(const std::string&, const trantor::Resolver::ResolverResultsCallback&)’:
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:134:5: error: ‘ares_getaddrinfo’ was not declared in this scope; did you mean ‘ares_addrinfo’?
134 | ares_getaddrinfo(ctx_,
| ^~~~~~~~~~~~~~~~
| ares_addrinfo
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc: In member function ‘void trantor::AresResolver::onQueryResult(int, ares_addrinfo*, const std::string&, const trantor::Resolver::ResolverResultsCallback&)’:
/my_project/drogon/trantor/trantor/net/inner/AresResolver.cc:185:55: error: invalid use of incomplete type ‘struct ares_addrinfo’
185 | auto pptr = (struct ares_addrinfo_node*)result->nodes;
| ^~
/my_project/drogon/trantor/trantor/net/inner/AresResolver.h:18:12: note: forward declaration of ‘struct ares_addrinfo’
18 | struct ares_addrinfo;
The text was updated successfully, but these errors were encountered:
I'm trying to build drogon but I'm getting a compilation error in trantor. I followed the standard environment setup and build steps provided in the docs (using cmake). A separate clone of trantor on the latest release tag gives the same build error.
My environment:
OS: debian (WSL) (kernel 5.15)
Compiler: Tried both GCC 12 & Clang 16
The text was updated successfully, but these errors were encountered: