int(long(-sys.maxint-1)) fails on Linux

Chad Netzer chad at vision.arc.nasa.gov
Thu Jul 22 04:54:40 EDT 1999


Compiling python 1.5.2 on Linux Mandrake 6.0,  the "make test" step fails
because it gets an OverflowError during test_types.py on the following line:

int(long(-sys.maxint-1))

test_long.py fails also for the same reason.  I've tried this on another Linux
setup, using the default system python 1.5.1 compiled with just the straight
gcc (not egcs or pgcc) and got the same result.  Is this just the expected
behavior on Linux (in which case maybe the tests should be changed to reflect
this)  Can I ignore it?  (This doesn't overflow on my SGI, and I assume the
Pentium uses 2's-complement.  Perhaps this is a glibc issue?)  I should look
at the code, but I'm sure others must have come across this...

BTW, as a learning experience, I'm building all of Oliver Andrich's Python
packages for the Mandrake 6.0 architecture, and will make the results available
when I'm finished, unless Oliver beats me to the punch and obviates the need.
Our application depends on getting python installed easily, so I took the initiative.

Chad Netzer
chad at vision.arc.nasa.gov






More information about the Python-list mailing list