saghul / aiodns

Simple DNS resolver for asyncio

Home Page:https://pypi.python.org/pypi/aiodns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOS Mojave fails to build: "Failed building wheel for pycares"

monodata opened this issue · comments

I have tried using Pycares 3.0 (as suggested in other issue thread I found here) using pip3 install pycares --pre but with the same result:

sudo -H pip3 install aiodns
Collecting aiodns
  Using cached https://files.pythonhosted.org/packages/c0/9d/82d910965520ac17956a4b412e36298466de1b87a8fd0ab6dea601cdb8aa/aiodns-1.2.0-py2.py3-none-any.whl
Requirement already satisfied: typing in /usr/local/lib/python3.7/site-packages (from aiodns) (3.6.6)
Collecting pycares>=1.0.0 (from aiodns)
  Using cached https://files.pythonhosted.org/packages/86/0c/3b662b2629fbde4b81ac36f2735495751fbde74a478ba5fe0c30e4db8f59/pycares-2.4.0.tar.gz
Building wheels for collected packages: pycares
  Running setup.py bdist_wheel for pycares ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-25wts093/pycares/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/tmp/pip-wheel-1x17gq6p --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-x86_64-3.7
  creating build/lib.macosx-10.14-x86_64-3.7/pycares
  copying pycares/errno.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
  copying pycares/_version.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
  copying pycares/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
  copying pycares/__main__.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
  running build_ext
  building 'pycares._core' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/src
  creating build/temp.macosx-10.14-x86_64-3.7/deps
  creating build/temp.macosx-10.14-x86_64-3.7/deps/c-ares
  creating build/temp.macosx-10.14-x86_64-3.7/deps/c-ares/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ideps/c-ares/src -Ideps/c-ares/src/config_darwin -c src/pycares.c -o build/temp.macosx-10.14-x86_64-3.7/src/pycares.o
  In file included from src/pycares.c:4:
  src/cares.c:302:72: error: no member named 'ttl' in 'struct ares_mx_reply'
          PyStructSequence_SET_ITEM(tmp, 2, PyInt_FromLong((long)mx_ptr->ttl));
                                                                 ~~~~~~  ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
  #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                      ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
  #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                            ^
  In file included from src/pycares.c:4:
  src/cares.c:415:95: error: too many arguments to function call, expected 6, have 7
      parse_status = ares_parse_ptr_reply(answer_buf, answer_len, NULL, 0, AF_UNSPEC, &hostent, &hostttls);
                     ~~~~~~~~~~~~~~~~~~~~                                                       ^~~~~~~~~
  /usr/local/include/ares.h:581:14: note: 'ares_parse_ptr_reply' declared here
  CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
               ^
  In file included from src/pycares.c:4:
  src/cares.c:522:81: error: no member named 'ttl' in 'struct ares_txt_ext'
              PyStructSequence_SET_ITEM(tmp_obj, 1, PyInt_FromLong((long)txt_ptr->ttl));
                                                                         ~~~~~~~  ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
  #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                      ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
  #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                            ^
  In file included from src/pycares.c:4:
  src/cares.c:597:78: error: no member named 'ttl' in 'struct ares_soa_reply'
      PyStructSequence_SET_ITEM(dns_result, 7, PyInt_FromLong((long)soa_reply->ttl));
                                                                    ~~~~~~~~~  ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
  #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                      ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
  #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                            ^
  In file included from src/pycares.c:4:
  src/cares.c:664:73: error: no member named 'ttl' in 'struct ares_srv_reply'
          PyStructSequence_SET_ITEM(tmp, 4, PyInt_FromLong((long)srv_ptr->ttl));
                                                                 ~~~~~~~  ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
  #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                      ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
  #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                            ^
  In file included from src/pycares.c:4:
  src/cares.c:735:75: error: no member named 'ttl' in 'struct ares_naptr_reply'
          PyStructSequence_SET_ITEM(tmp, 6, PyInt_FromLong((long)naptr_ptr->ttl));
                                                                 ~~~~~~~~~  ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
  #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                      ^
  /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
  #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                            ^
  6 errors generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pycares
  Running setup.py clean for pycares
Failed to build pycares
Installing collected packages: pycares, aiodns
  Running setup.py install for pycares ... error
    Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-25wts093/pycares/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-sv78fuzs/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    creating build/lib.macosx-10.14-x86_64-3.7/pycares
    copying pycares/errno.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
    copying pycares/_version.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
    copying pycares/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
    copying pycares/__main__.py -> build/lib.macosx-10.14-x86_64-3.7/pycares
    running build_ext
    building 'pycares._core' extension
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/src
    creating build/temp.macosx-10.14-x86_64-3.7/deps
    creating build/temp.macosx-10.14-x86_64-3.7/deps/c-ares
    creating build/temp.macosx-10.14-x86_64-3.7/deps/c-ares/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ideps/c-ares/src -Ideps/c-ares/src/config_darwin -c src/pycares.c -o build/temp.macosx-10.14-x86_64-3.7/src/pycares.o
    In file included from src/pycares.c:4:
    src/cares.c:302:72: error: no member named 'ttl' in 'struct ares_mx_reply'
            PyStructSequence_SET_ITEM(tmp, 2, PyInt_FromLong((long)mx_ptr->ttl));
                                                                   ~~~~~~  ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
    #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                        ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
    #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                              ^
    In file included from src/pycares.c:4:
    src/cares.c:415:95: error: too many arguments to function call, expected 6, have 7
        parse_status = ares_parse_ptr_reply(answer_buf, answer_len, NULL, 0, AF_UNSPEC, &hostent, &hostttls);
                       ~~~~~~~~~~~~~~~~~~~~                                                       ^~~~~~~~~
    /usr/local/include/ares.h:581:14: note: 'ares_parse_ptr_reply' declared here
    CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
                 ^
    In file included from src/pycares.c:4:
    src/cares.c:522:81: error: no member named 'ttl' in 'struct ares_txt_ext'
                PyStructSequence_SET_ITEM(tmp_obj, 1, PyInt_FromLong((long)txt_ptr->ttl));
                                                                           ~~~~~~~  ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
    #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                        ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
    #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                              ^
    In file included from src/pycares.c:4:
    src/cares.c:597:78: error: no member named 'ttl' in 'struct ares_soa_reply'
        PyStructSequence_SET_ITEM(dns_result, 7, PyInt_FromLong((long)soa_reply->ttl));
                                                                      ~~~~~~~~~  ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
    #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                        ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
    #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                              ^
    In file included from src/pycares.c:4:
    src/cares.c:664:73: error: no member named 'ttl' in 'struct ares_srv_reply'
            PyStructSequence_SET_ITEM(tmp, 4, PyInt_FromLong((long)srv_ptr->ttl));
                                                                   ~~~~~~~  ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
    #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                        ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
    #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                              ^
    In file included from src/pycares.c:4:
    src/cares.c:735:75: error: no member named 'ttl' in 'struct ares_naptr_reply'
            PyStructSequence_SET_ITEM(tmp, 6, PyInt_FromLong((long)naptr_ptr->ttl));
                                                                   ~~~~~~~~~  ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/structseq.h:38:69: note: expanded from macro 'PyStructSequence_SET_ITEM'
    #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
                                                                        ^
    /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/tupleobject.h:62:75: note: expanded from macro 'PyTuple_SET_ITEM'
    #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
                                                                              ^
    6 errors generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-25wts093/pycares/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-sv78fuzs/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-25wts093/pycares/

Please uninstall c-ares from /usr/local. pycares depends on the bundled version.

Perfect!

Thanks for the help!

Please uninstall c-ares from /usr/local. pycares depends on the bundled version.

But other programs are using it.