Python 2.6: OverflowError: signed integer is greater than maximum
Hi, while trying to get Python 2.6 working on OpenBSD/sgi (64-bit port) I ran into the following during build: OverflowError: signed integer is greater than maximum I ran the command that triggered this by hand with -v added: (sgi Python-2.6.3 40)$ export PATH; PATH="`pwd`:$PATH"; export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; export EXE; EXE=""; cd ./Lib/plat-openbsd4; ./regen python$EXE -v ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/site.pyc matches /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/site.py import site # precompiled from /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/site.pyc 'import site' failed; traceback: Traceback (most recent call last): File "/usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/site.py", line 61, in <module> import sys OverflowError: signed integer is greater than maximum import encodings # directory /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/encodings # /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/encodings/__init__.pyc matches /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/encodings/__init__.py import encodings # precompiled from /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/encodings/__init__.pyc Python 2.6.3 (r263:75183, Nov 6 2009, 09:50:33) [GCC 3.3.5 (propolice)] on openbsd4 Type "help", "copyright", "credits" or "license" for more information. # /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/re.pyc matches /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/re.py import re # precompiled from /usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/re.pyc Traceback (most recent call last): File "../../Tools/scripts/h2py.py", line 24, in <module> import sys, re, getopt, os File "/usr/obj/ports/Python-2.6.3/Python-2.6.3/Lib/re.py", line 104, in <module> import sys OverflowError: signed integer is greater than maximum # clear __builtin__._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.exitfunc # clear sys.exc_type # clear sys.exc_value # clear sys.exc_traceback # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # clear sys.flags # clear sys.float_info # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] zipimport # cleanup[1] signal # cleanup[1] exceptions # cleanup[1] _warnings # cleanup sys # cleanup __builtin__ # cleanup ints: 3 unfreed ints # cleanup floats (sgi plat-openbsd4 41)$ Does anyone know what's going on here, or how to fix it? I can provide a full build and configure log if needed. Cheers, Jasper -- "Intelligence should guide our actions, but in harmony with the texture of the situation at hand" -- Francisco Varela
On Mon, Nov 9, 2009 at 5:26 PM, Jasper Lievisse Adriaanse <jasper@humppa.nl> wrote:
Hi,
while trying to get Python 2.6 working on OpenBSD/sgi (64-bit port) I ran into the following during build:
OverflowError: signed integer is greater than maximum
I ran the command that triggered this by hand with -v added:
[traceback snipped]
Does anyone know what's going on here, or how to fix it? I can provide a full build and configure log if needed.
No idea. Please could you file a report at http://bugs.python.org? The build and configure log would be useful. If you can diagnose the source of the failure yourself any further that would be more useful; I suspect that the core developers will have a hard time figuring the problem out without this. I may well be barking up the wrong tree here, but as a first guess it looks as though something in the _PySys_Init function in Python/sysmodule.c is (directly or indirectly) causing the OverflowError to be raised. I'd try adding a bunch of printf calls to that function that print the value of PyErr_Occurred(), to see where (if at all) the Python exception is being set. (I suggest building with the --with-pydebug configure option for this.) Mark
I may well be barking up the wrong tree here, but as a first guess it looks as though something in the _PySys_Init function in Python/sysmodule.c is (directly or indirectly) causing the OverflowError to be raised.
My theory would be different. There is a pending unchecked OverflowError before the import, and the err-occurred check after the import picks it up. Of course, your guess is as good as mine. While barking up trees: My guess is that it's a compiler bug (i.e. the compiler generating bad code). Regards, Martin
On Mon, Nov 09, 2009 at 07:15:20PM +0000, Mark Dickinson wrote:
On Mon, Nov 9, 2009 at 5:26 PM, Jasper Lievisse Adriaanse <jasper@humppa.nl> wrote:
Hi,
while trying to get Python 2.6 working on OpenBSD/sgi (64-bit port) I ran into the following during build:
OverflowError: signed integer is greater than maximum
I ran the command that triggered this by hand with -v added:
[traceback snipped]
Does anyone know what's going on here, or how to fix it? I can provide a full build and configure log if needed.
No idea. Please could you file a report at http://bugs.python.org? The build and configure log would be useful. If you can diagnose the source of the failure yourself any further that would be more useful; I suspect that the core developers will have a hard time figuring the problem out without this.
I may well be barking up the wrong tree here, but as a first guess it looks as though something in the _PySys_Init function in Python/sysmodule.c is (directly or indirectly) causing the OverflowError to be raised. I'd try adding a bunch of printf calls to that function that print the value of PyErr_Occurred(), to see where (if at all) the Python exception is being set. (I suggest building with the --with-pydebug configure option for this.)
Mark Hi,
for the record, I filed the bug as: http://bugs.python.org/issue7296 In the meantime I'll try digging into this issue. Cheers, Jasper -- "Intelligence should guide our actions, but in harmony with the texture of the situation at hand" -- Francisco Varela
participants (3)
-
"Martin v. Löwis" -
Jasper Lievisse Adriaanse -
Mark Dickinson