sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

cannot compile on OS X Sierra #47

Closed nilsbecker closed 6 years ago

nilsbecker commented 6 years ago

hi, see also issue #45 . after failing to install via conda i tried compilation from source after cloning, i do this:

$ type python
python is hashed (/Users/nbecker/Apps/anaconda/bin/python)

$ python setup.py check_ext
[...]
5 warnings and 3 errors generated.

 isLinuxOrDarwin:  True
         isLinux:  False
        isDarwin:  True
         isWin32:  False

      OSX target:  10.7

          x11lib:  ['/usr/X11/lib']
          x11inc:  ['/usr/X11/include']
         x11libs:  []
      x11ldflags:  []
       x11cflags:  []

        wxconfig:
           wxdir:  None
           wxlib:  []
           wxinc:  []
          wxlibs:  []
       wxldflags:  []
           wxcxx:  []

      gtkldflags:  ['-L/opt/X11/lib', '-L/usr/local/Cellar/gtk+/2.24.31_1/lib', '-L/usr/local/Cellar/pango/1.40.12/lib', '-L/usr/local/Cellar/atk/2.26.0/lib', '-L/usr/local/Cellar/gdk-pixbuf/2.36.11/lib', '-L/usr/local/Cellar/glib/2.54.1/lib', '-L/usr/local/opt/gettext/lib', '-lgtk-quartz-2.0', '-lgdk-quartz-2.0', '-lpangocairo-1.0', '-lpango-1.0', '-latk-1.0', '-lcairo', '-lgdk_pixbuf-2.0', '-lgio-2.0', '-lgobject-2.0', '-lglib-2.0', '-lintl', '-Wl,-framework', '-Wl,CoreFoundation']
       gtkcflags:  ['-D_REENTRANT', '-I/opt/X11/include/cairo', '-I/opt/X11/include/pixman-1', '-I/opt/X11/include', '-I/opt/X11/include/freetype2', '-I/opt/X11/include/libpng16', '-I/opt/X11/include', '-I/opt/X11/include/libpng16', '-I/usr/local/Cellar/gtk+/2.24.31_1/include/gtk-2.0', '-I/usr/local/Cellar/gtk+/2.24.31_1/lib/gtk-2.0/include', '-I/usr/local/Cellar/pango/1.40.12/include/pango-1.0', '-I/usr/local/Cellar/harfbuzz/1.5.1/include/harfbuzz', '-I/usr/local/Cellar/graphite2/1.3.10/include', '-I/usr/local/Cellar/pango/1.40.12/include/pango-1.0', '-I/usr/local/Cellar/atk/2.26.0/include/atk-1.0', '-I/usr/local/Cellar/gdk-pixbuf/2.36.11/include/gdk-pixbuf-2.0', '-I/usr/local/Cellar/glib/2.54.1/include/glib-2.0', '-I/usr/local/Cellar/glib/2.54.1/lib/glib-2.0/include', '-I/usr/local/opt/gettext/include', '-I/usr/local/Cellar/pcre/8.41/include']

       qmake-qt4:  /Users/nbecker/Apps/anaconda/bin/qmake
          qt4dir:
          qt4inc:  ['/Users/aaronmeurer/anaconda/envs/_build/include']
          qt4lib:  ['/Users/aaronmeurer/anaconda/envs/_build/lib']
         qt4libs:  []
      qt4ldflags:  []
     Qt4 version:  [4, 8, 6]

       qmake-qt5:
          qt5dir:
          qt5inc:  []
          qt5lib:  []
         qt5libs:  []
      qt5ldflags:  []
     Qt5 version:  None

           gsdir:  None
           gsinc:  []
           gslib:  []
          gslibs:  []
       gsldflags:  []

           grdir:  lib/python2.7/site-packages/gr-0.27.0.post7-py2.7-macosx-10.6-x86_64.egg/gr

 freetype-config:  /Users/nbecker/Apps/anaconda/bin/freetype-config
       ftldflags:  ['-L/Users/nbecker/Apps/anaconda/lib', '-lfreetype', '-lz', '-lbz2', '-lpng16']
        ftcflags:  ['-I/Users/nbecker/Apps/anaconda/include/freetype2']

        mupdfinc:  []
       mupdflibs:  []
    mupdfldflags:  []

        cairoinc:  ['/usr/local/include']
        cairolib:  []
       cairolibs:  ['cairo', 'pixman-1', 'pthread']
    cairoldflags:  ['-L/usr/local/lib']

      opengllibs:  []
    opengldflags:  ['-framework', 'OpenGL', '-framework', 'Cocoa']

     disable-x11:  False
      disable-xt:  False
     disable-xft:  False
      disable-wx:  True
     disable-qt4:  False
     disable-qt5:  True
     disable-gtk:  False
      disable-gs:  True
     disable-fig:  False
     disable-svg:  False
    disable-html:  False
     disable-pgf:  False
     disable-wmf:  False
     disable-mov:  True
  disable-opengl:  False
  disable-quartz:  False
disable-freetype:  False
   disable-mupdf:  True
   disable-cairo:  False

some errors occur during the mupdf check for example. i then try to compile anyway:

$ python setup.py install

this fails. besides many warning messages there is this error:

In file included from lib/gks/x11.c:40:
/usr/X11/include/X11/Intrinsic.h:1855:3: error: expected function body after function declarator
) _X_ATTRIBUTE_PRINTF(2,3);
$gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
jheinen commented 6 years ago

In the meantime, you can pip install gr.

nilsbecker commented 6 years ago

thanks, i just tried, but i get a certificate error:

pip install gr
Collecting gr
  Using cached gr-1.0.0.tar.gz
Requirement already satisfied: numpy>=1.6 in ./Apps/anaconda/lib/python2.7/site-packages (from gr)
Building wheels for collected packages: gr
  Running setup.py bdist_wheel for gr ... error
  Complete output from command /Users/nbecker/Apps/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bh/0mc1q9cn5ps48h60dygx_lhm00011n/T/pip-build-PdP4xG/gr/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 /var/folders/bh/0mc1q9cn5ps48h60dygx_lhm00011n/T/tmpTCIlDIpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

pip 9.0.1 from /Users/nbecker/Apps/anaconda/lib/python2.7/site-packages (python 2.7)

nilsbecker commented 6 years ago

this is working for me now, after clearing all pip caches