[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: It's actually not quite a solution, either. Working your changes into the build process, I *do* get a math module... but it does *not* have a round function. python Python 2.7 (r27, Nov 23 2010, 11:54:39) [GCC 3.3.2] on sunos5 Type help, copyright, credits or license for more information. import math; print math.round(2.5); Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'module' object has no attribute 'round' print math.floor(2.5); 2.0 A step in the right direction, though, I'd think. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: I have some knowledge of these things, so I'll try to find out what's going on, but I could also upload output and/or debug files here for you to examine, if that helps. If you give me the files you'd like to see from my build, or the commands you'd like the output of, I'd be happy to oblige. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: I unpacked a fresh tarball, made this change, then did a ./configure and make as normal. Exact same error as originally reported. :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: Certainly! -- Added file: http://bugs.python.org/file19773/pyconfig.h ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: ./python Python 2.7 (r27:82500, Nov 22 2010, 10:06:14) [GCC 3.3.2] on sunos5 Type help, copyright, credits or license for more information. import sys print sys.float_repr_style short So it appears, if I follow you, that PY_NO_SHORT_FLOAT_REPR is not defined. Glancing through the Makefile, pymath.o is included in the PYTHON_OBJS variable, which is in turn included in the LIBRARY_OBJS variable, which is used in all the libpython* targets. I'm going to try to turn on some debugging on the commands that build those targets, and see if anything jumps out at me. Maybe it'll be obvious that pymath.o is being left out for one reason or another that'll sync up with your wild guess. :/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: I don't think there's anything wrong with the setup we've been looking at so far, per se. The libpython2.7.a file produced has the 'round' function like it should: nm libpython2.7.a | grep round [116] | 1360| 696|FUNC |GLOB |0|2 |_Py_double_round [218] | 0| 0|NOTY |GLOB |0|UNDEF |_Py_double_round [10] | 15268| 236|FUNC |LOCL |0|2 |builtin_round [48] | 9912| 198|OBJT |LOCL |0|4 |round_doc [8] | 0| 96|FUNC |GLOB |0|2 |round However, the python executable itself, compiled against that archive, does *not* have it: nm python | grep round [4805] |244408| 696|FUNC |GLOB |0|9 |_Py_double_round [1735] |640836| 236|FUNC |LOCL |0|9 |builtin_round [1770] | 1533576| 198|OBJT |LOCL |0|16 |round_doc So, for some reason, the gcc command that builds that python executable is leaving it out: gcc -o python \ Modules/python.o \ libpython2.7.a -lresolv -lsocket -lnsl -lrt -ldl -lpthread -lm Just an update. Going to try to debug that command and see if I can find out why. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: Is there perhaps a work-around we could use to get this to compile and have a math module? Force it to export that 'round' symbol in the core, perhaps? -- nosy: +Doug.Shea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com