I am using python 3.9.2. I wanted to install ccxt package in a virtual environment I have created
python3 -m venv venv_cryptofolio
and I encountered an error, which I'm posting below (but not in full, because it's too big compared to the problem description and stack overflow doesn't allow me to post it):
build/temp.macosx-10.14-x86_64-3.9/_cares.c:2682:55: error: too many arguments to function call, expected 6, have 7
return ares_parse_ptr_reply(x0, x1, x2, x3, x4, x5, x6);
~~~~~~~~~~~~~~~~~~~~ ^~
/usr/local/include/ares.h:653:14: note: 'ares_parse_ptr_reply' declared here
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:2760:59: error: too many arguments to function call, expected 6, have 7
{ result = ares_parse_ptr_reply(x0, x1, x2, x3, x4, x5, x6); }
~~~~~~~~~~~~~~~~~~~~ ^~
/usr/local/include/ares.h:653:14: note: 'ares_parse_ptr_reply' declared here
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4403:14: error: no member named 'ttl' in 'struct ares_mx_reply'
(void)((p->ttl) | 0); /* check that 'struct ares_mx_reply.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4419:14: error: no member named 'ttl' in 'struct ares_naptr_reply'
(void)((p->ttl) | 0); /* check that 'struct ares_naptr_reply.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4459:14: error: no member named 'ttl' in 'struct ares_soa_reply'
(void)((p->ttl) | 0); /* check that 'struct ares_soa_reply.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4473:14: error: no member named 'ttl' in 'struct ares_srv_reply'
(void)((p->ttl) | 0); /* check that 'struct ares_srv_reply.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4486:14: error: no member named 'ttl' in 'struct ares_txt_ext'
(void)((p->ttl) | 0); /* check that 'struct ares_txt_ext.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4498:14: error: no member named 'ttl' in 'struct ares_txt_reply'
(void)((p->ttl) | 0); /* check that 'struct ares_txt_reply.ttl' is an integer */
~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4757:12: error: no member named 'ttl' in 'ares_mx_reply'
{ "ttl", offsetof(struct ares_mx_reply, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4758:48: error: no member named 'ttl' in 'struct ares_mx_reply'
sizeof(((struct ares_mx_reply *)0)->ttl),
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4781:12: error: no member named 'ttl' in 'ares_naptr_reply'
{ "ttl", offsetof(struct ares_naptr_reply, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4782:51: error: no member named 'ttl' in 'struct ares_naptr_reply'
sizeof(((struct ares_naptr_reply *)0)->ttl),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4853:12: error: no member named 'ttl' in 'ares_soa_reply'
{ "ttl", offsetof(struct ares_soa_reply, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4854:49: error: no member named 'ttl' in 'struct ares_soa_reply'
sizeof(((struct ares_soa_reply *)0)->ttl),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4871:12: error: no member named 'ttl' in 'ares_srv_reply'
{ "ttl", offsetof(struct ares_srv_reply, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4872:49: error: no member named 'ttl' in 'struct ares_srv_reply'
sizeof(((struct ares_srv_reply *)0)->ttl),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4886:12: error: no member named 'ttl' in 'ares_txt_ext'
{ "ttl", offsetof(struct ares_txt_ext, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4887:47: error: no member named 'ttl' in 'struct ares_txt_ext'
sizeof(((struct ares_txt_ext *)0)->ttl),
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4898:12: error: no member named 'ttl' in 'ares_txt_reply'
{ "ttl", offsetof(struct ares_txt_reply, ttl),
^ ~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^ ~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
I tried to reinstall pycares using the command:
pip install --upgrade --force-reinstall pycares
and as a result I got a similar error, which I will publish here if needed.
What is the cause of this and what is the solution?
EDIT:
I found the solution which is deleting cares files:
brew uninstall --ignore-dependencies c-ares
This is the resource that helped me figuring out the solution:
I found and answer which I posted at the bottom of question itself.