Hi, i've spent some time trying to debug why python/2.7 packages are not available on sparc - and it seems to be 100% reproductible on compiling Lib/test/test_math.py to the corresponding .pyc file.
python crashes with the following backtrace : Compiling /usr/obj/ports/Python-2.7.3/fake-sparc/usr/local/lib/python2.7/test/test_math.py ... Segmentation fault (core dumped) Program received signal SIGSEGV, Segmentation fault. listextend (self=0x18dbc350, b=0x18dc10c0) at Objects/listobject.c:838 838 Py_INCREF(o); (gdb) bt #0 listextend (self=0x18dbc350, b=0x18dc10c0) at Objects/listobject.c:838 #1 0x1b83a72c in PySequence_List (v=0x18dc10c0) at Objects/abstract.c:2247 #2 0x1b8e7918 in assemble (c=0xf7fd2520, addNone=Variable "addNone" is not available. ) at Python/compile.c:3834 #3 0x1b8ec900 in PyAST_Compile (mod=0x1d429a08, filename=0xf7fd2930 "Lib/test/test_math.py", flags=0xf7fd278c, arena=Variable "arena" is not available. ) at Python/compile.c:1230 #4 0x1b9025d0 in run_mod (mod=0x1d429a08, filename=0xf7fd2930 "Lib/test/test_math.py", globals=0x1b7d5660, locals=0x1b7d5660, flags=0xf7fd278c, arena=0x1a2dc700) at Python/pythonrun.c:1350 #5 0x1b902694 in PyRun_FileExFlags (fp=0x1a2d0e50, filename=0xf7fd2930 "Lib/test/test_math.py", start=Variable "start" is not available.) at Python/pythonrun.c:1339 #6 0x1b903ef0 in PyRun_SimpleFileExFlags (fp=0x1a2d0e50, filename=0xf7fd2930 "Lib/test/test_math.py", closeit=1, flags=0xf7fd278c) at Python/pythonrun.c:943 #7 0x1b916e34 in Py_Main (argc=2, argv=0xf7fd285c) at Modules/main.c:639 #8 0x00010748 in ___start () #9 0x0001064c in _start () #10 0x0001064c in _start () (built with DEBUG=-g INSTALL_STRIP= to preserve debug symbols) Interstingly, if i take a test_math.pyc bytecode (supposedly MI) from, say, amd64, it runs 100% fine on sparc : [/usr/obj/ports/Python-2.7.3/Python-2.7.3]$ LD_LIBRARY_PATH=. ./python Lib/test/test_math.pyc testAcos (__main__.MathTests) ... ok testAcosh (__main__.MathTests) ... ok ... test_testfile (__main__.MathTests) ... ok test_trunc (__main__.MathTests) ... ok Lib/test/ieee754.txt Doctest: ieee754.txt ... ok ---------------------------------------------------------------------- Ran 40 tests in 305.487s OK So only the python py->pyc bytecode compiler trashes itself on sparc. I'm not really comfortable with python compiler internals (and dont intend to lose sanity on this), so if someone could: - report a proper bug upstream so it's not lost - try to reproduce it on another sparc (to rule out local problems) - narrow down the problem to one of the test_math.py instructions - from gdb/the backtrace, i have no idea how to get back to which instruction triggers it. that would be great. Having python 2.7 on sparc would allow shitloads of stuff to be built (or at least, tried) Landry