Mailing List Archive

Problems building Python1.5.2 for OpenStep
Hi,

I'm writing this without much knowledge of python but in the hope to get
things running well.

As a tool for another project (Zope) I've tried to compile python 1.5.2 for
OpenStep. I've configured using

$ ./configure --without-gcc --with-dyld

without any errors. Make brought the first error

cc -g -O2 -OPT:Olimit=0 -I./../Include -I.. -DHAVE_CONFIG_H -c
./posixmodule.c
./posixmodule.c: In function `posix_ttyname':
/posixmodule.c:613: warning: assignment makes pointer from integer without a
cast
./posixmodule.c: In function `posix_fsync':
./posixmodule.c:656: `fsync' undeclared (first use this function)
./posixmodule.c:656: (Each undeclared identifier is reported only once
./posixmodule.c:656: for each function it appears in.)
make[1]: *** [posixmodule.o] Error 1
make[1]: Leaving directory `/private/tmp/O_py152/Python-1.5.2/Modules'
make: *** [Modules] Error 2

which I've solved by inserting the line

extern int fsync(int);

in Modules/posixmodule.c. Including <libc.h> didn't help because of
conflicting types for 'chown'. After that everything compiled fine.

Now the test:

make test

resulted in

test_cmath
/bin/sh: 7411 Bus error
make: [test] Error 138 (ignored)
PYTHONPATH= ./python ./Lib/test/regrtest.py

gdb showed, that the error occurs in the last return statement of

Py_complex
PyComplex_AsCComplex(op)
PyObject *op;
{
Py_complex cv;
if (PyComplex_Check(op)) {
return ((PyComplexObject *)op)->cval;
} else {
cv.real = PyFloat_AsDouble(op);
cv.imag = 0.;
return cv; /* error occurs here */
}
}

After removing test_cmath.py python doesn't crash any more but fails with two
trsts:

test test_strftime failed -- Writing: 'Conflict for %j (julian day
(001-366)):', expected: ''
test test_time failed -- Writing: 'time.mktime(time.localtime(t)) <> t',
expected: ''

Any hints solving these problems are welcome.

Greetings Olaf