saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
163 stars 74 forks source link

Build on Solaris failed #72

Closed hergla closed 5 years ago

hergla commented 6 years ago

Hi saghul,

i tried to build for solaris11. But the build failed because of two issues in setup_cares.py

$ python3 setup.py build creating build/temp.solaris-2.11-sun4v.32bit-3.6/deps/c-ares/src gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m32 -I/usr/include/ncurses -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/opt/OLBpython/include/python3.6m -Ideps/c-ares/src -c src/pycares.c -o build/temp.solaris-2.11-sun4v.32bit-3.6/src/pycares.o gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m32 -I/usr/include/ncurses -fPIC -DHAVE_CONFIG_H=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -I/opt/OLBpython/include/python3.6m -Ideps/c-ares/src -c deps/c-ares/src/aresclose_sockets.c -o build/temp.solaris-2.11-sun4v.32bit-3.6/deps/c-ares/src/ares__close_sockets.o In file included from deps/c-ares/src/aresclose_sockets.c:17:0: deps/c-ares/src/ares_setup.h:32:25: fatal error: ares_config.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1

diff -u setup_cares_orig.py setup_cares.py --- setup_cares_orig.py Mon Aug 13 08:08:32 2018 +++ setup_cares.py Mon Aug 13 08:09:59 2018 @@ -85,9 +85,10 @@ elif sys.platform.startswith('openbsd'): self.compiler.add_include_dir(os.path.join(self.cares_dir, 'src/config_openbsd')) elif sys.platform.startswith('sunos'):

saghul commented 6 years ago

Hi @hergla! Can you please send it as a PR?