aek82
May 18th, 2007, 12:41 AM
Hello,
I'm fairly new to developing Python and on the Linux platform in general. My latest problem is getting a PostgreSQL data adapter, pgasync, (http://jamwt.com/pgasync/) to install on the python interpreter.
According to the instructions for installation, I'm suppose to type the following to initiate setup.
sudo python setup.py install
The following errors are given after running that command.
running install
running build
running build_py
running build_ext
building 'pgasync.cache' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c pgasync/cache.c -o build/temp.linux-i686-2.5/pgasync/cache.o
pgasync/cache.c:4:20: error: Python.h: No such file or directory
pgasync/cache.c:5:26: error: structmember.h: No such file or directory
In file included from pgasync/cache.c:22:
pgasync/convert.h:5:24: error: netinet/in.h: No such file or directory
pgasync/cache.c:23:20: error: stdlib.h: No such file or directory
pgasync/cache.c:24:20: error: string.h: No such file or directory
pgasync/cache.c:27: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:28: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:30: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:31: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:33: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:37: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:38: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:39: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:43: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:44: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:62: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
pgasync/cache.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:72: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:73: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:283: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:284: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:331: error: ‘__pyx_n_append’ undeclared here (not in a function)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:332: error: ‘__pyx_n_realloc’ undeclared here (not in a function)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:346: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:352: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:361: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:368: error: array type has incomplete element type
pgasync/cache.c:369: error: ‘PyCFunction’ undeclared here (not in a function)
pgasync/cache.c:369: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_realloc’
pgasync/cache.c:370: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_add’
pgasync/cache.c:371: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_finish’
pgasync/cache.c:375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_number_Cache’
pgasync/cache.c:416: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_sequence_Cache’
pgasync/cache.c:429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_mapping_Cache’
pgasync/cache.c:435: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_buffer_Cache’
pgasync/cache.c:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_type_5cache_Cache’
pgasync/cache.c:491: error: array type has incomplete element type
pgasync/cache.c:497: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c:498: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c: In function ‘__Pyx_InternStrings’:
pgasync/cache.c:528: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: warning: implicit declaration of function ‘PyString_InternFromString’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘s’
pgasync/cache.c:529: warning: assignment makes pointer from integer without a cast
pgasync/cache.c:530: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:537:21: error: compile.h: No such file or directory
pgasync/cache.c:538:25: error: frameobject.h: No such file or directory
pgasync/cache.c:539:23: error: traceback.h: No such file or directory
pgasync/cache.c: In function ‘__Pyx_AddTraceback’:
pgasync/cache.c:542: error: ‘PyObject’ undeclared (first use in this function)
pgasync/cache.c:542: error: (Each undeclared identifier is reported only once
pgasync/cache.c:542: error: for each function it appears in.)
pgasync/cache.c:542: error: ‘py_srcfile’ undeclared (first use in this function)
pgasync/cache.c:542: error: invalid operands to binary *
pgasync/cache.c:542: warning: statement with no effect
pgasync/cache.c:543: error: ‘py_funcname’ undeclared (first use in this function)
pgasync/cache.c:543: error: invalid operands to binary *
pgasync/cache.c:543: warning: statement with no effect
pgasync/cache.c:544: error: ‘py_globals’ undeclared (first use in this function)
pgasync/cache.c:544: error: invalid operands to binary *
pgasync/cache.c:544: warning: statement with no effect
pgasync/cache.c:545: error: ‘empty_tuple’ undeclared (first use in this function)
pgasync/cache.c:545: error: invalid operands to binary *
pgasync/cache.c:545: warning: statement with no effect
pgasync/cache.c:546: error: ‘empty_string’ undeclared (first use in this function)
pgasync/cache.c:546: error: invalid operands to binary *
pgasync/cache.c:546: warning: statement with no effect
pgasync/cache.c:547: error: ‘PyCodeObject’ undeclared (first use in this function)
pgasync/cache.c:547: error: ‘py_code’ undeclared (first use in this function)
pgasync/cache.c:547: error: invalid operands to binary *
pgasync/cache.c:547: warning: statement with no effect
pgasync/cache.c:548: error: ‘PyFrameObject’ undeclared (first use in this function)
pgasync/cache.c:548: error: ‘py_frame’ undeclared (first use in this function)
pgasync/cache.c:548: error: invalid operands to binary *
pgasync/cache.c:548: warning: statement with no effect
pgasync/cache.c:550: warning: implicit declaration of function ‘PyString_FromString’
pgasync/cache.c:550: warning: statement with no effect
pgasync/cache.c:552: warning: statement with no effect
pgasync/cache.c:554: warning: implicit declaration of function ‘PyModule_GetDict’
pgasync/cache.c:554: error: ‘__pyx_m’ undeclared (first use in this function)
pgasync/cache.c:554: warning: statement with no effect
pgasync/cache.c:556: warning: implicit declaration of function ‘PyTuple_New’
pgasync/cache.c:556: warning: statement with no effect
pgasync/cache.c:558: warning: statement with no effect
pgasync/cache.c:560: warning: implicit declaration of function ‘PyCode_New’
pgasync/cache.c:575: warning: statement with no effect
pgasync/cache.c:577: warning: implicit declaration of function ‘PyFrame_New’
pgasync/cache.c:578: warning: implicit declaration of function ‘PyThreadState_Get’
pgasync/cache.c:582: warning: statement with no effect
pgasync/cache.c:584: error: request for member ‘f_lineno’ in something not a structure or union
pgasync/cache.c:584: warning: statement with no effect
pgasync/cache.c:585: warning: implicit declaration of function ‘PyTraceBack_Here’
pgasync/cache.c:587: warning: implicit declaration of function ‘Py_XDECREF’
error: command 'gcc' failed with exit status 1
Now the README says to set a flag, REBUILD_PYREX, to true in the setup.py file if you encounter problems compiling the 'cache.o', which i did, except this error occurs after attempting installation with the aforementioned install command.
running install
running build
running build_py
running build_ext
building 'pgasync.cache' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c pgasync/cache.c -o build/temp.linux-i686-2.5/pgasync/cache.o
pgasync/cache.c:4:20: error: Python.h: No such file or directory
pgasync/cache.c:5:26: error: structmember.h: No such file or directory
In file included from pgasync/cache.c:22:
pgasync/convert.h:5:24: error: netinet/in.h: No such file or directory
pgasync/cache.c:23:20: error: stdlib.h: No such file or directory
pgasync/cache.c:24:20: error: string.h: No such file or directory
pgasync/cache.c:27: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:28: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:30: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:31: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:33: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:37: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:38: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:39: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:43: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:44: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:62: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
pgasync/cache.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:72: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:73: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:283: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:284: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:331: error: ‘__pyx_n_append’ undeclared here (not in a function)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:332: error: ‘__pyx_n_realloc’ undeclared here (not in a function)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:346: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:352: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:361: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:368: error: array type has incomplete element type
pgasync/cache.c:369: error: ‘PyCFunction’ undeclared here (not in a function)
pgasync/cache.c:369: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_realloc’
pgasync/cache.c:370: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_add’
pgasync/cache.c:371: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_finish’
pgasync/cache.c:375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_number_Cache’
pgasync/cache.c:416: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_sequence_Cache’
pgasync/cache.c:429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_mapping_Cache’
pgasync/cache.c:435: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_buffer_Cache’
pgasync/cache.c:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_type_5cache_Cache’
pgasync/cache.c:491: error: array type has incomplete element type
pgasync/cache.c:497: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c:498: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c: In function ‘__Pyx_InternStrings’:
pgasync/cache.c:528: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: warning: implicit declaration of function ‘PyString_InternFromString’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘s’
pgasync/cache.c:529: warning: assignment makes pointer from integer without a cast
pgasync/cache.c:530: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:537:21: error: compile.h: No such file or directory
pgasync/cache.c:538:25: error: frameobject.h: No such file or directory
pgasync/cache.c:539:23: error: traceback.h: No such file or directory
pgasync/cache.c: In function ‘__Pyx_AddTraceback’:
pgasync/cache.c:542: error: ‘PyObject’ undeclared (first use in this function)
pgasync/cache.c:542: error: (Each undeclared identifier is reported only once
pgasync/cache.c:542: error: for each function it appears in.)
pgasync/cache.c:542: error: ‘py_srcfile’ undeclared (first use in this function)
pgasync/cache.c:542: error: invalid operands to binary *
pgasync/cache.c:542: warning: statement with no effect
pgasync/cache.c:543: error: ‘py_funcname’ undeclared (first use in this function)
pgasync/cache.c:543: error: invalid operands to binary *
pgasync/cache.c:543: warning: statement with no effect
pgasync/cache.c:544: error: ‘py_globals’ undeclared (first use in this function)
pgasync/cache.c:544: error: invalid operands to binary *
pgasync/cache.c:544: warning: statement with no effect
pgasync/cache.c:545: error: ‘empty_tuple’ undeclared (first use in this function)
pgasync/cache.c:545: error: invalid operands to binary *
pgasync/cache.c:545: warning: statement with no effect
pgasync/cache.c:546: error: ‘empty_string’ undeclared (first use in this function)
pgasync/cache.c:546: error: invalid operands to binary *
pgasync/cache.c:546: warning: statement with no effect
pgasync/cache.c:547: error: ‘PyCodeObject’ undeclared (first use in this function)
pgasync/cache.c:547: error: ‘py_code’ undeclared (first use in this function)
pgasync/cache.c:547: error: invalid operands to binary *
pgasync/cache.c:547: warning: statement with no effect
pgasync/cache.c:548: error: ‘PyFrameObject’ undeclared (first use in this function)
pgasync/cache.c:548: error: ‘py_frame’ undeclared (first use in this function)
pgasync/cache.c:548: error: invalid operands to binary *
pgasync/cache.c:548: warning: statement with no effect
pgasync/cache.c:550: warning: implicit declaration of function ‘PyString_FromString’
pgasync/cache.c:550: warning: statement with no effect
pgasync/cache.c:552: warning: statement with no effect
pgasync/cache.c:554: warning: implicit declaration of function ‘PyModule_GetDict’
pgasync/cache.c:554: error: ‘__pyx_m’ undeclared (first use in this function)
pgasync/cache.c:554: warning: statement with no effect
pgasync/cache.c:556: warning: implicit declaration of function ‘PyTuple_New’
pgasync/cache.c:556: warning: statement with no effect
pgasync/cache.c:558: warning: statement with no effect
pgasync/cache.c:560: warning: implicit declaration of function ‘PyCode_New’
pgasync/cache.c:575: warning: statement with no effect
pgasync/cache.c:577: warning: implicit declaration of function ‘PyFrame_New’
pgasync/cache.c:578: warning: implicit declaration of function ‘PyThreadState_Get’
pgasync/cache.c:582: warning: statement with no effect
pgasync/cache.c:584: error: request for member ‘f_lineno’ in something not a structure or union
pgasync/cache.c:584: warning: statement with no effect
pgasync/cache.c:585: warning: implicit declaration of function ‘PyTraceBack_Here’
pgasync/cache.c:587: warning: implicit declaration of function ‘Py_XDECREF’
error: command 'gcc' failed with exit status 1
Any help would be appreciated. Thanks.
Alex
I'm fairly new to developing Python and on the Linux platform in general. My latest problem is getting a PostgreSQL data adapter, pgasync, (http://jamwt.com/pgasync/) to install on the python interpreter.
According to the instructions for installation, I'm suppose to type the following to initiate setup.
sudo python setup.py install
The following errors are given after running that command.
running install
running build
running build_py
running build_ext
building 'pgasync.cache' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c pgasync/cache.c -o build/temp.linux-i686-2.5/pgasync/cache.o
pgasync/cache.c:4:20: error: Python.h: No such file or directory
pgasync/cache.c:5:26: error: structmember.h: No such file or directory
In file included from pgasync/cache.c:22:
pgasync/convert.h:5:24: error: netinet/in.h: No such file or directory
pgasync/cache.c:23:20: error: stdlib.h: No such file or directory
pgasync/cache.c:24:20: error: string.h: No such file or directory
pgasync/cache.c:27: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:28: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:30: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:31: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:33: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:37: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:38: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:39: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:43: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:44: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:62: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
pgasync/cache.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:72: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:73: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:283: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:284: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:331: error: ‘__pyx_n_append’ undeclared here (not in a function)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:332: error: ‘__pyx_n_realloc’ undeclared here (not in a function)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:346: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:352: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:361: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:368: error: array type has incomplete element type
pgasync/cache.c:369: error: ‘PyCFunction’ undeclared here (not in a function)
pgasync/cache.c:369: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_realloc’
pgasync/cache.c:370: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_add’
pgasync/cache.c:371: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_finish’
pgasync/cache.c:375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_number_Cache’
pgasync/cache.c:416: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_sequence_Cache’
pgasync/cache.c:429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_mapping_Cache’
pgasync/cache.c:435: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_buffer_Cache’
pgasync/cache.c:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_type_5cache_Cache’
pgasync/cache.c:491: error: array type has incomplete element type
pgasync/cache.c:497: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c:498: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c: In function ‘__Pyx_InternStrings’:
pgasync/cache.c:528: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: warning: implicit declaration of function ‘PyString_InternFromString’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘s’
pgasync/cache.c:529: warning: assignment makes pointer from integer without a cast
pgasync/cache.c:530: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:537:21: error: compile.h: No such file or directory
pgasync/cache.c:538:25: error: frameobject.h: No such file or directory
pgasync/cache.c:539:23: error: traceback.h: No such file or directory
pgasync/cache.c: In function ‘__Pyx_AddTraceback’:
pgasync/cache.c:542: error: ‘PyObject’ undeclared (first use in this function)
pgasync/cache.c:542: error: (Each undeclared identifier is reported only once
pgasync/cache.c:542: error: for each function it appears in.)
pgasync/cache.c:542: error: ‘py_srcfile’ undeclared (first use in this function)
pgasync/cache.c:542: error: invalid operands to binary *
pgasync/cache.c:542: warning: statement with no effect
pgasync/cache.c:543: error: ‘py_funcname’ undeclared (first use in this function)
pgasync/cache.c:543: error: invalid operands to binary *
pgasync/cache.c:543: warning: statement with no effect
pgasync/cache.c:544: error: ‘py_globals’ undeclared (first use in this function)
pgasync/cache.c:544: error: invalid operands to binary *
pgasync/cache.c:544: warning: statement with no effect
pgasync/cache.c:545: error: ‘empty_tuple’ undeclared (first use in this function)
pgasync/cache.c:545: error: invalid operands to binary *
pgasync/cache.c:545: warning: statement with no effect
pgasync/cache.c:546: error: ‘empty_string’ undeclared (first use in this function)
pgasync/cache.c:546: error: invalid operands to binary *
pgasync/cache.c:546: warning: statement with no effect
pgasync/cache.c:547: error: ‘PyCodeObject’ undeclared (first use in this function)
pgasync/cache.c:547: error: ‘py_code’ undeclared (first use in this function)
pgasync/cache.c:547: error: invalid operands to binary *
pgasync/cache.c:547: warning: statement with no effect
pgasync/cache.c:548: error: ‘PyFrameObject’ undeclared (first use in this function)
pgasync/cache.c:548: error: ‘py_frame’ undeclared (first use in this function)
pgasync/cache.c:548: error: invalid operands to binary *
pgasync/cache.c:548: warning: statement with no effect
pgasync/cache.c:550: warning: implicit declaration of function ‘PyString_FromString’
pgasync/cache.c:550: warning: statement with no effect
pgasync/cache.c:552: warning: statement with no effect
pgasync/cache.c:554: warning: implicit declaration of function ‘PyModule_GetDict’
pgasync/cache.c:554: error: ‘__pyx_m’ undeclared (first use in this function)
pgasync/cache.c:554: warning: statement with no effect
pgasync/cache.c:556: warning: implicit declaration of function ‘PyTuple_New’
pgasync/cache.c:556: warning: statement with no effect
pgasync/cache.c:558: warning: statement with no effect
pgasync/cache.c:560: warning: implicit declaration of function ‘PyCode_New’
pgasync/cache.c:575: warning: statement with no effect
pgasync/cache.c:577: warning: implicit declaration of function ‘PyFrame_New’
pgasync/cache.c:578: warning: implicit declaration of function ‘PyThreadState_Get’
pgasync/cache.c:582: warning: statement with no effect
pgasync/cache.c:584: error: request for member ‘f_lineno’ in something not a structure or union
pgasync/cache.c:584: warning: statement with no effect
pgasync/cache.c:585: warning: implicit declaration of function ‘PyTraceBack_Here’
pgasync/cache.c:587: warning: implicit declaration of function ‘Py_XDECREF’
error: command 'gcc' failed with exit status 1
Now the README says to set a flag, REBUILD_PYREX, to true in the setup.py file if you encounter problems compiling the 'cache.o', which i did, except this error occurs after attempting installation with the aforementioned install command.
running install
running build
running build_py
running build_ext
building 'pgasync.cache' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c pgasync/cache.c -o build/temp.linux-i686-2.5/pgasync/cache.o
pgasync/cache.c:4:20: error: Python.h: No such file or directory
pgasync/cache.c:5:26: error: structmember.h: No such file or directory
In file included from pgasync/cache.c:22:
pgasync/convert.h:5:24: error: netinet/in.h: No such file or directory
pgasync/cache.c:23:20: error: stdlib.h: No such file or directory
pgasync/cache.c:24:20: error: string.h: No such file or directory
pgasync/cache.c:27: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:28: error: expected specifier-qualifier-list before ‘PyObject’
pgasync/cache.c:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:30: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:31: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:33: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:37: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:38: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:39: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:43: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:44: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:62: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
pgasync/cache.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:72: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:73: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:283: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:284: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:331: error: ‘__pyx_n_append’ undeclared here (not in a function)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:331: warning: excess elements in struct initializer
pgasync/cache.c:331: warning: (near initialization for ‘__pyx_intern_tab[0]’)
pgasync/cache.c:332: error: ‘__pyx_n_realloc’ undeclared here (not in a function)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:332: warning: excess elements in struct initializer
pgasync/cache.c:332: warning: (near initialization for ‘__pyx_intern_tab[1]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:333: warning: excess elements in struct initializer
pgasync/cache.c:333: warning: (near initialization for ‘__pyx_intern_tab[2]’)
pgasync/cache.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pgasync/cache.c:346: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:352: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:361: error: expected ‘)’ before ‘*’ token
pgasync/cache.c:368: error: array type has incomplete element type
pgasync/cache.c:369: error: ‘PyCFunction’ undeclared here (not in a function)
pgasync/cache.c:369: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_realloc’
pgasync/cache.c:370: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_add’
pgasync/cache.c:371: error: expected ‘}’ before ‘__pyx_f_5cache_5Cache_finish’
pgasync/cache.c:375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_number_Cache’
pgasync/cache.c:416: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_sequence_Cache’
pgasync/cache.c:429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_mapping_Cache’
pgasync/cache.c:435: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_tp_as_buffer_Cache’
pgasync/cache.c:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__pyx_type_5cache_Cache’
pgasync/cache.c:491: error: array type has incomplete element type
pgasync/cache.c:497: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c:498: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initcache’
pgasync/cache.c: In function ‘__Pyx_InternStrings’:
pgasync/cache.c:528: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:529: warning: implicit declaration of function ‘PyString_InternFromString’
pgasync/cache.c:529: error: ‘__Pyx_InternTabEntry’ has no member named ‘s’
pgasync/cache.c:529: warning: assignment makes pointer from integer without a cast
pgasync/cache.c:530: error: ‘__Pyx_InternTabEntry’ has no member named ‘p’
pgasync/cache.c:537:21: error: compile.h: No such file or directory
pgasync/cache.c:538:25: error: frameobject.h: No such file or directory
pgasync/cache.c:539:23: error: traceback.h: No such file or directory
pgasync/cache.c: In function ‘__Pyx_AddTraceback’:
pgasync/cache.c:542: error: ‘PyObject’ undeclared (first use in this function)
pgasync/cache.c:542: error: (Each undeclared identifier is reported only once
pgasync/cache.c:542: error: for each function it appears in.)
pgasync/cache.c:542: error: ‘py_srcfile’ undeclared (first use in this function)
pgasync/cache.c:542: error: invalid operands to binary *
pgasync/cache.c:542: warning: statement with no effect
pgasync/cache.c:543: error: ‘py_funcname’ undeclared (first use in this function)
pgasync/cache.c:543: error: invalid operands to binary *
pgasync/cache.c:543: warning: statement with no effect
pgasync/cache.c:544: error: ‘py_globals’ undeclared (first use in this function)
pgasync/cache.c:544: error: invalid operands to binary *
pgasync/cache.c:544: warning: statement with no effect
pgasync/cache.c:545: error: ‘empty_tuple’ undeclared (first use in this function)
pgasync/cache.c:545: error: invalid operands to binary *
pgasync/cache.c:545: warning: statement with no effect
pgasync/cache.c:546: error: ‘empty_string’ undeclared (first use in this function)
pgasync/cache.c:546: error: invalid operands to binary *
pgasync/cache.c:546: warning: statement with no effect
pgasync/cache.c:547: error: ‘PyCodeObject’ undeclared (first use in this function)
pgasync/cache.c:547: error: ‘py_code’ undeclared (first use in this function)
pgasync/cache.c:547: error: invalid operands to binary *
pgasync/cache.c:547: warning: statement with no effect
pgasync/cache.c:548: error: ‘PyFrameObject’ undeclared (first use in this function)
pgasync/cache.c:548: error: ‘py_frame’ undeclared (first use in this function)
pgasync/cache.c:548: error: invalid operands to binary *
pgasync/cache.c:548: warning: statement with no effect
pgasync/cache.c:550: warning: implicit declaration of function ‘PyString_FromString’
pgasync/cache.c:550: warning: statement with no effect
pgasync/cache.c:552: warning: statement with no effect
pgasync/cache.c:554: warning: implicit declaration of function ‘PyModule_GetDict’
pgasync/cache.c:554: error: ‘__pyx_m’ undeclared (first use in this function)
pgasync/cache.c:554: warning: statement with no effect
pgasync/cache.c:556: warning: implicit declaration of function ‘PyTuple_New’
pgasync/cache.c:556: warning: statement with no effect
pgasync/cache.c:558: warning: statement with no effect
pgasync/cache.c:560: warning: implicit declaration of function ‘PyCode_New’
pgasync/cache.c:575: warning: statement with no effect
pgasync/cache.c:577: warning: implicit declaration of function ‘PyFrame_New’
pgasync/cache.c:578: warning: implicit declaration of function ‘PyThreadState_Get’
pgasync/cache.c:582: warning: statement with no effect
pgasync/cache.c:584: error: request for member ‘f_lineno’ in something not a structure or union
pgasync/cache.c:584: warning: statement with no effect
pgasync/cache.c:585: warning: implicit declaration of function ‘PyTraceBack_Here’
pgasync/cache.c:587: warning: implicit declaration of function ‘Py_XDECREF’
error: command 'gcc' failed with exit status 1
Any help would be appreciated. Thanks.
Alex