[pypy-issue] Issue #2404: Building matplotlib fails on OSX (pypy/pypy)

Prabhu Ramachandran issues-reply at bitbucket.org
Sat Sep 24 09:38:59 EDT 2016


New issue 2404: Building matplotlib fails on OSX
https://bitbucket.org/pypy/pypy/issues/2404/building-matplotlib-fails-on-osx

Prabhu Ramachandran:

Am trying to build matplotlib. I have pypy2-v5.4.1-osx64 installed and have installed the original numpy (from git) which is slow but does work.  When I try to build matplotlib from the latest source or via pip I get the following error:

```
$ pip install matplotlib 
[...]
building 'matplotlib.backends._macosx' extension
    cc -arch x86_64 -O2 -fPIC -Wimplicit -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__macosx_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/Users/prabhu/usr/pypy2-v5.4.1-osx64/site-packages/numpy-1.12.0.dev0+a6574b2-py2.7-macosx-10.11-x86_64.egg/numpy/core/include -I/Users/prabhu/usr/pypy2-v5.4.1-osx64/site-packages/numpy-1.12.0.dev0+a6574b2-py2.7-macosx-10.11-x86_64.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11/include -I/opt/X11/include -I. -Iextern/agg24-svn/include -I/Users/prabhu/usr/pypy2-v5.4.1-osx64/include -c src/_macosx.m -o build/temp.macosx-10.11-x86_64-2.7/src/_macosx.o
    src/_macosx.m:3743:17: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
        data = [rep representationUsingType:filetype properties:nil];
                    ^                                           ~~~
    src/_macosx.m:5167:51: warning: incompatible pointer types passing 'unichar *' (aka 'unsigned short *') to parameter of type 'const wchar_t *' (aka 'const int *') [-Wincompatible-pointer-types]
            PyObject* string =  PyUnicode_FromUnicode(buffer, n);
                                                      ^~~~~~
    /Users/prabhu/usr/pypy2-v5.4.1-osx64/include/pypy_decl.h:907:63: note: passing argument to parameter 'arg0' here
    PyAPI_FUNC(PyObject *) PyPyUnicode_FromUnicode(const wchar_t *arg0, Py_ssize_t arg1);
                                                                  ^
    src/_macosx.m:6384:5: error: use of undeclared identifier 'PyOS_InputHook'
        PyOS_InputHook = wait_for_stdin;
        ^
    2 warnings and 1 error generated.
    error: command 'cc' failed with exit status 1
```

With the git version when I run `setup.py install` I get:

```
building 'matplotlib.backends._macosx' extension
cc -arch x86_64 -O2 -fPIC -Wimplicit -I/usr/local/include -I/usr/include -I/usr/X11/include -I/opt/X11/include -I. -I/Users/prabhu/usr/pypy2-v5.4.1-osx64/include -c src/_macosx.m -o build/temp.macosx-10.11-x86_64-2.7/src/_macosx.o
src/_macosx.m:1901:51: warning: incompatible pointer types passing 'unichar *'
      (aka 'unsigned short *') to parameter of type 'const wchar_t *'
      (aka 'const int *') [-Wincompatible-pointer-types]
        PyObject* string =  PyUnicode_FromUnicode(buffer, n);
                                                  ^~~~~~
/Users/prabhu/usr/pypy2-v5.4.1-osx64/include/pypy_decl.h:907:63: note: passing
      argument to parameter 'arg0' here
PyAPI_FUNC(PyObject *) PyPyUnicode_FromUnicode(const wchar_t *arg0, Py_s...
                                                              ^
src/_macosx.m:3187:5: error: use of undeclared identifier 'PyOS_InputHook'
    PyOS_InputHook = wait_for_stdin;
    ^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
```




More information about the pypy-issue mailing list