Cheetah namemapper.c won't compile on Ubunut 10.04 amd64 with python 2.6.5

Peter Lyons <[email protected]> Sun, 4 Jul 2010 09:03:55 -0600
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
Hi,

   I'm trying to run setup.py to install Cheetah 2.4.2.1 on Ubuntu Server
10.04 amd64 with gcc 4.4.3.  The python version is 2.6.5.    Here is the
failure output.  Can anyone help me get this fixed up?

building 'Cheetah._namemapper' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/cheetah
creating build/temp.linux-x86_64-2.6/cheetah/c
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c
cheetah/c/_namemapper.c -o
build/temp.linux-x86_64-2.6/cheetah/c/_namemapper.o
cheetah/c/_namemapper.c:15:20: error: Python.h: No such file or directory
cheetah/c/_namemapper.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:35: error: expected declaration specifiers or ‘...’
before ‘PyObject’
cheetah/c/_namemapper.c: In function ‘setNotFoundException’:
cheetah/c/_namemapper.c:37: error: ‘PyObject’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:37: error: (Each undeclared identifier is reported
only once
cheetah/c/_namemapper.c:37: error: for each function it appears in.)
cheetah/c/_namemapper.c:37: error: ‘exceptionStr’ undeclared (first use in
this function)
cheetah/c/_namemapper.c:38: warning: implicit declaration of function
‘PyUnicode_FromFormat’
cheetah/c/_namemapper.c:39: warning: implicit declaration of function
‘PyErr_SetObject’
cheetah/c/_namemapper.c:39: error: ‘NotFound’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:40: warning: implicit declaration of function
‘Py_XDECREF’
cheetah/c/_namemapper.c: At top level:
cheetah/c/_namemapper.c:43: error: expected declaration specifiers or ‘...’
before ‘PyObject’
cheetah/c/_namemapper.c: In function ‘wrapInternalNotFoundException’:
cheetah/c/_namemapper.c:45: error: ‘PyObject’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:45: error: ‘excType’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:45: error: ‘excValue’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:45: warning: left-hand operand of comma expression
has no effect
cheetah/c/_namemapper.c:45: error: ‘excTraceback’ undeclared (first use in
this function)
cheetah/c/_namemapper.c:45: warning: left-hand operand of comma expression
has no effect
cheetah/c/_namemapper.c:45: error: ‘isAlreadyWrapped’ undeclared (first use
in this function)
cheetah/c/_namemapper.c:45: warning: left-hand operand of comma expression
has no effect
cheetah/c/_namemapper.c:46: error: ‘newExcValue’ undeclared (first use in
this function)
cheetah/c/_namemapper.c:51: warning: implicit declaration of function
‘PyErr_Occurred’
cheetah/c/_namemapper.c:55: warning: implicit declaration of function
‘PyErr_GivenExceptionMatches’
cheetah/c/_namemapper.c:55: error: ‘NotFound’ undeclared (first use in this
function)
cheetah/c/_namemapper.c:56: warning: implicit declaration of function
‘PyErr_Fetch’
cheetah/c/_namemapper.c:57: warning: implicit declaration of function
‘PyObject_CallMethod’
cheetah/c/_namemapper.c:60: warning: implicit declaration of function
‘PyLong_AsLong’
cheetah/c/_namemapper.c:64: warning: implicit declaration of function
‘Py_DECREF’
cheetah/c/_namemapper.c:69: warning: implicit declaration of function
‘PyErr_Restore’
cheetah/c/_namemapper.c: At top level:
cheetah/c/_namemapper.c:76: error: expected ‘)’ before ‘*’ token
cheetah/c/_namemapper.c: In function ‘getNameChunks’:
cheetah/c/_namemapper.c:123: warning: implicit declaration of function
‘PyErr_SetString’
cheetah/c/_namemapper.c:123: error: ‘TooManyPeriods’ undeclared (first use
in this function)
cheetah/c/_namemapper.c: At top level:
cheetah/c/_namemapper.c:141: error: expected ‘)’ before ‘*’ token
cheetah/c/_namemapper.c:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:166: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:226: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:238: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:319: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:384: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cheetah/c/_namemapper.c:430: error: array type has incomplete element type
cheetah/c/_namemapper.c:431: error: ‘namemapper_valueForKey’ undeclared here
(not in a function)
cheetah/c/_namemapper.c:432: error: ‘PyCFunction’ undeclared here (not in a
function)
cheetah/c/_namemapper.c:432: error: expected ‘}’ before
‘namemapper_valueForName’
cheetah/c/_namemapper.c:433: error: expected ‘}’ before
‘namemapper_valueFromSearchList’
cheetah/c/_namemapper.c:434: error: expected ‘}’ before
‘namemapper_valueFromFrame’
cheetah/c/_namemapper.c:435: error: expected ‘}’ before
‘namemapper_valueFromFrameOrSearchList’
cheetah/c/_namemapper.c:459: warning: return type defaults to ‘int’
cheetah/c/_namemapper.c: In function ‘DL_EXPORT’:
cheetah/c/_namemapper.c:459: error: expected declaration specifiers before
‘init_namemapper’
cheetah/c/_namemapper.c:489: error: expected ‘{’ at end of input
One or more C extensions failed to build.
Details: command 'gcc' failed with exit status 1
Retrying without C extensions enabled.



I actually ended up just taking the "python-cheetah" package bundled with
Ubuntu, which a while ago wasn't new enough for me but now it seems OK.  But
I still thought someone might want to take a look.

Thanks,

Pete

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss