[GRASS-dev] grass7 build failing for swig/python

Hamish:

>> [...]/trunk/dist.i686-pc-linux-gnu/include
-I/usr/local/src/grass/svn/trunk/dist.i686-pc-linux-gnu/include
-o OBJ.i686-pc-linux-gnu/utils_wrap.o -c utils_wrap.c
>> utils_wrap.c: In function 'pyseq_to_ptr':
>> utils_wrap.c:2495: error: 'Py_ssize_t' undeclared (first use in this function)
>> utils_wrap.c:2495: error: (Each undeclared identifier is reported only once
>> utils_wrap.c:2495: error: for each function it appears in.)
>> utils_wrap.c:2495: error: expected ';' before 'len'
>> utils_wrap.c:2522: error: 'len' undeclared (first
use in this function)
>> utils_wrap.c: In function 'pyobj_to_ptr':
>> utils_wrap.c:2570: error: 'Py_ssize_t' undeclared
(first use in this function)
>> utils_wrap.c:2570: error: expected ';' before 'len'
>> [...]
>> make[1]: *** [OBJ.i686-pc-linux-gnu/utils_wrap.o]
Error 1
>> make[1]: Leaving directory
`/usr/local/src/grass/svn/trunk/swig/python'
>> make: *** [default] Error 2

Martin:

Probably related to the Swig version. Which version of swig do you
use. With swig 1.3.29 the wrap C files do not include typedef for
Py_ssize_t which are needed for Python <= 2.4.

Seems to be the case, this is with swig 1.3.29 from debian/etch:

swig 1.3.29-2.1
python 2.4.4-3+etch2

Hamish