I need help installing pycares on my Android device.
I am getting error codes when I try to use pip to install it
Specs: termux pixel 6 pro rooted pycares failing to install with lots of errors, here is the output
requesting assistance thank you!!
pip install pycares
Collecting pycares
Using cached pycares-4.3.0.tar.gz (821 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting cffi>=1.5.0 (from pycares)
Using cached cffi-1.15.1-cp311-cp311-linux_aarch64.whl
Collecting pycparser (from cffi>=1.5.0->pycares)
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: pycares
Building wheel for pycares (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pycares (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-311
creating build/lib.linux-aarch64-cpython-311/pycares
copying src/pycares/__init__.py -> build/lib.linux-aarch64-cpython-311/pycares
copying src/pycares/_version.py -> build/lib.linux-aarch64-cpython-311/pycares
copying src/pycares/__main__.py -> build/lib.linux-aarch64-cpython-311/pycares
copying src/pycares/errno.py -> build/lib.linux-aarch64-cpython-311/pycares
copying src/pycares/utils.py -> build/lib.linux-aarch64-cpython-311/pycares
running build_ext
generating cffi module 'build/temp.linux-aarch64-cpython-311/_cares.c'
creating build/temp.linux-aarch64-cpython-311
building '_cares' extension
creating build/temp.linux-aarch64-cpython-311/build
creating build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311
creating build/temp.linux-aarch64-cpython-311/deps
creating build/temp.linux-aarch64-cpython-311/deps/c-ares
creating build/temp.linux-aarch64-cpython-311/deps/c-ares/src
creating build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c build/temp.linux-aarch64-cpython-311/_cares.c -o build/temp.linux-aarch64-cpython-311/build/temp.linux-aarch64-cpython-311/_cares.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__addrinfo2hostent.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__addrinfo2hostent.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__addrinfo_localhost.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__addrinfo_localhost.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__close_sockets.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__close_sockets.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__get_hostent.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__get_hostent.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__parse_into_addrinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__parse_into_addrinfo.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__read_line.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__read_line.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__readaddrinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__readaddrinfo.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__sortaddrinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__sortaddrinfo.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares__timeval.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares__timeval.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_android.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_android.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_cancel.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_cancel.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_create_query.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_create_query.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_data.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_data.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_destroy.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_destroy.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_expand_name.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_expand_name.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_expand_string.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_expand_string.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_fds.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_fds.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_free_hostent.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_free_hostent.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_free_string.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_free_string.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_freeaddrinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_freeaddrinfo.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_getaddrinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_getaddrinfo.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_getenv.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_getenv.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_gethostbyaddr.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_gethostbyaddr.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_gethostbyname.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_gethostbyname.o
aarch64-linux-android-clang -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DCARES_STATICLIB=1 -Ideps/build-config/config_android -Ideps/build-config/include -Ideps/c-ares/include -I/data/data/com.termux/files/usr/include/python3.11 -c deps/c-ares/src/lib/ares_getnameinfo.c -o build/temp.linux-aarch64-cpython-311/deps/c-ares/src/lib/ares_getnameinfo.o
deps/c-ares/src/lib/ares_getnameinfo.c:300:15: error: call to undeclared function 'getservbyport_r'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (getservbyport_r(port, proto, &se, (void *)tmpbuf,
^
deps/c-ares/src/lib/ares_getnameinfo.c:300:15: note: did you mean 'getservbyport'?
/data/data/com.termux/files/usr/include/netdb.h:262:17: note: 'getservbyport' declared here
struct servent* getservbyport(int __port_in_network_order, const char* __proto);
^
1 error generated.
error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycares
Failed to build pycares
ERROR: Could not build wheels for pycares, which is required to install pyproject.toml-based projects
Unable to figure out what comes next for troubleshooting