Hi Stuart.

PyCairo should not abuse the API by directly accessing members of
structures, this is not supported on pypy

Cheers,
fijal

On Tue, Aug 15, 2017 at 12:57 AM, Stuart Axon via pypy-dev
<pypy-dev@python.org> wrote:
> Found this trying to compile pycairo, is it worth opening a bug about? (I
> realise there is CairoCFFI, but they don't have feature parity - OTOH, CFFI
> probably is the way to go eventually).
>
>
> $ python setup.py install
> running install
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.7
> creating build/lib.linux-x86_64-2.7/cairo
> copying cairo/__init__.py -> build/lib.linux-x86_64-2.7/cairo
> running build_ext
> building 'cairo._cairo' extension
> creating build/temp.linux-x86_64-2.7
> creating build/temp.linux-x86_64-2.7/cairo
> cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
> -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/device.c -o
> build/temp.linux-x86_64-2.7/cairo/device.o -fno-strict-aliasing
> cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
> -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/bufferproxy.c -o
> build/temp.linux-x86_64-2.7/cairo/bufferproxy.o -fno-strict-aliasing
> cc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/cairo -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
> -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/home/stu/.virtualenvs/pypy-nightly/include -c cairo/error.c -o
> build/temp.linux-x86_64-2.7/cairo/error.o -fno-strict-aliasing
> In file included from
> /home/stu/.virtualenvs/pypy-nightly/include/Python.h:81:0,
>                  from cairo/error.c:32:
> cairo/error.c: In function ‘error_init’:
> cairo/error.c:111:35: error: ‘PyBaseExceptionObject {aka struct
> <anonymous>}’ has no member named ‘args’
>      if(PyTuple_GET_SIZE(self->base.args) >= 2) {
>                                    ^
> /home/stu/.virtualenvs/pypy-nightly/include/object.h:61:39: note: in
> definition of macro ‘Py_SIZE’
> #define Py_SIZE(ob)  (((PyVarObject*)(ob))->ob_size)
>                                        ^~
> cairo/error.c:111:8: note: in expansion of macro ‘PyTuple_GET_SIZE’
>      if(PyTuple_GET_SIZE(self->base.args) >= 2) {
>         ^~~~~~~~~~~~~~~~
> In file included from
> /home/stu/.virtualenvs/pypy-nightly/include/Python.h:108:0,
>                  from cairo/error.c:32:
> cairo/error.c:112:49: error: ‘PyBaseExceptionObject {aka struct
> <anonymous>}’ has no member named ‘args’
>          status_obj = PyTuple_GET_ITEM(self->base.args, 1);
>                                                  ^
> /home/stu/.virtualenvs/pypy-nightly/include/tupleobject.h:23:53: note: in
> definition of macro ‘PyTuple_GET_ITEM’
> #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
>                                                      ^~
> In file included from
> /home/stu/.virtualenvs/pypy-nightly/include/Python.h:81:0,
>                  from cairo/error.c:32:
> cairo/error.c: In function ‘error_str’:
> cairo/error.c:152:36: error: ‘PyBaseExceptionObject {aka struct
> <anonymous>}’ has no member named ‘args’
>      if (PyTuple_GET_SIZE(self->base.args) >= 1) {
>                                     ^
> /home/stu/.virtualenvs/pypy-nightly/include/object.h:61:39: note: in
> definition of macro ‘Py_SIZE’
> #define Py_SIZE(ob)  (((PyVarObject*)(ob))->ob_size)
>                                        ^~
> cairo/error.c:152:9: note: in expansion of macro ‘PyTuple_GET_SIZE’
>      if (PyTuple_GET_SIZE(self->base.args) >= 1) {
>          ^~~~~~~~~~~~~~~~
> In file included from
> /home/stu/.virtualenvs/pypy-nightly/include/Python.h:108:0,
>                  from cairo/error.c:32:
> cairo/error.c:153:56: error: ‘PyBaseExceptionObject {aka struct
> <anonymous>}’ has no member named ‘args’
>          return PyObject_Str(PyTuple_GET_ITEM(self->base.args, 0));
>                                                         ^
> /home/stu/.virtualenvs/pypy-nightly/include/tupleobject.h:23:53: note: in
> definition of macro ‘PyTuple_GET_ITEM’
> #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
>                                                      ^~
> error: command 'cc' failed with exit status 1
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev@python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to