> > Hamish: > building relbr6.4 swig/python/ from Debian/Etch (swig > version 1.3.29-2.1) fails with: > [...] > utils_wrap.c: In function 'pyseq_to_ptr': > utils_wrap.c:2495: error: 'Py_ssize_t' undeclared (first use in this function) > [...] .... > > a #include <Python.h> seems in order. > > I am trying to find where to handle something like that, > - utils*.c is auto-generated by swig. > - Python.h is found by ./configure and stored in Platform.make:PYTHONINC > and PYTHONCFLAGS > - Can something be added to the utils_wrap.c: Makefile rule ???
hmmm. utils_wrap.c has: /* Python.h has to appear first */ #include <Python.h> and make correctly includes -I/usr/include/python2.4, gcc -I/usr/local/src/grass/svn/releasebranch_6_4/dist.i686-pc-linux-gnu/include -ggdb -march=pentium4 -Wall -Werror-implicit-function-declaration -fPIC -DPACKAGE=\""grasslibs"\" -fPIC -I/usr/include/python2.4 -I/usr/include/python2.4 -DPACKAGE=\""grasslibs"\" -I/usr/local/src/grass/svn/releasebranch_6_4/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:2496: error: 'Py_ssize_t' undeclared (first use in this function) utils_wrap.c:2496: error: (Each undeclared identifier is reported only once utils_wrap.c:2496: error: for each function it appears in.) but /usr/include/python2.4/ headers only mentions 'Py_ssize_t' in a comment of pymem.h. In python 2.5 include files it is defined in pyport.h. so (IIUC) swig 1.3.29 requires python >= 2.5 ? Hamish _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev