Skip Montanaro <[EMAIL PROTECTED]> added the comment: Here's a gdb session using r64812. gcc 4.2.2. ldd on math.so shows:
% ldd build/lib.solaris-2.10-i86pc-2.6/math.so libm.so.2 => /lib/libm.so.2 libgcc_s.so.1 => /opt/app/nonc++/lib/libgcc_s.so.1 libc.so.1 => /lib/libc.so.1 % gdb ./python GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-pc-solaris2.10"... (gdb) b math_1 Function "math_1" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (math_1) pending. (gdb) r Starting program: /home/tuba/skipm/src/python-svn/trunk/build/python Python 2.6b1+ (trunk:64812M, Jul 8 2008, 20:43:40) [GCC 4.2.2] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> inf = float('inf') >>> math.log(-inf) Breakpoint 1, math_1 (arg=0x81f1fbc, func=0x805e88c <[EMAIL PROTECTED]>, can_overflow=0) at /home/tuba/skipm/src/python-svn/trunk/Modules/mathmodule.c:171 171 { (gdb) p func $1 = (double (*)(double)) 0x805e88c <[EMAIL PROTECTED]> (gdb) n 173 x = PyFloat_AsDouble(arg); (gdb) n 174 if (x == -1.0 && PyErr_Occurred()) (gdb) x 0x0: Cannot access memory at address 0x0 (gdb) p x $2 = -inf (gdb) n 176 errno = 0; (gdb) n 178 r = (*func)(x); (gdb) n 180 if (Py_IS_NAN(r)) { (gdb) p r $3 = -inf Does this help? I don't know how to tell where [EMAIL PROTECTED] is resolved, but I suppose it probably comes from /lib/libm.so.2. It's got a date on my system of Jan 22 2005. Any idea how to tell if there's a Sun patch for it? As for the /usr/ccs/bin/ld thing, it doesn't look like we are using it, at least not directly. Adding the --verbose flag to the link line I get this output: % gcc --verbose -L/opt/app/nonc++/ncurses-5.6/lib - R/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib - R/opt/app/nonc++/gdbm-1.8/lib -L/opt/app/nonc++/readline-4.3/lib - R/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib - R/opt/app/nonc++/tcl-8.4/lib -L/opt/app/nonc++/BerkleyDB-4.3/lib - R/opt/app/nonc++/BerkleyDB-4.3/lib -o python Modules/python.o libpython2.6.a -lresolv -lsocket -lnsl -lrt -ldl -lm Reading specs from /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc- solaris2.10/4.2.2/specs Target: i386-pc-solaris2.10 Configured with: ../configure --prefix=/opt/app/g++lib6/gcc-4.2 -- enable-languages=c,c++,fortran,objc --disable-nls --with-included- gettext --with-gnu-as --with-as=/usr/sfw/bin/gas --with-target- tools=/usr/sfw/bin/ --with-gmp=/opt/app/nonc++/gmp-4.2 --with- mpfr=/opt/app/nonc++/mpfr-2.3 Thread model: posix gcc version 4.2.2 /opt/app/g++lib6/gcc-4.2/libexec/gcc/i386-pc-solaris2.10/4.2.2/collect2 -V -R/opt/app/nonc++/lib -R/opt/app/g++lib6/lib - R/opt/app/nonc++/ncurses-5.6/lib -R/opt/app/nonc++/gdbm-1.8/lib - R/opt/app/nonc++/readline-4.3/lib -R/opt/app/nonc++/tcl-8.4/lib - R/opt/app/nonc++/BerkleyDB-4.3/lib -Y P,/usr/ccs/lib:/usr/lib -Qy -o python /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/values-Xa.o /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc-solaris2.10/4.2.2/crtbegin.o - L/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib - L/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib - L/opt/app/nonc++/BerkleyDB-4.3/lib -L/opt/app/g++lib6/gcc- 4.2/lib/gcc/i386-pc-solaris2.10/4.2.2 -L/opt/app/g++lib6/gcc- 4.2/lib/gcc/i386-pc-solaris2.10/4.2.2/../../.. Modules/python.o libpython2.6.a -lresolv -lsocket -lnsl -lrt -ldl -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc- solaris2.10/4.2.2/crtend.o /usr/lib/crtn.o ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.482 I don't see /usr/ccs/bin/ld mentioned. Skip _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3167> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com