Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Solaris failed #72

Closed
hergla opened this issue Aug 13, 2018 · 1 comment
Closed

Build on Solaris failed #72

hergla opened this issue Aug 13, 2018 · 1 comment

Comments

@hergla
Copy link

hergla commented Aug 13, 2018

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/ares__close_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/ares__close_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'):

  •        self.compiler.add_include_dir(os.path.join(self.cares_dir, 'src/config_sunos'))
           self.compiler.add_library('socket')
           self.compiler.add_library('nsl')
    
  •        self.compiler.add_library('lkstat')
    
  •        self.compiler.add_library('kstat')
       elif sys.platform == 'win32':
           self.compiler.add_include_dir(os.path.join(self.cares_dir, 'src/config_win32'))
           self.extensions[0].extra_link_args = ['/NODEFAULTLIB:libcmt']
    
@saghul
Copy link
Owner

saghul commented Aug 13, 2018

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

@saghul saghul closed this as completed in 07ae36f Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants