Building Python on Cray T3E

Andrew Dalke dalke at dalkescientific.com
Fri May 10 00:55:06 EDT 2002


Mark Hadfield:
>...I ran configure with "--enable-unicode=ucs4". But make stops with
>the following error:
  ...
>  CC-147 cc: ERROR File = ./Modules/_sre.c, Line = 1791
>    Declaration is incompatible with "int join(char *, char *)"
>   (declared at line 300 of "/usr/include/unistd.h").
>
>      join(PyObject* list, PyObject* pattern)
>      ^
>
>  Total errors detected in ./Modules/_sre.c: 1

Not worked on a T3E, but what this is saying is that 'unistd.h'
declares a functions called 'join' and _sre.c defines a function
called 'join'.

_sre's join is only used in that file and it's static, so you can
rename it easily if you want.  Change _sre.c (line 1791 in 2.2.1)
so the function "join" is now "srejoin" as in

static PyObject*
join(PyObject* list, PyObject* pattern)
{
    /* join list elements */

  --to--

static PyObject*
srejoin(PyObject* list, PyObject* pattern)
{
    /* join list elements */

This function is called from one place (that I can find) so you'll
also need to change line 2244 the same way, from

    /* convert list to single string (also removes list) */
    item = join(list, self->pattern);

  --to--

    /* convert list to single string (also removes list) */
    item = srejoin(list, self->pattern);

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list