[pypy-issue] Issue #2510: Error installing fastcache: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’ (pypy/pypy)
Jorge Ferrando
issues-reply at bitbucket.org
Wed Mar 22 04:40:04 EDT 2017
New issue 2510: Error installing fastcache: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
https://bitbucket.org/pypy/pypy/issues/2510/error-installing-fastcache-pylistobject
Jorge Ferrando:
Running latest pypy version on Ubuntu 16.04.2 LTS:
```
#!bash
pypy --version
Python 2.7.13 (fa3249d55d15, Mar 19 2017, 20:21:48)
[PyPy 5.7.0 with GCC 6.2.0 20160901]
```
An trying to pip install fastcache, it fails with the errors below:
```
#!bash
Collecting fastcache
Using cached fastcache-1.0.2.tar.gz
Installing collected packages: fastcache
Running setup.py install for fastcache ... error
Complete output from command /usr/local/bin/pypy -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-L928Ih/fastcache/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-KOIGzk-record/install-record.txt --single-version-externally-managed --compile:
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/fastcache
copying fastcache/benchmark.py -> build/lib.linux-x86_64-2.7/fastcache
copying fastcache/__init__.py -> build/lib.linux-x86_64-2.7/fastcache
creating build/lib.linux-x86_64-2.7/fastcache/tests
copying fastcache/tests/test_thread.py -> build/lib.linux-x86_64-2.7/fastcache/tests
copying fastcache/tests/test_clrucache.py -> build/lib.linux-x86_64-2.7/fastcache/tests
copying fastcache/tests/test_functools.py -> build/lib.linux-x86_64-2.7/fastcache/tests
copying fastcache/tests/__init__.py -> build/lib.linux-x86_64-2.7/fastcache/tests
running build_ext
building 'fastcache._lrucache' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -DNDEBUG -O2 -fPIC -I/opt/pypy2-v5.7.0-linux64/include -c src/_lrucache.c -o build/temp.linux-x86_64-2.7/src/_lrucache.o
In file included from /opt/pypy2-v5.7.0-linux64/include/Python.h:81:0,
from src/_lrucache.c:1:
src/_lrucache.c: In function ‘hashseq_traverse’:
src/_lrucache.c:146:36: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
Py_VISIT(((PyListObject *)self)->ob_item[i]);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:287:21: note: in definition of macro ‘Py_VISIT’
if (op) { \
^
src/_lrucache.c:146:36: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
Py_VISIT(((PyListObject *)self)->ob_item[i]);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:288:55: note: in definition of macro ‘Py_VISIT’
int vret = visit((PyObject *)(op), arg); \
^
src/_lrucache.c: In function ‘hashseq_clear’:
src/_lrucache.c:157:24: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
PyObject **item = a->ob_item;
^
src/_lrucache.c:163:10: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
a->ob_item = NULL;
^
src/_lrucache.c:164:10: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘allocated’
a->allocated = 0;
^
src/_lrucache.c: In function ‘hashseq_dealloc’:
src/_lrucache.c:188:9: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
if (lo->ob_item != NULL){
^
In file included from /opt/pypy2-v5.7.0-linux64/include/Python.h:81:0,
from src/_lrucache.c:1:
src/_lrucache.c:191:20: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
Py_XDECREF(lo->ob_item[i]);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:47:34: note: in definition of macro ‘Py_XDECREF’
#define Py_XDECREF(op) do { if ((op) == NULL) ; else Py_DECREF(op); } while (0)
^
src/_lrucache.c:191:20: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
Py_XDECREF(lo->ob_item[i]);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:40:29: note: in definition of macro ‘Py_DECREF’
if (--((PyObject *)(op))->ob_refcnt != 0) \
^
src/_lrucache.c:191:7: note: in expansion of macro ‘Py_XDECREF’
Py_XDECREF(lo->ob_item[i]);
^
src/_lrucache.c:191:20: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
Py_XDECREF(lo->ob_item[i]);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:43:38: note: in definition of macro ‘Py_DECREF’
_Py_Dealloc((PyObject *)(op)); \
^
src/_lrucache.c:191:7: note: in expansion of macro ‘Py_XDECREF’
Py_XDECREF(lo->ob_item[i]);
^
src/_lrucache.c:193:18: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
PyMem_FREE(lo->ob_item);
^
src/_lrucache.c: In function ‘hashseq_richcompare’:
src/_lrucache.c:229:13: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
if (vl->ob_item[i] != wl->ob_item[i]){
^
src/_lrucache.c:229:31: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
if (vl->ob_item[i] != wl->ob_item[i]){
^
src/_lrucache.c:231:44: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
int k = PyObject_RichCompareBool(vl->ob_item[i],
^
src/_lrucache.c:232:44: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
wl->ob_item[i], Py_EQ);
^
src/_lrucache.c: In function ‘cache_get_doc’:
src/_lrucache.c:436:9: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_doc’
if (fn->func_doc == NULL)
^
In file included from /opt/pypy2-v5.7.0-linux64/include/Python.h:81:0,
from src/_lrucache.c:1:
src/_lrucache.c:439:16: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_doc’
INC_RETURN(fn->func_doc);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:37:40: note: in definition of macro ‘Py_INCREF’
#define Py_INCREF(ob) (((PyObject *)(ob))->ob_refcnt++)
^
src/_lrucache.c:439:3: note: in expansion of macro ‘INC_RETURN’
INC_RETURN(fn->func_doc);
^
src/_lrucache.c:439:16: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_doc’
INC_RETURN(fn->func_doc);
^
src/_lrucache.c:122:47: note: in definition of macro ‘INC_RETURN’
#define INC_RETURN(op) return Py_INCREF(op), (op)
^
src/_lrucache.c: In function ‘restricted’:
src/_lrucache.c:448:10: warning: implicit declaration of function ‘PyEval_GetRestricted’ [-Wimplicit-function-declaration]
if (!PyEval_GetRestricted())
^
src/_lrucache.c: In function ‘func_get_dict’:
src/_lrucache.c:462:11: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
if (op->func_dict == NULL) {
^
src/_lrucache.c:463:11: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
op->func_dict = PyDict_New();
^
src/_lrucache.c:464:15: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
if (op->func_dict == NULL)
^
In file included from /opt/pypy2-v5.7.0-linux64/include/Python.h:81:0,
from src/_lrucache.c:1:
src/_lrucache.c:467:17: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
Py_INCREF(op->func_dict);
^
/opt/pypy2-v5.7.0-linux64/include/object.h:37:40: note: in definition of macro ‘Py_INCREF’
#define Py_INCREF(ob) (((PyObject *)(ob))->ob_refcnt++)
^
src/_lrucache.c:468:14: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
return op->func_dict;
^
src/_lrucache.c: In function ‘func_set_dict’:
src/_lrucache.c:490:13: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
tmp = op->func_dict;
^
src/_lrucache.c:492:7: error: ‘PyFunctionObject {aka struct <anonymous>}’ has no member named ‘func_dict’
op->func_dict = value;
^
src/_lrucache.c: In function ‘hashseq_arghash’:
src/_lrucache.c:558:8: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
p = v->ob_item;
^
src/_lrucache.c:560:9: warning: implicit declaration of function ‘Py_EnterRecursiveCall’ [-Wimplicit-function-declaration]
if (Py_EnterRecursiveCall(" in computing hash")){
^
src/_lrucache.c:565:5: warning: implicit declaration of function ‘Py_LeaveRecursiveCall’ [-Wimplicit-function-declaration]
Py_LeaveRecursiveCall();
^
src/_lrucache.c: In function ‘make_key’:
src/_lrucache.c:630:5: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
lo->ob_item = (PyObject **) PyMem_MALLOC(nbytes);
^
src/_lrucache.c:631:8: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
if(lo->ob_item == NULL){
^
src/_lrucache.c:635:12: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘ob_item’
memset(lo->ob_item, 0, nbytes);
^
src/_lrucache.c:638:5: error: ‘PyListObject {aka struct <anonymous>}’ has no member named ‘allocated’
lo->allocated = size;
^
src/_lrucache.c: In function ‘cache_call’:
src/_lrucache.c:849:41: error: ‘PyDictObject {aka struct <anonymous>}’ has no member named ‘ma_used’
if (((PyDictObject *)co->cache_dict)->ma_used == co->maxsize){
^
src/_lrucache.c: In function ‘cache_info’:
src/_lrucache.c:969:66: error: ‘PyDictObject {aka struct <anonymous>}’ has no member named ‘ma_used’
((PyDictObject *)co->cache_dict)->ma_used);
^
src/_lrucache.c:973:66: error: ‘PyDictObject {aka struct <anonymous>}’ has no member named ‘ma_used’
((PyDictObject *)co->cache_dict)->ma_used);
^
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/local/bin/pypy -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-L928Ih/fastcache/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-KOIGzk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-L928Ih/fastcache/
```
More information about the pypy-issue
mailing list